ftdi USB to serial problem

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
patTmint
Level 1
Level 1
Posts: 2
Joined: Mon Dec 06, 2021 4:21 pm

ftdi USB to serial problem

Post by patTmint »

Help, anyone please...I've been at this for days on end. I have Bitscope-dso (digital signal Oscilliscope module) that has an ftdi_sio built into it.
It works perfectly under Microsoft Windows but I have tried several versions of LinuxMint and all have the same problem.
Namely:- "lsmod | grep ftdi_sio" does not find usbcore and so the bitscope software although it loads ok it doesn't get any input from the module.

If these three modules (ftdi_sio, usbserial and usbcore) are not loaded on your system you may need to upgrade your kernel or configure your system to install the ftdi_sio driver. See the driver home page for full details.

I am not a Linux expert, hence the call for help.

This is brief system info, full info at the bottom of this post.

Code: Select all

System:    Kernel: 5.4.0-91-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.7 
           wm: muffin dm: LightDM Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Bitscope note:
Check the USB Driver exists on your system.
If nothing happens when you plug in your BitScope the driver may not be installed. This is very rare these days but you can check (while BitScope is plugged in) with the following command:

Code: Select all

p@p-Latitude-E4310:~$ lsmod | grep ftdi_sio
ftdi_sio               61440  0
usbserial              53248  1 ftdi_sio

Bitscope note:
Check there are no conflicting packages.
There are some broken packages in the Linux ecosystem which can cause problems. One we know of is brltty.
NOTE: I ALREADY REMOVED BRLTTY USING:- "$ sudo apt-get remove brltty" AND REBOOTED, STILL SAME RESULT "NO USBCORE" !!

When you connect your BitScope if the log reports something like this:

Code: Select all

p@p-Latitude-E4310:~$ tail -f /var/log/syslog
Dec  6 20:32:05 p-Latitude-E4310 kernel: [ 3287.528811] usb 2-1.3: Product: FT245R USB FIFO
Dec  6 20:32:05 p-Latitude-E4310 kernel: [ 3287.528813] usb 2-1.3: Manufacturer: FTDI
Dec  6 20:32:05 p-Latitude-E4310 kernel: [ 3287.528815] usb 2-1.3: SerialNumber: A9082TEX
Dec  6 20:32:05 p-Latitude-E4310 kernel: [ 3287.531688] ftdi_sio 2-1.3:1.0: FTDI USB Serial Device converter detected
Dec  6 20:32:05 p-Latitude-E4310 kernel: [ 3287.531739] usb 2-1.3: Detected FT232RL
Dec  6 20:32:05 p-Latitude-E4310 kernel: [ 3287.532527] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
Dec  6 20:32:05 p-Latitude-E4310 mtp-probe: checking bus 2, device 13: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3"
Dec  6 20:32:05 p-Latitude-E4310 mtp-probe: bus: 2, device: 13 was not an MTP device
Dec  6 20:32:05 p-Latitude-E4310 mtp-probe: checking bus 2, device 13: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3"
Dec  6 20:32:05 p-Latitude-E4310 mtp-probe: bus: 2, device: 13 was not an MTP device
^C
Bitscope note:
Check you have permission to access the device.
With some distributions you may need to add your user to the dialout group if this is not done automatically. This applies to some recent linux distributions including Ubuntu which have changed the permissions for ordinary users (i.e. only the adminstrator user has access by default).

Assuming your BitScope appears at /dev/ttyUSB0 you can check the permissions from a terminal as follows:

Code: Select all

p@p-Latitude-E4310:~$ 
p@p-Latitude-E4310:~$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Dec  6 20:32 /dev/ttyUSB0

That is, the group permissions should be dialout. Check your login permissions include dialout, type:

Code: Select all

p@p-Latitude-E4310:~$ groups
p adm cdrom sudo dip plugdev lpadmin sambashare
p@p-Latitude-E4310:~$ 
Bitscope note:
If dialout is not listed you will need to add it to your login which can be done at the command line as:

Code: Select all

p@p-Latitude-E4310:~$ sudo adduser p dialout
[sudo] password for p:  
Adding user `p' to group `dialout' ...
Adding user p to group dialout
Done.
p@p-Latitude-E4310:~$ 
Bitscope note:
Check there are no stale lock files.
The lock file is a mechanism that restricts access to BitScope to one application at a time. The lock file is created by the app when the app starts and deleted when it terminates. If an app terminates abnormally or is manually killed the lock file may remain in place preventing further access to the device. You can check this as follows:

Code: Select all

p@p-Latitude-E4310:~$ ls /var/lock
asound.state.lock  lvm  subsys
p@p-Latitude-E4310:~$ 


------------------------------------------------------------------------------------------------------

Code: Select all

System:    Kernel: 5.4.0-91-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.7 
           wm: muffin dm: LightDM Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: Dell product: Latitude E4310 v: 0001 serial: <filter> Chassis: 
           type: 9 serial: <filter> 
           Mobo: Dell model: 0D8H24 v: A00 serial: <filter> BIOS: Dell v: A15 date: 05/12/2017 
CPU:       Topology: Dual Core model: Intel Core i5 M 560 bits: 64 type: MT MCP arch: Nehalem 
           rev: 5 L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21280 
           Speed: 1346 MHz min/max: 1199/2667 MHz Core speeds (MHz): 1: 1305 2: 1337 3: 1282 
           4: 1224 
Graphics:  Device-1: Intel Core Processor Integrated Graphics vendor: Dell driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:0046 
           Display: x11 server: X.Org 1.20.11 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics (ILK) v: 2.1 Mesa 21.0.3 
           direct render: Yes 
Audio:     Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Dell 
           driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:3b57 
           Sound Server: ALSA v: k5.4.0-91-generic 
Network:   Device-1: Intel 82577LM Gigabit Network vendor: Dell driver: e1000e v: 3.2.6-k 
           port: 6040 bus ID: 00:19.0 chip ID: 8086:10ea 
           IF: eno1 state: down mac: <filter> 
           Device-2: Broadcom and subsidiaries BCM43224 802.11a/b/g/n 
           vendor: Dell Wireless 1520 Half-size Mini PCIe Card driver: wl v: kernel port: 6000 
           bus ID: 02:00.0 chip ID: 14e4:4353 
           IF: wlp2s0 state: up mac: <filter> 
Drives:    Local Storage: total: 232.89 GiB used: 9.75 GiB (4.2%) 
           ID-1: /dev/sda vendor: Toshiba model: MK2561GSYN size: 232.89 GiB speed: 3.0 Gb/s 
           serial: <filter> 
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 
           bus ID: 00:1f.2 chip ID: 8086.282a 
Partition: ID-1: / size: 227.74 GiB used: 9.75 GiB (4.3%) fs: ext4 dev: /dev/sda5 
Sensors:   System Temperatures: cpu: 59.0 C mobo: N/A sodimm: 45.0 C 
           Fan Speeds (RPM): cpu: 0 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http: //mirror6.layerjet.com/linuxmint/packages uma main upstream import backport
           2: deb http: //ftp.rezopole.net/ubuntu focal main restricted universe multiverse
           3: deb http: //ftp.rezopole.net/ubuntu focal-updates main restricted universe multiverse
           4: deb http: //ftp.rezopole.net/ubuntu focal-backports main restricted universe multiverse
           5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http: //archive.canonical.com/ubuntu/ focal partner
Info:      Processes: 243 Uptime: 1h 12m Memory: 3.71 GiB used: 1.26 GiB (33.9%) Init: systemd 
           v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client 
           inxi: 3.0.38
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
patTmint
Level 1
Level 1
Posts: 2
Joined: Mon Dec 06, 2021 4:21 pm

Re: ftdi USB to serial problem

Post by patTmint »

Fixed (eventually) by myself, this may help others....
Using Bitscope-dso with Linux Mint 20.2 Cinnamon (and probably any other versions too).

With the Bitscope module plugged in do this...
p@p-Latitude-E4310:~$ sudo -i
[sudo] password for p:
root@p-Latitude-E4310:~# modprobe ftdi_sio
root@p-Latitude-E4310:~# echo 0403 6001 >/sys/bus/usb-serial/drivers/ftdi_sio/new_id
root@p-Latitude-E4310:~#

Load Bitscope
(If first time to run it then click Setup and set the Conection as USB /dev/ttyUSB0) then click OK
Click on Power
To test it is working put a wire link between CHA pin and L4 pin (the L4 pin can be used as a waveform generator)
On Bitscope click on WAVE and lights should begin to flash on the module.
Bitscope appears to default to a 4kHz waveform generator so set the Timescale to 200us/Div and you should see the sinewave on screen.

The Bitscope program can be closed and reopened and it will still work as long as the module is still plugged in.
So to re-interate "the module MUST be plugged in prior to loading Bitscope and clicking the power button"


IMPORTANT:- You will still need to have uninstalled BRLTTY

Bitscope note:
Check there are no conflicting packages.
There are some broken packages in the Linux ecosystem which can cause problems. One we know of is brltty.
REMOVE BRLTTY USING:- "$ sudo apt-get remove brltty" AND REBOOT.
Locked

Return to “Hardware Support”