- #QINHENG ELECTRONICS HL 340 USB SERIAL ADAPTER LINUX SERIAL NUMBER#
- #QINHENG ELECTRONICS HL 340 USB SERIAL ADAPTER LINUX SERIAL#
- #QINHENG ELECTRONICS HL 340 USB SERIAL ADAPTER LINUX SOFTWARE#
The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. In the end, buy genuine Arduinos or at least ones with FTDI chips or something else that sends a unique device ID.Necessary cookies are absolutely essential for the website to function properly. This method DOES work though, and it's what I'm using because I bought way too many of these cheap things. But since all your CH340 arduinos must be the same speed with this method, you can only go as slow as your fastest device. (cheapduinos are cheap!) 9600 works much better than 115200 which works after several tries. Finally, this method works much better at low baud rate than at high baud rate, which for timing reasons may not succeed every time. They all must use the same baud rate as the script unless you want to write a very complex script that takes a long time. All of your cheapduinos must have this functionality in their software, with different device IDs set. Also this is not using the SYMLINK function of udev so it won't clean up dead links on disconnect, but it will overwrite them on reconnect.
#QINHENG ELECTRONICS HL 340 USB SERIAL ADAPTER LINUX SOFTWARE#
The script must time out if the software on the cheapduino doesn't answer. There are a lot of drawbacks to this method. The script then creates a symlink /dev/THX1138 that points to /dev/ttyUSB0
#QINHENG ELECTRONICS HL 340 USB SERIAL ADAPTER LINUX SERIAL#
Then the cheapduino script connects by serial to the device and sends the string 'ID' and the software on the device responds DEVID=THX1138 or whatever. When the device matches the product and vendor of the cheap arduino, it runs the script 'cheapduino.py' with the device as argument, for instance I created a udev rule that looks like this:
#QINHENG ELECTRONICS HL 340 USB SERIAL ADAPTER LINUX SERIAL NUMBER#
This one-hub trick should work for MacOS and windows too, they should come up in the same order.įor devices with a unique ID such as FTDI you can set a udev rule that sees it's serial number and then creates a symlink to that device, it's straightforward.įor devices with the same or no Serial number, it's a lot more complex.
HL-340 is USB<->Serial adapter and it is recognised by my kernel : I am trying to initiate communication via this adapter with Raspberry Pi B+ board, but I am constantly failing.The devices will enumerate in the order that they are plugged in to the hub. I have Kubuntu 14.10 development workstation and recently I have bought a QinHeng Electronics HL-340 USB-Serial adapter. If you have a lot of changes to your USB devices, plug all the CH340 devices into the same hub, then plug that in. This position, and the device names, should persist across reboots. Cheap chips won't, but they each have an entry under /dev/serial/by-path. FTDI chips will each have unique entries here. There is also a /dev/serial/by-id but there will only be one entry there for this device because it shows the last one connected. If you're using linux you can find each device under /dev/serial/by-path. First and easiest is the position of the device on the USB bus. I have been trying to find solutions for this problem. This is also a problem for the PL2303 type. There is no storage on the CH340 and family of UARTs where you could put a unique ID. Which is essentially useless, as I can't identify the given board attached (when I attach two, their details are the same). usb 2-1.2: ch341-uart converter now attached to ttyUSB0 usb 2-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 2-1.2: New USB device found, idVendor=1a86, idProduct=7523
Does anyone know of an alternative utility/where I can find information to do the same with this chip?Ĭurrently the device identifies itself with: usb 2-1.2: new full-speed USB device number 7 using ehci-pci I have a nano-style boad with a QinHeng Electronics HL-340 USB-Serial adapter, which clearly isn't an FTDI chip, and the FTDI programmer therefore doesn't work. Reading there appears to be a way to write out to a FTDI USB-Serial EEPROM to set a given SerialNumber, allowing you to identify a given nano/other arduino to handle it specifically in UDEV.