serial over USB disconnect on macOS

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
cortega
Posts: 2
Joined: Tue May 18, 2021 3:05 am

serial over USB disconnect on macOS

Post by cortega » Tue May 18, 2021 3:19 am

Hi there.
After this sequence is performed in my mac Mini running big sur, the connection gets dropped by the board.
Does anyone have the fix for this?
Note that the very same sequence does not break the USB connection if performed from ubuntu 20.10 and using
GTKTerm for the usb/serial communication.
See al details below.

Thanks

Claudio

<<<<<
This is my setup:

target:
https://smile.amazon.com/HiLetgo-ESP-WR ... NrPXRydWU=

host:
macOS Big Sur w/screen app

Flash sequence on the target:
python3 esptool.py --chip esp32 --port /dev/tty.usbserial-0001 erase_flash
python3 esptool.py --chip esp32 --port /dev/tty.usbserial-0001 write_flash -z 0x1000 ~/Desktop/esp32spiram-idf3-20210202-v1.14.bin
screen /dev/cu.usbserial-0001 115200

(from the python >>> prompt)

import network
wlan = network.WLAN(network.STA_IF) # create station interface
wlan.active(True)

on the last command, the session disconnects, and wifi is -not- activated.
>>>>>

cortega
Posts: 2
Joined: Tue May 18, 2021 3:05 am

Re: serial over USB disconnect on macOS

Post by cortega » Thu May 20, 2021 9:00 pm

I found the probable root cause for the issue:
** noise in the USB connection when the LAN circuitry is powered up.
Following such theory, I plugged the USB connector in a different USB slot

Here's the observation:

The issue is present:
- when the USB connector is plugged into a USB hub which is plugged into the computer enclosure

The issue is not present:
- when the USB connector is plugged -directly- into a USB in the computer enclosure

The cable, the target, and everything else are kept the same for both tests above.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: serial over USB disconnect on macOS

Post by dhylands » Thu May 20, 2021 10:11 pm

It could be a current draw thing. The EPS boards will draw the most amount of current when transmitting over WiFi.

So you'll want to make sure you're using a powered hub, and one that can provide a decent amount of current.

Post Reply