USB OTG Serial Port
Hi,
I would like to get a USB to serial adapter to work on my Xperia X. Basically I'd love to be able to program microcontrollers with PlatformIO.
When I plug it in, dmesg -ew
says
[ +0.230771] usb 1-1: new full-speed USB device number 4 using msm_hsusb_host [ +0.164788] usb 1-1: New USB device found, idVendor=0403, idProduct=6001 [ +0.000027] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ +0.000012] usb 1-1: Product: FT232R USB UART [ +0.000012] usb 1-1: Manufacturer: FTDI [ +0.000011] usb 1-1: SerialNumber: hedut1 [ +0.018256] platform 184c030.qcom,gdsc: Driver gdsc requests probe deferral
However, on a normal Linux machine this reads
[Okt15 16:08] usb 1-3: new full-speed USB device number 11 using xhci_hcd [ +0,155261] usb 1-3: New USB device found, idVendor=0403, idProduct=6001 [ +0,000007] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ +0,000004] usb 1-3: Product: FT232R USB UART [ +0,000004] usb 1-3: Manufacturer: FTDI [ +0,000003] usb 1-3: SerialNumber: hedut1 [ +0,034657] usbcore: registered new interface driver usbserial_generic [ +0,001045] usbserial: USB Serial support registered for generic [ +0,005617] usbcore: registered new interface driver ftdi_sio [ +0,000024] usbserial: USB Serial support registered for FTDI USB Serial Device [ +0,000099] ftdi_sio 1-3:1.0: FTDI USB Serial Device converter detected [ +0,001101] usb 1-3: Detected FT232RL [ +0,000287] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
It seems that SailfishOS does not assign a serial port to the device. Wild guess is that the usbserial
driver is not loaded. I really have no ideas how drivers work in Linux.
Any ideas how to get serial ports to work under SailfishOS?
Cheers,
Yann
If I know correctly the loadable kernel module is not enabled in the X's kernel. And obviously the ftdi_sio and usbserial modules are not present on the device.
martonmiklos ( 2019-10-16 11:02:23 +0200 )editSo it's a kernel issue and without a kernel modification there's no luck?
NobodyInPerson ( 2019-10-16 11:03:29 +0200 )editYou need to build a custom kernel (either with loadable module support or compile in the necessary modules). It might be useful to ask on the Community meeting about what is the reason of the disabling of the loadable module support on the Xperia X, and would it be possible to ship kernel with loadable module support.
martonmiklos ( 2019-10-16 11:15:54 +0200 )editWhat's USB-OTG got to do with programming microcontrollers?
I have several types of microcontrollers and I sometimes use Platformio (windows) but generally I use Arduino IDE (windows) connected via microusb.
What am I missing from your question?, are you saying there is a mobile version of Platformio?
Spam Hunter ( 2019-10-17 01:08:41 +0200 )edit@Edz You can install PlatformIO as any other Python package via
NobodyInPerson ( 2019-10-17 05:36:03 +0200 )editpython3 -m pip install --user platformio
. Thepio
command works fine. Compilation of sketches still fails due to some missing compilers I guess. And the USB OTG serial functionality is of course needed to flash or interface the microcontrollers.