Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTDI USB device detected but ftdi_sio driver not loaded #11346

Open
1 of 2 tasks
Broussailles opened this issue Mar 22, 2024 · 3 comments
Open
1 of 2 tasks

FTDI USB device detected but ftdi_sio driver not loaded #11346

Broussailles opened this issue Mar 22, 2024 · 3 comments
Labels
kconfig linux kernel configuration

Comments

@Broussailles
Copy link

Windows Version

Microsoft Windows [version 10.0.22621.1848]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-microsoft-standard-WSL2

Distro Version

Debian GNU/Linux 12 (bookworm)

Other Software

usbipd-win 4.1.0+52.Branch.master.Sha.b0b7589d2dc4481b1af481787d6d773f46d0758

Repro Steps

FTDI USB Serial Device (TTL-232RG) connected , Shared and Attached
image

Expected Behavior

New USB device detected by Linux Kernel,
FTD driver loaded
/dev/ttyUSB0 node device created

Following lines expected in kernel messages:
(Older version of WSL)

Mar 4 14:33:36 GOR-LAP-27 kernel: vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3)
Mar 4 14:33:36 GOR-LAP-27 kernel: vhci_hcd vhci_hcd.0: devid(458754) speed(2) speed_str(full-speed)
Mar 4 14:33:36 GOR-LAP-27 kernel: vhci_hcd vhci_hcd.0: Device attached
Mar 4 14:33:37 GOR-LAP-27 kernel: vhci_hcd: vhci_device speed not set
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: new full-speed USB device number 4 using vhci_hcd
Mar 4 14:33:37 GOR-LAP-27 kernel: vhci_hcd: vhci_device speed not set
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: SetAddress Request (4) to port 0
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: Product: TTL232RG-VREG3V3
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: Manufacturer: FTDI
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: SerialNumber: FT4M5QPB
Mar 4 14:33:37 GOR-LAP-27 kernel: ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: Detected FT232RL
Mar 4 14:33:37 GOR-LAP-27 kernel: usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

Actual Behavior

Current lines observed in kernel messages
[ 517.212711] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3)
[ 517.214455] vhci_hcd vhci_hcd.0: devid(458753) speed(2) speed_str(full-speed)
[ 517.215864] vhci_hcd vhci_hcd.0: Device attached
[ 517.496755] vhci_hcd: vhci_device speed not set
[ 517.566815] usb 1-1: new full-speed USB device number 2 using vhci_hcd
[ 517.647031] vhci_hcd: vhci_device speed not set
[ 517.716812] usb 1-1: SetAddress Request (2) to port 0
[ 517.760078] usb 1-1: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[ 517.761869] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 517.762593] usb 1-1: Product: TTL232RG-VREG3V3
[ 517.763071] usb 1-1: Manufacturer: FTDI
[ 517.763387] usb 1-1: SerialNumber: FT4M5QPB
@paudenard@GOR-LAP-27:/var/log$

Diagnostic Logs

lsusb output:
image

According to /proc/config.gz , Kernel has been built with FTDI_SIO Options
image

Kernel Object present in /usr/lib/modules
image

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue OneBlue added the kconfig linux kernel configuration label Mar 22, 2024
@andywong36
Copy link

andywong36 commented Mar 26, 2024

I am running into the same issue with the same hardware.

The only difference is the distro - Ubuntu 22.04.4 LTS.

@Broussailles Do you have the linux kernel version you were using on March 4th?

Edit: just enable the FTDI kernel module

sudo modprobe ftdi_sio

@ralflang
Copy link

ralflang commented Apr 2, 2024

For some reason my 5.15 kernel had ftdi_sio as a module rather than a builtin.
And it seems that is the official build config for 5.15 https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-5.15.y/arch/x86/configs/config-wsl#L2769C1-L2770C1

CONFIG_USB_SERIAL_FTDI_SIO=m

But 6.1 fixes that already
https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.1.y/arch/x86/configs/config-wsl#L2858C1-L2858C27

CONFIG_USB_SERIAL_FTDI_SIO=y

Detailed walk through of my steps, including a probably unnecessary --set-val on the FTDI driver documented here:

https://www.ralf-lang.de/2024/04/02/run-ftdi-usb-devices-on-windows-10-11-wsl2/

git clone https://github.com/microsoft/WSL2-Linux-Kernel.git --depth=1 -b linux-msft-wsl-6.1.y
sudo apt update
sudo apt -y install build-essential flex bison libssl-dev libelf-dev bc 
sudo apt -y install python3 pahole
cd WSL2-Linux-Kernel
## This line turns the FTDI driver from disabled or module to builtin
./scripts/config --file Microsoft/config-wsl --set-val CONFIG_USB_SERIAL_FTDI_SIO y
make -j$(nproc) KCONFIG_CONFIG=Microsoft/config-wsl
sudo make modules_install headers_install
## Use another target directory if you don't want the kernel in the root of C:\
cp arch/x86/boot/bzImage /mnt/c/bzImage-6.1
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kconfig linux kernel configuration
Projects
None yet
Development

No branches or pull requests

4 participants