espressif / esp-homekit-sdk

544 stars 98 forks source link

export ESPPORT=/dev/tty.SLAB_USBtoUART doesn't work, SOLUTION below #57

Open pedros89 opened 3 years ago

pedros89 commented 3 years ago

Hello, in my opinion it is better to use the commands you find below for ESP32 Following the commands given was not working, especially this command was problematic export ESPPORT=/dev/tty.SLAB_USBtoUART I was specifying my port name there in several ways but it did not work with my board Wemos D1 R32.

So please use the following commands. First connect the ESP32 board and use dmesg command to see the USB port name that is assigned to

dmesg
. $HOME/esp/esp-idf/export.sh
cd /home/pi/esp/esp-homekit-sdk/examples/fan                       //put your project folder here
idf.py set-target esp32
idf.py menuconfig                                              //optional
idf.py -p /dev/ttyUSB0 flash
idf.py -p /dev/ttyUSB0 monitor

In this way it works great form me. I hope it helps someone.

shahpiyushv commented 3 years ago

@pedros89 , in the same line$ export ESPPORT=/dev/tty.SLAB_USBtoUART #Set your board's serial port here, the comment #Set your board's serial port here was meant to indicate that users should replace this with their device's serial port which could be something like /dev/tty.SLAB_USBtoUART or /dev/ttyUSB0 or COM1 or anything else as per what it indeed is for the device. There was an assumption that the users must have already followed the ESP IDF getting Stared instructions referenced in the README, which has a point about connecting to your device and establishing Serial Connection and so, would know what this comment means. But it seems that people may still miss it. I will add these pointers explicitly in the docs soon enough.