Wakeup the system
Re: Wakeup the system
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
1. USB host should support this.
2. In the descriptor to enable USBATTR_REMOTEWAKE.
It works =)
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
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
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
Thanks for the hint! I've added it in the master branch on Github.
Re: Wakeup the system
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
It probably won't harm. I think the host is just prepared to receive remote wake.
Re: Wakeup the system
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
https://github.com/robszy/ps2usb/blob/m ... ard.c#L112
I only wait 10 ms and it never failed
regards,
Robert