Closed wlan4you closed 7 months ago
I do not use windows, and I finally switched to another solution (arduino board + relay shield) because I needed feedback from some sensors (and relay control as well).
But I guess you can do something like:
echo A00101A2 > command.txt
certutil -decodehex command.txt command.bin
MODE COM8:115200,n,8,1
copy command.bin \\.\com1 /b
These module use no comport. It is the same module what you have used here:
Yes, it is the same. USB is a com port
Hmmm.... if i type MODE COM8.... Then comes error that com port
Illegal device name - COM8 Nombre de dispositivo ilegal - COM8
If i take a look in my Win11 when the relay is connected. there is no COMPORT. Only the HID Device
COM8 is only an example. In your computer It could be COM1, COM2...
Check Windows Device Manager.
There is no COM, if i connected them to windows. It is a HID Device. They have no COM.
You have not the same module ?
Perhaps you don't have the USB drivers for CH340 installed. It is included in Linux, but not in Windows.
You can find that drivers in many web pages:
https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all
On my Module is no CH340 I have a CH554E installed
I have a CH554E installed
And you have the proper windows drivers installed?
They don't need a driver. They can talk as a HID device.
OK. Close it here. I have first uinderstand you have the same RELAY MOdule like me. See Screenshot from first post.
Here are sam Macro PICS from the chip.
Thanks for your help to try and your time.
@wlan4you I also have the HID version of this piece of shit. Did you end up finding a solution to make it work with a bat file?
I tried using hidapitester to send output, but the relay did not actuate. Have you found a way to actuate it using the hidapitester? Or have you found a solution?
also, program is not writing?
@alfem Do you think you could point me in the right direction? Similar to @wlan4you I have the HID-type relay. I'm think though they use the same integrated circuits as the ch340's the configuration inside the USB protocol is different. But I have no clue how to get this thing to work, all I know is that it can work under windows because it came with the lc_usb.exe that actuates the relay.
I've tried to wireshark the usb to some success, but I don't have to knowledge to send the same data to the relay that the .exe file is sending.
Hello, NO i didn't find a solution with this piece of shit (LOL). I search hours in the web. I testet a lot of... nobody has this module running over a batch file.
Please if you find a way, write to me or here in this part here. THANKS !
.\hidapitester.exe --vidpid 5131:2007 --open --send-output 0x0,0xA0,0x01,0x01,0xA2 --close
works
.\hidapitester.exe --vidpid 5131:2007 --open --send-output 0x0,0xA0,0x01,0x01,0xA2 --close
works
Jaaabbbaaaddaaaabbbaaadddduuuuuuuuu !!! It goes ! Your the best. I was on the way, but i didn't now about the "Ax" before
Great. Many Thanks
It works! You are the man. Thank you so much.
.\hidapitester.exe --vidpid 5131:2007 --open --send-output 0x0,0xA0,0x01,0x01,0xA2 --close
works
It works on Windows! I would never have thought of adding an extra 0x0 at the beginning. Thanks!
Hello,
i see you have absolutly the same module like me. I also read that you tryed to bring them work under windows.
hidapitester --vidpid 5131:2007 --open --send-output 0xA0,01,01,A2 --close
I need also an easy solution to run it under windows like a batch file.
You find more? or a solution without to use python?
With the original tool i find out which is goning on and off. I put it into a excel sheet.
This has i found on a webpage. It has the same information what i found out with my test. But it will not going with a batch file
Protocolo de interruptor USB LC:
Datos (1) --- identidad inicial (el valor predeterminado es 0xA0) Datos (2) --- Código de Dirección del interruptor (el valor predeterminado es 0x01, identificando el interruptor del primer canal) Datos (3) --- Datos operativos (0x00 a "Off", 0x01 "On") Datos (4) --- suma de comprobación
Ejemplo: Interruptor USB abierto: A0 01 01 A2 Cerrar interruptor USB: A0 01 00 A1