I have an 8 channel USB Relay board which I have connected via USB. The manual for the board states that:
To use this product with Linux, USB CDC driver needs to be compiled in with the kernel. Fortunately, most Linux distributions (Ubuntu, Redhat, Debian etc..) has this driver pre-installed.
The chances of you requiring to rebuild the kernel to include the USB CDC driver is very slim.
When connected to a Linux machine, this product should appear as a serial port in the /dev directory. Usually the name of the device will be
ttyACMxor similar. The name may be different depending on the Linux distribution you have.
In my case (running Gentoo), I did have to include the driver for USB CDC ACM to the kernel.
Plugging in my relay, I can see this using
[76094.036163] usb 4-1: new full-speed USB device number 4 using uhci_hcd [76094.618717] usb 4-1: New USB device found, idVendor=2a19, idProduct=0c02 [76094.618722] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [76094.618725] usb 4-1: Product: Numato Lab 8 Channel USB Relay Module [76094.618728] usb 4-1: Manufacturer: Numato Systems Pvt. Ltd.
lsusb I see
ttyACM0 appear. But sending command strings to it using
echo -ne 'string' > /dev/ttyACM0 has no effect. Additionally,
ls -al of
/dev shows that
ttyACM0 is not a character device file. In fact it shows:
-rw-rw-rw- 1 root root 13 Nov 9 09:38 ttyACM0
Is there some other driver or module which I need to enable? Why doesn't
ttyACM0 show as a character device? Is there something wrong with the way I am sending the commands to
I have the relay running successfully on Windows after I install the Windows driver provided by the company. I can send it commands using PuTTY with no problems, but I can't find out what I haven't done right on Linux.