Can't type commands in MicroPython uart console


#1

I just received the full MAIX GO kit this weekend. I mounted it according to this tutorial youtube video

If I power on it and plug the USB cable on my debian computer I can see the UART interface in dmesg :

$ dmesg
[21758.478583] usb 3-2: new full-speed USB device number 4 using xhci_hcd
[21758.620109] usb 3-2: New USB device found, idVendor=c251, idProduct=f001
[21758.620113] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[21758.620116] usb 3-2: Product: CMSIS-DAP
[21758.620118] usb 3-2: Manufacturer: CMSIS-DAP by ARM
[21758.620119] usb 3-2: SerialNumber: 0001A0000000
[21758.620902] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
[21758.622685] hid-generic 0003:C251:F001.0006: hiddev0,hidraw3: USB HID v1.00 Device [CMSIS-DAP by ARM CMSIS-DAP] on usb-0000:00:14.0-2/input2

I managed to open the terminal with ckermit And see the starting prompt :

$ kermit
C-Kermit 9.0.302 OPEN SOURCE:, 20 Aug 2011, for Linux+SSL+KRB5 (64-bit)
 Copyright (C) 1985, 2011,
  Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/fabien/) C-Kermit>c
Connecting to /dev/ttyACM0, speed 115200
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

 __  __              _____  __   __  _____   __     __ 
|  \/  |     /\     |_   _| \ \ / / |  __ \  \ \   / /
| \  / |    /  \      | |    \ V /  | |__) |  \ \_/ / 
| |\/| |   / /\ \     | |     > <   |  ___/    \   /  
| |  | |  / ____ \   _| |_   / . \  | |         | |   
|_|  |_| /_/    \_\ |_____| /_/ \_\ |_|         |_|
Official Site:http://www.sipeed.com/
Wiki:http://maixpy.sipeed.com/
[MAIXPY]Pll0:freq:320666666
[MAIXPY]Pll1:freq:159714285
[MAIXPY]Flash:0xc8:0x17
[MAIXPY]:Spiffs Mount successful 
[MAIXPY]LCD:init

MicroPython 3b5c45649-dirty on 2018-11-15; Sipeed_M1 with kendryte-k210
Type "help()" for more information.
>>> 

But I can’t type anything in that console. It like TX works but not RX.

Does somebody had a similar bug ?


#2

Michael Wilkinson said that on indiegogo comments :

I’ve received my ALL IN ONE as well today. Quick tip: If you are having trouble connecting to the REPL out of box over serial, make sure you are using 115200 baud and hardware flow control or you’ll get nothing. From the schematic it appears that DTR and RTS are wired to BOOT and RST and so must be actively controlled. Might only be a thing on the MAIX GO boards which have a dedicated STM32 JTAG/UART bridge chip on them.

Does anyone has an example to configure uart terminal for MAIX GO communication under Linux ?

I’m using ckermit with following configuration file :

set line /dev/ttyACM0
set speed 115200
set carrier-watch off
set flow-control none
set handshake none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
set transmit linefeed on

Thanks


#3

I’m having exactly the same problem. Only it sometimes works. On the advice of some kind soul, I reflashed the firmware with a more up to date version and that worked for 5 minutes. Then back to nothing.
Also I’ve got the additional problem of the screen turning off whenever the serial connection is made. That is, not when it’s pluggedin, but when I start communicating.

Trying on different computers gives different results. I think this board has problems. Maybe I got a bad one.

Sometimes the board powers up, with the Welcome to MaixPy, and then the screen goes immediately dark. It’s almost like the board doesn’t have quite enough power. Or there is an intermittent short.

Any help is appreciated.


#4

Hi Chris,

It’s not only your board, I have exactly the same problem !


新手贴,请教大神
#5

Same problem here. When (on Linux) I used kflash.py, which uses serial.tools.miniterm, you can type commands after flashing. I made the following brief script to use miniterm without flashing:

import serial.tools.miniterm
serial.tools.miniterm.main(default_port=’/dev/ttyACM0’, default_baudrate=115200, default_dtr=False, default_rts=False)


MAIX Go STM32 Firmware Update
#6

Thanks Sentry, this python script works for me !


#7

Thank you. This worked for me as well.


#8

@udif
In the script I use ‘/dev/ttyACM0’ because on my computer the Maix Go board just happend to always be connected to that tty device. This is not guaranteed, however. I think this can be fixed via udev rules. This page describes a way to always have the board connect to the same linux tty device (sort of, anyway).
Luckily the Maix Go seems to do a soft reset so the connection with the computer stays in place. On other MCU boards the tty device often becomes a moving target when resetting: /dev/ttyUSB0 -> reset -> /dev/ttyUSB1 -> reset -> /dev/ttyUSB0 etc.