Closed combat007 closed 6 years ago
Well that's a problem. I can't think of any way to discriminate other than buying another. They should have unique id. Try having the supplier replace it.
On Fri., 26 Jan. 2018, 2:27 am combat007, notifications@github.com wrote:
Your program works great on one channel relay But I am stuck with the problem that I have two 1 channel relays attached to two usb ports of my laptop. Following is the output of the command ./usbrelay
Device Found type: 16c0 05df path: /dev/hidraw2 serial_number: Manufacturer: www.dcttech.com Product: USBRelay1 Release: 100 Interface: 0 Number of Relays = 1 959BI_1=0
Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay1 Release: 100 Interface: 0 Number of Relays = 1 959BI_1=0
When I provide the command "./usbrelay 959BI_1=1" it works on both the relays simultaneously, but I want that only one must work at a time. Wht both channels device showing same ID? How can I differentiate between those two relay channel in the command ./usbrelay ??
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVdAMpYSqdu45JQgSXgbDpjdnxmdfks5tOKt1gaJpZM4RtHia .
ID is provided as a parameter to ./usbrelay. Can't we provide the device path instead?? I think it will solve the problem if we can provide the device path.
well I followed this link and got the solution https://www.quora.com/How-do-I-enable-and-disable-USB-port-using-terminal-in-Ubuntu
then I wrote the script "mycmd"
if [ $1 == "small" ] then echo '2-1' | tee /sys/bus/usb/drivers/usb/unbind ./usbrelay 959BI_1=1;./usbrelay 959BI_1=0 echo '2-1' | tee /sys/bus/usb/drivers/usb/bind fi
if [ $1 == "big" ] then echo '2-3' | tee /sys/bus/usb/drivers/usb/unbind ./usbrelay 959BI_1=1;./usbrelay 959BI_1=0 echo '2-3' | tee /sys/bus/usb/drivers/usb/bind fi
Now this helped me out to start two machines one by one ./mycmd small ./mycmd big
the rest of the job was done by your utility and it worked like a charm. Kindly share this solution to those who are seeking it like I was.
Regards
Thanks. It really should not be necessary. The ID should be unique. I'd be careful as the USB bus instantiates the device addresses non predictably. Try a few power cycled to make sure the devices come up as expected.
On Sat, 27 Jan 2018, 05:32 combat007 notifications@github.com wrote:
well I followed this link and got the solution
https://www.quora.com/How-do-I-enable-and-disable-USB-port-using-terminal-in-Ubuntu
then I wrote the script "mycmd" ---------Bash Script start here -------
if [ $1 == "small" ] then echo '2-1' | tee /sys/bus/usb/drivers/usb/unbind ./usbrelay 959BI_1=1;./usbrelay 959BI_1=0 echo '2-1' | tee /sys/bus/usb/drivers/usb/bind fi
if [ $1 == "big" ] then echo '2-3' | tee /sys/bus/usb/drivers/usb/unbind ./usbrelay 959BI_1=1;./usbrelay 959BI_1=0 echo '2-3' | tee /sys/bus/usb/drivers/usb/bind fi ---------Bash Script end here -------
Now this helped me out to start two machines one by one ./mycmd small ./mycmd big
the rest of the job was done by your utility and it worked like a charm. Kindly share this solution to those who are seeking it like I was.
Regards
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-360866447, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVWpf2FxzMKt8jamJXPlksqJHRa_xks5tOhpEgaJpZM4RtHia .
I'm having the same problem -- except I can't use the solution that combat007 provides. I can't turn any of them off as I have to potentially trigger channels simulataneously... Would it be possible to somehow provide device path + ID to the usbrelay command?
I currently have 3 boards and they are all given the same buf IDs (6QMBS_1 - 6QMBS_8). I feel it is highly unlikely that getting a replacement will enumerate unique IDs, but if it really is the only chance I guess i'll try!
Well that's very slack of the vendors. The trouble with device ID is that it will depend how the USB devices are enumerated could result in unpredictable device IDs. Not a good situation when connected to real equipment.
I will have a look at it.
On Thu., 15 Mar. 2018, 7:23 am danbayona, notifications@github.com wrote:
I'm having the same problem -- except I can't use the solution that combat007 provides. I can't turn any of them off as I have to potentially trigger channels simulataneously... Would it be possible to somehow provide device path + ID to the usbrelay command?
I currently have 3 boards and they are all given the same buf IDs (6QMBS_1
- 6QMBS_8). I feel it is highly unlikely that getting a replacement will enumerate unique IDs, but if it really is the only chance I guess i'll try!
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373179522, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVXsC2IeTSoaxZoOtK15_KjhWsa-Fks5teYpVgaJpZM4RtHia .
Would it change anything if I use udev rules so that the USB relay devices are enumerated statically? I currently set rules for other USB devices so they can be referred to by a non-dynamic path.
PS. Thanks for your time and your timely responses I rly appreciate it!
That would probably work.
On Thu., 15 Mar. 2018, 8:03 am danbayona, notifications@github.com wrote:
Would it change anything if I use udev rules so that the USB relay devices are enumerated statically? I currently set rules for other USB devices so they can be referred to by a non-dynamic path.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373190121, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVZfKwtD7tzj32SaCPz0XSW07iKmKks5teZOkgaJpZM4RtHia .
The problem is -- even with different /dev/ paths the channel ID's are still identical. Am I missing something? When you refer to 'device ID' do you mean the ID '16c0:05df'?
that's the problem. The manufacturer isn't randomising the HID ID and the device type is fixed. The only way of doing it is to point to the USB port. Should at least complain to the vendor about randomising the HID ID. Their software won't work either.
On Thu, Mar 15, 2018 at 8:32 AM danbayona notifications@github.com wrote:
The problem is -- even with different /dev/ paths the channel ID's are still identical. Am I missing something? When you refer to 'device ID' do you mean the ID '16c0:05df'?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373197006, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVTuVBnQuCx9c8uUvgX1th2Ky20lOks5teZphgaJpZM4RtHia .
Found the author of replacement firmware for the board. It is possible to change the serial. I'll look at the windows code to see if it can do it. Otherwise, I'll see if I can add the functionality to usbrelay.
On Thu., 15 Mar. 2018, 12:15 pm Darryl Bond, darryl.bond@gmail.com wrote:
that's the problem. The manufacturer isn't randomising the HID ID and the device type is fixed. The only way of doing it is to point to the USB port. Should at least complain to the vendor about randomising the HID ID. Their software won't work either.
On Thu, Mar 15, 2018 at 8:32 AM danbayona notifications@github.com wrote:
The problem is -- even with different /dev/ paths the channel ID's are still identical. Am I missing something? When you refer to 'device ID' do you mean the ID '16c0:05df'?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373197006, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVTuVBnQuCx9c8uUvgX1th2Ky20lOks5teZphgaJpZM4RtHia .
Wow thank you so much for your efforts! fyi I am running this on linux Ubuntu 16.04
Hold your thanks until I get it to work :)
On Fri, 16 Mar 2018, 08:25 danbayona notifications@github.com wrote:
Wow thank you so much for your efforts! fyi I am running this on linux Ubuntu 16.04
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373542417, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVd7AiB6JReMUCmf1BHTVoAokFRXVks5teupjgaJpZM4RtHia .
Ok, please test the new version. I have added the capability to change the serial. I have updated the documentation to show how to do it. Worked fine on my test board. plug in one of the devices with the duplicate serial and change it.
Can you test my changes. I have updated the doco to show how to change the serial. You will need to pull the latest version and recompile.
On Fri, Mar 16, 2018 at 12:12 PM Darryl Bond darryl.bond@gmail.com wrote:
Hold your thanks until I get it to work :)
On Fri, 16 Mar 2018, 08:25 danbayona notifications@github.com wrote:
Wow thank you so much for your efforts! fyi I am running this on linux Ubuntu 16.04
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373542417, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVd7AiB6JReMUCmf1BHTVoAokFRXVks5teupjgaJpZM4RtHia .
My apologies! I was on travelling/on vacation until today. Will give it a test run today and let you know.
Sent via the Samsung Galaxy Note5, an AT&T 4G LTE smartphone -------- Original message --------From: Darryl Bond notifications@github.com Date: 3/21/18 2:47 AM (GMT-08:00) To: darrylb123/usbrelay usbrelay@noreply.github.com Cc: danbayona dan.bayona@ring.com, Comment comment@noreply.github.com Subject: Re: [darrylb123/usbrelay] How to use in script if two one channel usb relay with same ID (#18) Can you test my changes. I have updated the doco to show how to change the
serial. You will need to pull the latest version and recompile.
On Fri, Mar 16, 2018 at 12:12 PM Darryl Bond darryl.bond@gmail.com wrote:
Hold your thanks until I get it to work :)
On Fri, 16 Mar 2018, 08:25 danbayona notifications@github.com wrote:
Wow thank you so much for your efforts! fyi I am running this on linux
Ubuntu 16.04
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/darrylb123/usbrelay/issues/18#issuecomment-373542417,
or mute the thread
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/darrylb123/usbrelay","title":"darrylb123/usbrelay","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/darrylb123/usbrelay"}},"updates":{"snippets":[{"icon":"PERSON","message":"@darrylb123 in #18: Can you test my changes. I have updated the doco to show how to change the\nserial. You will need to pull the latest version and recompile.\n\nOn Fri, Mar 16, 2018 at 12:12 PM Darryl Bond \u003cdarryl.bond@gmail.com\u003e wrote:\n\n\u003e Hold your thanks until I get it to work :)\n\u003e\n\u003e On Fri, 16 Mar 2018, 08:25 danbayona \u003cnotifications@github.com\u003e wrote:\n\u003e\n\u003e\u003e Wow thank you so much for your efforts! fyi I am running this on linux\n\u003e\u003e Ubuntu 16.04\n\u003e\u003e\n\u003e\u003e —\n\u003e\u003e You are receiving this because you commented.\n\u003e\u003e\n\u003e\u003e\n\u003e\u003e Reply to this email directly, view it on GitHub\n\u003e\u003e \u003chttps://github.com/darrylb123/usbrelay/issues/18#issuecomment-373542417\u003e,\n\u003e\u003e or mute the thread\n\u003e\u003e \u003chttps://github.com/notifications/unsubscribe-auth/AGcqVd7AiB6JReMUCmf1BHTVoAokFRXVks5teupjgaJpZM4RtHia\u003e\n\u003e\u003e .\n\u003e\u003e\n\u003e\n"}],"action":{"name":"View Issue","url":"https://github.com/darrylb123/usbrelay/issues/18#issuecomment-374881816"}}}
Hey! The IDs for each channel are now able to be enumerated uniquely and will work for my purposes, thank you so much for your time!
Tested by danbayona, tested by myself on 2 way and 8 way relay. $ ./usbrelay Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay8 Release: 100 Interface: 0 Number of Relays = 8 86UXU_1=0 86UXU_2=0 86UXU_3=0 86UXU_4=1 86UXU_5=0 86UXU_6=0 86UXU_7=0 86UXU_8=0
$ ./usbrelay 86UXU_0=86UXV Orig: 86UXU, Serial: 86UXU, Relay: 0 State: 0 Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay8 Release: 100 Interface: 0 Number of Relays = 8 Serial: 86UXU, Relay: 0 State: 0 1 HID Serial: 86UXU Serial: 86UXU, Relay: 0 State: 0 --- Not Found $ ./usbrelay Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay8 Release: 100 Interface: 0 Number of Relays = 8 86UXV_1=0 86UXV_2=0 86UXV_3=0 86UXV_4=1 86UXV_5=0 86UXV_6=0 86UXV_7=0 86UXV_8=0
$ ./usbrelay 86UXV_0=86UXU Orig: 86UXV, Serial: 86UXV, Relay: 0 State: 0 Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay8 Release: 100 Interface: 0 Number of Relays = 8 Serial: 86UXV, Relay: 0 State: 0 1 HID Serial: 86UXV Serial: 86UXV, Relay: 0 State: 0 --- Not Found $ ./usbrelay Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay8 Release: 100 Interface: 0 Number of Relays = 8 86UXU_1=0 86UXU_2=0 86UXU_3=0 86UXU_4=1 86UXU_5=0 86UXU_6=0 86UXU_7=0 86UXU_8=0
Hi,
I was working with Dan on the issue above. I built your new changes using Docker so I didn't have to install any dependencies locally. Would you be interested in adding the Dockerfile, a build script and an updated Readme to the project? I have branch ready to push. This way, anyone can build from source once they install Docker and not have to fuss with setting up their host machine.
Thanks for the help!
Sure
On Sun., 25 Mar. 2018, 10:33 am ImXron, notifications@github.com wrote:
Hi,
I was working with Dan on the issue above. I built your new changes using Docker so I didn't have to install any dependencies locally. Would you be interested in adding the Dockerfile, a build script and an updated Readme to the project? I have branch ready to push. This way, anyone can build from source once they install Docker.
Thanks for the help!
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/darrylb123/usbrelay/issues/18#issuecomment-375935729, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcqVSksEXQc7j28xm-HMCWDeXY8h1hgks5thuXygaJpZM4RtHia .
Your program works great on one channel relay But I am stuck with the problem that I have two 1 channel relays attached to two usb ports of my laptop. Following is the output of the command ./usbrelay
Device Found type: 16c0 05df path: /dev/hidraw2 serial_number: Manufacturer: www.dcttech.com Product: USBRelay1 Release: 100 Interface: 0 Number of Relays = 1 959BI_1=0
Device Found type: 16c0 05df path: /dev/hidraw0 serial_number: Manufacturer: www.dcttech.com Product: USBRelay1 Release: 100 Interface: 0 Number of Relays = 1 959BI_1=0
When I provide the command "./usbrelay 959BI_1=1" it works on both the relays simultaneously, but I want that only one must work at a time. Why both channels device showing same ID? How can I differentiate between those two relay channel in the command ./usbrelay
??