Hi,
I solved a problem on communication between DT80g (and likely also other DTx) and Linux OS using standard serial terminal. You can send text commands and receive output in the same way as with DeTransfer or in dEX command window but conveniently from Linux environment. This solution was tested on Ubuntu 16.04 but should work on other Linux-based systems as well. Here are the details.
Suppose you have a standard serial cable USB type B and USB type A supplied with DTx. Once you plug this cable into your computer with running DTx, it recognizes the device. You can find idVendor and idProduct by entering
dmesg
and get something like
Aug 2 10:22:41 kostice kernel: [ 1122.612334] usb 2-1.3: New USB device found, idVendor=0403, idProduct=d000
Now we need to assign a driver to this device. My DT80g uses standard FTDI chip (and I assume this is in other DTx as well) but idProduct is changed so it is not recognized automatically by standard kernel modul ftdi_sio which is a policy of those manufactureres. The solution is assigning kernel module straight to the DTx device's chip. Just make sure you have installed libftdi from a package manager which provides that module ftdi_sio. To inject idVendor and idProduct to the module (driver), enter with your idVendor and idProduct
echo "0403 d000" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id
Now plug again and check the status
dmesg
Aug 2 10:22:42 kostice kernel: [ 1123.128609] usb 2-1.3: New USB device found, idVendor=0403, idProduct=d000
Aug 2 10:22:42 kostice kernel: [ 1123.128618] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 2 10:22:42 kostice kernel: [ 1123.128625] usb 2-1.3: Product: DT80G-4 112056
Aug 2 10:22:42 kostice kernel: [ 1123.128630] usb 2-1.3: Manufacturer: dataTaker
Aug 2 10:22:42 kostice kernel: [ 1123.132285] ftdi_sio 2-1.3:1.0: FTDI USB Serial Device converter detected
Aug 2 10:22:42 kostice kernel: [ 1123.132355] usb 2-1.3: Detected FT232BM
Aug 2 10:22:42 kostice kernel: [ 1123.133105] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
Congratulation, your DTx is attached to /dev/ttyUSB0. To make ftdi_sio loading automatic, add the following file /etc/udev/rules.d/99-ftdi.rules with the content
ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="d000", RUN+="/sbin/modprobe ftdi_sio", RUN+="/bin/sh -c 'echo 0403 d000 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"
and reload with
udevadm control --reload
You can check that unplug/plug loads ftdi_sio module every time using dmesg. Further details can be found
http://www.leniwiec.org/en/2014/06/25/ubuntu-14-04lts-how-to-pass-id-vendor-and-id-product-to-ftdi_sio-driver/ or https://unix.stackexchange.com/questions/67936/attaching-usb-serial-device-with-custom-pid-to-ttyusb0-on-embedded
The second part attaches serial terminal to /dev/ttyUSB0. I like CuteCom http://cutecom.sourceforge.net/ which is installable from a package manager. You need to enter only location /dev/ttyUSB0, hit "Open device". You may enter commands and receive outputs in the same way as in DeTransfer or in dEX command window. Here is a screenshot
It is also possible to upload a text file with a DTx script, just to make sure you choose "Plain". Enjoy
Hi,
I solved a problem on communication between DT80g (and likely also other DTx) and Linux OS using standard serial terminal. You can send text commands and receive output in the same way as with DeTransfer or in dEX command window but conveniently from Linux environment. This solution was tested on Ubuntu 16.04 but should work on other Linux-based systems as well. Here are the details.
Suppose you have a standard serial cable USB type B and USB type A supplied with DTx. Once you plug this cable into your computer with running DTx, it recognizes the device. You can find idVendor and idProduct by entering
**_dmesg_**
and get something like
**_Aug 2 10:22:41 kostice kernel: [ 1122.612334] usb 2-1.3: New USB device found, idVendor=0403, idProduct=d000_**
Now we need to assign a driver to this device. My DT80g uses standard FTDI chip (and I assume this is in other DTx as well) but idProduct is changed so it is not recognized automatically by standard kernel modul ftdi_sio which is a policy of those manufactureres. The solution is assigning kernel module straight to the DTx device's chip. Just make sure you have installed libftdi from a package manager which provides that module ftdi_sio. To inject idVendor and idProduct to the module (driver), enter with your idVendor and idProduct
_**echo "0403 d000" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id**_
Now plug again and check the status
_**dmesg**_
_**Aug 2 10:22:42 kostice kernel: [ 1123.128609] usb 2-1.3: New USB device found, idVendor=0403, idProduct=d000
Aug 2 10:22:42 kostice kernel: [ 1123.128618] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 2 10:22:42 kostice kernel: [ 1123.128625] usb 2-1.3: Product: DT80G-4 112056
Aug 2 10:22:42 kostice kernel: [ 1123.128630] usb 2-1.3: Manufacturer: dataTaker
Aug 2 10:22:42 kostice kernel: [ 1123.132285] ftdi_sio 2-1.3:1.0: FTDI USB Serial Device converter detected
Aug 2 10:22:42 kostice kernel: [ 1123.132355] usb 2-1.3: Detected FT232BM
Aug 2 10:22:42 kostice kernel: [ 1123.133105] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB0**_
Congratulation, your DTx is attached to /dev/ttyUSB0. To make ftdi_sio loading automatic, add the following file /etc/udev/rules.d/99-ftdi.rules with the content
_**ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="d000", RUN+="/sbin/modprobe ftdi_sio", RUN+="/bin/sh -c 'echo 0403 d000 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"**_
and reload with
_**udevadm control --reload**_
You can check that unplug/plug loads ftdi_sio module every time using dmesg. Further details can be found
http://www.leniwiec.org/en/2014/06/25/ubuntu-14-04lts-how-to-pass-id-vendor-and-id-product-to-ftdi_sio-driver/ or https://unix.stackexchange.com/questions/67936/attaching-usb-serial-device-with-custom-pid-to-ttyusb0-on-embedded
The second part attaches serial terminal to /dev/ttyUSB0. I like CuteCom http://cutecom.sourceforge.net/ which is installable from a package manager. You need to enter only location /dev/ttyUSB0, hit "Open device". You may enter commands and receive outputs in the same way as in DeTransfer or in dEX command window. Here is a screenshot
![5cb0a655e013d](serve/attachment&path=5cb0a655e013d)
It is also possible to upload a text file with a DTx script, just to make sure you choose "Plain". Enjoy :smile: