Connecting via USB

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Abraxas
Posts: 16
Joined: Mon Jan 01, 2018 5:53 pm

Connecting via USB

Post by Abraxas » Tue May 22, 2018 6:28 pm

I just uploaded the esp32-20180511-v1.9.4.bin onto my esp-32 from my mac. From the terminal I tried to get into repl by using the usual screen /dev/ttyUSB0 115200 and it said that the file/directory didn't exist. So I decided to search my ports using ls /dev/cu.* and found that my board was on this path: /dev/cu.SLAB_USBtoUART. So I tried screen /dev/cu.SLAB_USBtoUART 115200. and received: Cannot open line '/dev/cu.SLAB_USBtoUART' for R/W: Resource busy Sorry, could not find a PTY. How do I fix this?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Connecting via USB

Post by Roberthh » Tue May 22, 2018 6:58 pm

How did you upload the software? Uploading too requires the serial port. So maybe the upload process is still holding the serial device.

Abraxas
Posts: 16
Joined: Mon Jan 01, 2018 5:53 pm

Re: Connecting via USB

Post by Abraxas » Tue May 22, 2018 7:05 pm

I used this tutorial located here on youtube: https://www.youtube.com/watch?v=xM53h3usfMI
The same /dev/cu.SLAB_USBtoUART path was used for the flashing process.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Connecting via USB

Post by Roberthh » Tue May 22, 2018 7:26 pm

I just tried that on a mac. The device I had to use started with /dev/tty.usbserial
So maybe it is just another device name to use.
Otherwise try rebooting the mac to get rid of a maybe blocking script.

Abraxas
Posts: 16
Joined: Mon Jan 01, 2018 5:53 pm

Re: Connecting via USB

Post by Abraxas » Tue May 22, 2018 8:45 pm

I tried your sugestion but with no luck. I was wondering could it be a driver issue? If it is a driver issue how can I fix it? I think my driver comes from silicon labs.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: Connecting via USB

Post by OutoftheBOTS_ » Tue May 22, 2018 8:51 pm

Adafruit have very long step by step YouTube tutorials on setting up and using Micropython from a Mac

User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Connecting via USB

Post by devnull » Tue May 22, 2018 11:20 pm

you need to use tty:

/dev/tty.SLAB_USBtoUART

Abraxas
Posts: 16
Joined: Mon Jan 01, 2018 5:53 pm

Re: Connecting via USB

Post by Abraxas » Thu May 24, 2018 4:57 pm

Okay, here is what I have learned so far. I found another site that had directions on how to flash MicroPython on this board found here:

https://appelsiini.net/2018/m5stack-esp32-firmware-cli/

Followed the instructions, was able to use the screen command but it didn't show a python prompt. Instead it just sat there with a blank curser. When pushing the restart button on the M5Stack I received this.
Image

So I am able to see replies from my board but I am not able to talk to my board. Any thoughts.
Attachments
Screen Shot 2018-05-23 at 10.46.24 PM.png
Screen Shot 2018-05-23 at 10.46.24 PM.png (55.26 KiB) Viewed 7246 times

Post Reply