Page 2 of 2

Re: Wakeup the system

Posted: Tue Mar 27, 2012 4:14 am
by shebeique55
Hi,I'm confused with this problem,too. Have you finished the problem?I have tried the ways above,and as what you had done,it didn't work.I don't know what to do.How about you?

Re: Wakeup the system

Posted: Tue Jan 29, 2013 7:59 pm
by bvi
1. USB host should support this.
2. In the descriptor to enable USBATTR_REMOTEWAKE.

Code: Select all

void wake_up_signal()
{
cli();
char ps_p = PORTD;
char ps_ddr = DDRD;
PORTD |=(1<<PD2);
PORTD &= ~(1<<PD1);
DDRD |= (1<<PD2)|(1<<PD1);
_delay_ms(100);
PORTD ^=(1<<PD2);
PORTD ^=(1<<PD1);
_delay_ms(3);
PORTD =ps_p;
DDRD = ps_ddr;
  sei();
}


It works =)

Re: Wakeup the system

Posted: Sun May 26, 2013 8:29 pm
by minii
Very interesting. I cannot google how to set/use USBATTR_REMOTEWAKE in V-USB HID device (keyboard). Could you please explain how to implement and use this feature?

Re: Wakeup the system

Posted: Thu Sep 03, 2015 11:11 pm
by kalidomra
This is a little old but I think V-USB is missing the USBATTR_REMOTEWAKE bit. Would it be correct to add it here in usbdrv.c:

Code: Select all

#if USB_CFG_IS_SELF_POWERED
    (1 << 7) | USBATTR_SELFPOWER | USBATTR_REMOTEWAKE,       /* attributes */
#else
    (1 << 7)|USBATTR_REMOTEWAKE,                           /* attributes */
#endif

Re: Wakeup the system

Posted: Fri Sep 04, 2015 11:47 am
by christian
Thanks for the hint! I've added it in the master branch on Github.

Re: Wakeup the system

Posted: Fri Sep 04, 2015 5:44 pm
by kalidomra
Not sure if this is the right way or to add a user configurable variable to the config file and check it here with a pre-processor. Either way this works. The Power Management tab shows up in the windows device setting now.

Re: Wakeup the system

Posted: Fri Sep 04, 2015 6:38 pm
by christian
It probably won't harm. I think the host is just prepared to receive remote wake.

Re: Wakeup the system

Posted: Sun Oct 18, 2015 1:54 pm
by robert
I've implemented remote wakeup in my project of ps2usb translator and it works like charm :)

https://github.com/robszy/ps2usb/blob/m ... ard.c#L112

I only wait 10 ms and it never failed :)


regards,
Robert