Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connecting to M5Stack via USB
#1
I was able to successfully flash the esp32_psram_all firmware to the M5Stack but now I realize I'm not exactly sure how to connect to it via usb. I opened a terminal and typed in the command: screen /dev/tty.usbmodem* 115200 However it just spit out cannot exec 'dev/tty.usbmodem*': No such file or directory. How do I connect using my Mac's usb?
Reply
#2
You can execute:
./BUILD.sh monitor
this will automatically reset your board (if it supports it)
or
minicom -D /dev/ttyUSB0
or any other terminal program, like Putty. Make shure you are using the correct comm port, on Linux it will usually be /dev/ttyUSB0.
Reply
#3
Thanks for your reply! I used ls /dev/cu.* to find out what port my device was connected to and found that it was on /dev/cu.SLAB_USBtoUART. I tried both screen and minicom options using the path I found. Both options say the resource is busy. ./BUILD.sh monitor says that no such file or directory exists. Thoughts?
Reply
#4
I'm not very familiar with using USBtoSerial adapters on OSX.
If you could successfully flash the device, than you should be able to connect with ./BUILD.sh monitor. It uses the same serial port.

Have you entered the correct port (/dev/cu.SLAB_USBtoUARTin menuconfig?
→ Serial flasher config → Default serial port

You can also check if you have the correct driver for your board's usb2serial chip and serial port permissions.

You may also check Espressif forum and esp-idf repository for similar issues.
Reply
#5
After several days of troubleshooting I found that these steps worked for me when using OS X

Step 1: Install Chip Recognition Driver
http://m5stack.com

Step 2: Enter Terminal And Install Esp Flashing Tool.
pip install esptool

Step 3: Find The Port Your Device Is Connected To.
ls /dev/cu.*

Step 4: See If You Can Connect To The Chip.
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 --after no_reset read_mac

Step 5: Erase Flash.
esptool.py --port /dev/cu.SLAB_USBtoUART  --baud 115200 --after no_reset erase_flash

Step 6: Flash New Firmware.
esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 115200 --before default_reset --after no_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader/bootloader.bin 0xf000 phy_init_data.bin 0x10000 MicroPython.bin 0x8000 partitions_mpy.bin

Step 7: Reset The Board & Repl In.
screen /dev/cu.SLAB_USBtoUART 115200
Reply
#6
Hi...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.

pcb assembly quote
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)