Help - Search - Members - Calendar
Full Version: Microcontrollers (Arduino, MicroPython, etc) via USB serial ?
OESF Portables Forum > Model Specific Forums > Gemini PDA > Gemini PDA - Linux OS
rcolistete
I'd to like to use Debian on Gemini to do microcontrollers development using USB cable (USB serial interface) to run Arduino IDE, MicroPython (via screen, rshell, etc). They use USB serial communication.

After installing the modular Linux kernel and extra module for the Gemini PDA with USB serial drivers, optimizatons, etc, from :
PL2303 serial adapter drivers?
http://www.mygnu.de/index.php/2018/07/impr...the-gemini-pda/
my microcontrollers (ESP8266, BC Micro:bit, Arduino Nano, etc) are recognized as /dev/ttyACM0 or /dev/ttyUSB0, but "screen" doesn't work (closes connection after starting) and Arduino IDE doesn't show any serial port.

(2018/08/21) : SOLUTION FOUND : solution is not only to add gemini user to dialout group (it was already becuase gemini is the unique user), but also to change the group of the tty devices to dialout (it is not done automatically like other Linux) :
CODE
$ sudo usermod -a -G dialout gemini
$ sudo chgrp dialout /dev/ttyACM0
$ sudo chgrp dialout /dev/ttyUSB0

Repeat for any other USB serial tty port (USB1 for a 2nd microcontroller, etc).

Tested with :
- Arduino IDE (v1.8.5 installed using Flatpak, see other topic) with ESP8266, worked well, only some large menu/dialog fonts.
- rshell or screen connecting Pyboard with MicroPython, 100% ok !

Important : the microcontrollers were connected with microUSB & USB-A cable to a USB-C -> USB-A hub in the left port of Gemini.
Murple2
QUOTE(rcolistete @ Aug 18 2018, 05:13 PM) *
I'd to like to use Debian on Gemini to do microcontrollers development using USB cable (USB serial interface) to run Arduino IDE, MicroPython (via screen, rshell, etc). They use USB serial communication.

After installing the modular Linux kernel and extra module for the Gemini PDA with USB serial drivers, optimizatons, etc, from :
PL2303 serial adapter drivers?
http://www.mygnu.de/index.php/2018/07/impr...the-gemini-pda/
my microcontrollers (ESP8266, BC Micro:bit, Arduino Nano, etc) are recognized as /dev/ttyACM0 or /dev/ttyUSB0, but "screen" doesn't work (closes connection after starting) and Arduino IDE doesn't show any serial port.

Any hints ?

PS : this posts was deleted by error, then I posted it again.


Does your user have permission to use serial? On Arch Linux I have to add myself to the uucp group, but on Debian I think it is the [b]dialout[\b] group. Maybe a Debian person can confirm?

Anyway the command would be something like
CODE
usermod -a -G dialout [i]yourusername[/i]
rcolistete
QUOTE(Murple2 @ Aug 21 2018, 04:48 AM) *
Does your user have permission to use serial? On Arch Linux I have to add myself to the uucp group, but on Debian I think it is the [b]dialout[\b] group. Maybe a Debian person can confirm?

Anyway the command would be something like
CODE
usermod -a -G dialout [i]yourusername[/i]

Thanks, it is not only to add gemini user to dialout (it was already), but to add the dialout grupo to the usb-serial device files (/dev/ttyACM0, /dev/ttyUSB0, etc), see the 1st post modified with the solution.
rcolistete
After the configuration cited in the 1st post, some useful CLI and GUI usb-serial tools that I use with my MicroPython boards (Pyboard, ESP8266, BBC Micro:bit, LoPy, ESP32, etc) :

- screen (terminal serial) :
$ sudo apt-get install screen

- rshell (Remote MicroPytyhon shell) :
$ pip3 install rshell

- ESPTool to install MicroPython firmware on ESP8266 and ESP32 :
$ pip install esptool

- Ampy (Adafruit MicroPython Tool) :
$ pip install adafruit-ampy

- uflash and ufs for MicroPython on BBC Micro:bit :
$ pip install uflash microfs

- Mu Editor for MicroPython on BBC Micro:bit, CircuitPython on Adafruit boards, Pygame Zero, Python3, follow :
"How to install Mu with Python packaging on Windows, OSX and Linux"
$ pip3 install mu-editor
but it has dependencies problems with PyQt5 on Debian @ Gemini, so it doesn't install.
rcolistete
If screen, rshell, etc, don't work, then use "sudo" before these commands.

I don't know the reason, even after the "usermod" and "chgrp", in the last months I have to use "sudo", while it wasn't needed in August.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.