Connecting esp32 to khadas via usb

hi, i am trying to connect my esp32 via USB to use the Serial communication. On my laptop, when connecting esp32.

Bus 001 Device 012: ID 10c4:ea60 Silicon Labs CP210x UART Bridge


[ 7796.158009] usb 1-2.3: new full-speed USB device number 13 using xhci_hcd
[ 7796.283361] usb 1-2.3: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 7796.283367] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7796.283370] usb 1-2.3: Product: CP2102 USB to UART Bridge Controller
[ 7796.283374] usb 1-2.3: Manufacturer: Silicon Labs
[ 7796.283376] usb 1-2.3: SerialNumber: 0001
[ 7796.298352] cp210x 1-2.3:1.0: cp210x converter detected
[ 7796.300730] usb 1-2.3: cp210x converter now attached to ttyUSB0

All good. BUT connecting to VIM I have this output lsusb:
...Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light

dmesg only output:
... usb 1-1.4: new full-speed USB device number 12 using xhci-hdc

How can I use my USB serial with Khadas VIM, it’s not listed in /dev/ttyUSB*. What are my options?

u need the driver for cp210x

I think u need to recompile the kernel to include the driver

Included in the kernel since v2.6.12. Maybe I am lucky and it’s a module not loaded? I really don’t want to recompile the kernel… Here’s the file. Is there any alternative?

the thing is we can exclude certain module while building the kernel to improve boot times and save space… in this case since cp210x is not used as much as ftdi i think it might be excluded… what image are you using i will try to build you a kernel with the driver

@11h11 you could also try communicating via the UART pins… (not Linux debug/UART)
maybe @Archangel1235 can verify it…

That would be wicked! But the “bad” news is that I am using VIM 1.2 with Kernel 4.9.40 #2 SMP PREEMPT on Ubuntu 16.04.6 LTS. Not sure if I’m answering your question.

@Archangel1235 would it be possible to only build cp210x driver and load it via modprobe -r?

It is possible…

@Archangel1235 I think I need usbserial too, is it included? I am reading about the fenix script, do I need that to build the driver? Any tuto to build only a driver and load it via modprobe?

I am ready to give it a go, found this tutorial:
BUT I cannot find linux-headers-4.9.40 (apt search only return headers for 4.8.x)

I see in /boot/config-4-9-40 that CONFIG_USB_SERIAL=y - cool.
but sadly CP210X is not set

@Archangel1235 Thank you for offering to help, two thumbs up! I think I will use another micro-controller (teensy with USB-midi). Easier that way… Thanks again.

were you trying to make a MIDI device ?

Yes, I am glueing a khadas vim inside a generic midi keyboard and adding sensors to it (10 adc - 10 digitals). Teensy 3.2 have USB-midi built-in, but would prefer to have the full 14bit resolution inside pure data so will see if teensy Serial is supported on vim kernel.

1 Like

give me 12 hrs I will compile cp210x drivers… Have been busy with other works sorry…

VIM1 kernel 4.9 right…?


Nice device…
no worries, @Archangel1235 I can do it in an hour or less…
My computer is free right now…

I just need the device no. (VIM1, VIM2, VIM3…)

For real, that would save me a lot of troubles…
Yes using VIM 1.2 with kernel 4.9.40

@11h11, ubuntu server, or which DE ?

I have a build of…

Ubuntu-server-4.9-focal-eMMC image made for you…

It’s weird, but the Module is already included…

should I continue the build… ?

Modprobe CP210X
or something like that work ?

1 Like

@Electr1 My installation is very old, a ROM downloaded on Khadas website a long time ago:
Ubuntu 16.04.6 LTS

For me config file in /boot show that CP210X is not set & modprobe the module doesn’t work (Cannot find this module).

maybe trying a newer ROM might work ?