Openwrt Usb Serial Ftdi

Usbserial: Unknown symbol usb_get_dev usbserial: Unknown symbol usb_submit_urb usbserial: Unknown symbol usb_match_id usbserial: Unknown symbol usb_store_new_id usbserial: Unknown symbol usb_control_msg usbserial: Unknown symbol usb_deregister usbserial: Unknown symbol usb_kill_urb. Also ftdi_sio driver for ftdi chip is quite old.

P1-OpenWrt Connect Smart Meter's P1 to an OpenWrt OpenWrt setup for FTDI USB device: opkg update opkg install kmod-usb-ohci opkg install kmod-usb2 opkg install kmod-usb-serial opkg install kmod-usb-serial-ftdi modprobe ftdi_sio modprobe usbserial Check: root@OpenWrt:~# lsmod grep ftdi ftdi_sio 27856 1 usbcore 109781 7 ftdi_sio usbserial 18407 4 ftdi_sio Connect the FTDI USB device to the router's USB port root@OpenWrt:~# lsusb Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc.

Verify USB Serial driver After install the FTDI usb serial driver, it is advise to verify the driver is installed properly. Plug in Arduino to the USB port of router and execute the following command.

Dmesg grep -i usb FTDI USB Serial Device converter is attached to ttyUSB0 as shown in figure below. Unplug the Arduino from the router will display disconnected from ttyUSB0 Install Serial to Net (ser2net) Here I show you 2 different methods to control the Arduino, ser2net and socat. To install ser2net, execute this code: opkg install ser2net Edit ser2net Configuration To make ser2net listen on TCP port 1234, append 1 line to the end of /etc/ser2net.conf 1234:raw:0:/dev/ttyUSB0:9600 Using to edit the configuration. The setting is added to the ser2net configuration as shown in figure below. This will open a tcp 1234 port & set to baud rate 9600. The usb serial port will be /dev/ttyUSB0 Install socat socat is much more powerful & features than ser2net. To install socat, enter the following command: opkg install socat Start ser2net or socat You will need to start ser2net or socat before you can control the Arduino. There is two way to start ser2net & socat.

You can start it manually or automatically on every reboot. Start ser2net manually ser2net ser2net will start based on ser2net configuration file Start socat manually (Arduino Duemilanove) socat tcp-l:1234,reuseaddr,fork file:/dev/ttyUSB0,nonblock,raw,echo=0,waitlock=/var/run/tty,b9600 This will open a tcp 1234 port & set to baud rate 9600. The usb serial port will be /dev/ttyUSB0 Start socat manually (Arduino Uno R3 USB chip) socat tcp-l:1234,reuseaddr,fork file:/dev/ttyACM0,nonblock,raw,echo=0,waitlock=/var/run/tty,b9600 This will open a tcp 1234 port & set to baud rate 9600. The usb serial port will be /dev/ttyACM0. Enter @00 of 1 & click on Send ASCII button to turn off LED1 Here I develop a program using Delphi called Arduino Control System.

Click to download the Delphi source code & executable file: • Extract the file to any folder • You can change the host (router IP) & port in the setting.txt file to match with your router settings. Download gta v apk data mobile. • Run Arduino.exe How to use the Arduino Control System When the program is loaded, it read the status from Arduino & display the output to the screen. If the output is ON then a green box is show, in the other hand, a red box is show. • Click on the buttons (1-8) to toggle the output from ON to OFF or from OFF to ON • Click on Off All to turn off all output • Click on On All to turn on all output.