OS: Manjaro XFCE 22.0.0
Kernel 5.15.89-1
Arduino IDE 1.8.19
Hello,
it is claimed that to run the Arduino IDE, it is necessary to install driver for USB to serial communication according to the board chip, namely CP2102 with link to driver:
Very well.
After downloading the driver tar file, I created a folder “driver” in some directory, untar the files into it
And start to read the release note file, which states:
This driver was tested on Linux 5.4.0 kernel (Ubuntu 18.04.5 LTS) only
but it should work with other versions of Linux kernel as well.
Linux kernel also has a default cp210x driver which is maintained at www.kernel.org.
It is recommended to use the driver there that matches your specific kernel version.
The bundle contains:
- cp210x.c
- Makefile
- cp210x_gpio_example.c
- cp210x_gpio_example_gpiolib.c
- build.sh
- CP210x_VCP_Linux_4.x_Release_Notes.txt
Build instrutions:
Ubuntu:
- make ( your cp210x driver )
- cp cp210x.ko to /lib/modules//kernel/drivers/usb/serial
- insmod /lib/modules/<kernel-version/kernel/drivers/usb/serial/usbserial.ko
- insmod cp210x.ko
OK.
I don’t understand why with ESP8266 board which is also having cp210x chip I can compile, but not with ESP32.
Anyway, I opened a terminal window and typed: make cp210x, here’s the console’s output
$ make cp210x
cc cp210x.c -o cp210x
cp210x.c:14:10: erreur fatale: linux/slab.h : Aucun fichier ou dossier de ce type
14 | #include <linux/slab.h>
| ^~~~~~~~~~~~~~
compilation terminée.
make: *** [: cp210x] Error 1
[xf@xf22 driver]$
Not familiar, with such kind of issue, I’m stuck for help.
Is the problem really the driver, especially if there is one in the kernel and it works with ESP8266?
Aka, WHAT’S THE ROOT CAUSE OF THE PROBLEM, really the driver??
The initial issue being:
In ArduinoIDE 1.8.19
File>Preferences>Additionnal Boards Manager URL
https://arduino.esp8266.com/stable/package_esp8266com_index.json, https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Installed ESP32
Tools Board:
Tried first: ESP32 DEV MODULE
2nd try: DOIT ESP32 DEV KIT v1
Both lead to same error:
Traceback (most recent call last):
File “/home/xf/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool.py”, line 31, in
import esptool
File “/home/xf/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/init.py”, line 42, in
from esptool.cmds import (
File “/home/xf/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/cmds.py”, line 14, in
from .bin_image import ELFFile, ImageSegment, LoadFirmwareImage
File “/home/xf/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/bin_image.py”, line 14, in
from .loader import ESPLoader
File “/home/xf/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/loader.py”, line 21, in
** import serial**
ModuleNotFoundError: No module named ‘serial’
exit status 1
Error compiling for board ESP32 Dev Module.
And ESP32 DevKitC board manual states:
“In order to use ESP32 Dev Kit C V2 with Arduino IDE, follow few easy
steps. Before setting the Arduino IDE, the driver for the USB to Serial
communication has to be installed. If the driver is not installed automatically,
there is a support page that contains the drivers for Windows/Mac or Linux
and can be chosen depending on which one is used. Drivers can be
downloaded from the following link.”
Thanks