Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad usbrelay ID string! #39

Open
zedthirteen opened this issue Oct 1, 2021 · 3 comments
Open

Bad usbrelay ID string! #39

zedthirteen opened this issue Oct 1, 2021 · 3 comments

Comments

@zedthirteen
Copy link

zedthirteen commented Oct 1, 2021

My PC failed to detect the USB relay. After some debugging I traced the issue to the checks on the buffer returned by usb_relay_lib.c->rel_read_status_raw

the loop(s) that checks all of the char in the array are failing on the first element (buffer[1]) as it has the value 0xFF. The buffer conntents are: 0x00, 0xFF, 0x57, 0x33, 0x34 0x31, 0x00....

Anybody knwo why this ID is now reported differently by the OS?

I've temporarilly modified all of the for loops to start at element 2

@zedthirteen zedthirteen changed the title "Bad usbrelay ID string! Bad usbrelay ID string! Oct 1, 2021
@OzFalcon
Copy link

Are you sure your USB relay is using the same microcontroller?
See #27

@zedthirteen
Copy link
Author

Ahh, my 4 channel relay has an Atmel ATMEGA8.
The thing is, it was working fine for over a year. I just fired up my PC one day and when I tried to use the windows form based application, it failed to detect the relay board.
Perhaps the firmware ont the board has corrupted? But it is still working with my change to the library code. I have an 8 channel USB relay on order so I will run some test with that when it arrives

@datadiode
Copy link

My 8 channel relay board just developed the essencially same issue, the only difference being that some other character of the ID string changed its value to 0x01. The board continues to work after relaxing the ID string syntax check to accept characters outside the printable ASCII range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants