FTDI FT232H not behaving as expected (not detected by Linux) - linux

I have written an application using the FT232h with libftd2xx.so.1.4.24 for GPIO assess. I had it running on two machines, a Linux openSUSE desktop and an openSUSE laptop. Both run the same kernel and both are Windows 10 boxes running VMware to give me the virtual openSUSE machines. For some reason it suddenly stopped working on the desktop. I have been using the same FTDI FT232H device on both machines.
On the laptop, the FTDI chip is detected. dmesg | grep -i usb says:
usb 2-1: New USB device found, idVendor=0403, idProduct=6014, etc.
On the laptop, lsusb says:
Bus 002 Device 004” ID 0x0403:6014 Future Technology Devices International. Ltd: FT232H
Single HS USB-UART/FIFO IC
This information does not appear on the desktop. The desktop does not seem to detect the FT232H.
On the laptop I do sudo modprobe -r ftdi_sio usbserial and then perform an FT_Open(0, &fthandle) in libftd2xx.so.1.4.24.
On the desktop, ftdi_sio is not loaded. When I try to FT_Open(0, &fthandle) it fails with FT_DEVICE_NOT_FOUND. It dose the same thing when I run my app as root.
What do I need to do to get my desktop to run my app again? I haven’t blacklisted anything, to my knowledge.
I’m really stuck! Please advise.

VMware may assign the USB to the host or to the guest. If the FT232H is plugged in but lsusb doesn't show the FT232H, then select VM -> Removable Devices -> Future Devices USB Serial Converter -> Connect (Disconnect from Host)
lsusb should now show the FT232H device and you should be able to invoke FT_Open on it.

Related

how to know if a USB device is plugged into the embedded Linux system

I'm new to the embedded Linux world. I'm using Nvidia Jetson Nano as my embedded SOC.
Now I need my application to do some specific thing, for example, show an icon, as long as a USB disk is plugged into the embedded board. How can I know if such a USB disk is plugged in?
I need to know the approach for knowing the as long as a USB disk is plugged in
You can check all USB devices that are plugged in with the commands :
$ lsusb
Or with the command :
$ ls /dev/ttyUSB
You could then check if one of the listed devices (/dev/ttyUSB0 for example) is in the list and do your action.
What programming language are you using for your application ? There must be libraries that can help you check easily if a USB is connected/disconnected

Enable mass storage and ethernet over USB or a terminal device function over USB in Kubos Linux

I've been trying to emulate the ethernet over USB functional or a terminal device over USB function in Kubos Linux (https://docs.kubos.com/1.21.0/index.html).
The version of linux kernel is 4.4.23. The Kubos Linux is deployed on beaglebone black and uses uboot to boot the linux. I have enabled CONFIG_USB_NET_DRIVERS in the linux-kubos.config which you can see here: https://github.com/kubos/kubos-linux-build/blob/master/board/kubos/beaglebone-black/linux-kubos.config. After this I compiled the linux and created a kubos-linux.img and aux-sd.img and flashed the SD card. I booted the board from SD card however, I still could not see the ethernet over USB emulation after the flash.
I use buildroot for compiling and building the kubos kernel and aux image in the vagrant VM in virtual box.
I wanted to know if I am missing some key information to add these functionalities and if there were any beaglebone black specific driver configuration I need to enable in kubos linux kernel?
At the moment, I use an FTDI cable to communicate with the board serially using minicom however, this is very slow and want to use ethernet over USB or terminal functionality to make this communication faster.

OpenWrt no dmesg/lsusb when usb hid device is attached

I am running OpenWrt on VirtualBox with host as Windows 10.
I have a USB - HID device which is attached to Windows host. I am making it available for the Guest OpenWrt. However, I don't see this in the OpenWrt. I don't see anything in the dmesg either.
I have also installed the kernel module for usb hid and its loaded.

MC7455 sierra wireless PCI not detected

Good day every body
I use MC7455 module in linux machine connected using PCI
but when i do : lspci , i didnt find it
and also with dmesg , it is not detected
Is this problem related to drivers missing ?
(For those wondering: This question is asking about the Sierra Wireless MC7455 LTE modem module)
Your modem card is a mini-PCI-e card, but that modem does not connect to the PCI bus. The mini-pci-e slot also connects to the USB bus. This modem card connects only to the USB bus, so it will not show up with lspci.
Instead is should show up as a USB device.
I have lots of experience with MC7304, assuming MC7455 works similar.
MC7455 has a miniPCIe interface, I assume your motherboard has such interface because you said the modem is connected. Have you installed SierraWireless driver? If not, Linux doesn't detect the modem. At least that's my case.
If you don't have a miniPCIe interface on the motherboard, you can use a miniPCIe to USB adaptor.
Once the modem is detected, for MC7304 at least, I can find modem in dmesg as well as by lspci.
Check this link: https://techship.com/faq/38/
I had exactly same issue with my Qotom Q355G4, the device was not detected at all. It was fixed by putting adhesive tape over pins #23, 25, 31, 33.

How can I prevent linux from initializing a USB HID device

I have a USB HID device that can work in two different modes. The selection of modes is based on the sequence of USB enumeration/initialization packets sent to it.
I am using a Raspberry Pi 3 running Raspbian, however I also see the same issue if I compile my code for my desktop Ubuntu distro.
The issue I have is that linux is recognizing the USB device as a HID device and then sending the sequence of commands that it deems necessary to start the device, and this works correctly and starts the device in "Mode 1".
However I need to start the device in "Mode 2" and to do this I need to send a slightly different set of enumeration/initialization commands.
I am new to linux but very experienced with LibUSB and LibUSBDotNet under windows and can get the behavior I desire under windows.
Windows has similar behaviour to linux in that it will enumerate, recognise the device as a USB HID device and then initialise it as it deems fit resulting in the device going into "Mode 1". To prevent windows doing this I can create a LibUSB filter driver for the device, which then replaces the default driver, so windows will now do the initial enumeration, realise that the VID and PID of the device are managed by the LibUSB filter driver (rather than the windows HID driver) and then stop enumeration/initialization - this allows my code to take over and complete the initialization into "Mode 2".
How can I stop Linux from fully enumerating/initializing this device (as I do with windows). Perhaps I need to do something with udev rules or something, but I would have no idea what as I am new to linux.
Any help greatly appreciated
you have right, you have to play with the udev rules.
First of all you have to identify your device. Find the idProduct and the idVendor of your device. You can use:
lsusb
Then in the rules.d folder (/etc/udev/rules.d) create a new file with the name:
10-my-usb.rules
In this file add this line
SUBSYSTEM=="usb",ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="XXXX", MODE="666", GROUP+="plugdev"
Replace the XXXX with the value you get before
Then restart your udev rules:
sudo udevadm trigger
Then unplug and replug normally you can use it

Resources