Hi everyone! I have been needing a WiFi repeater for my WiFi sensors that are too far away from my router. I looked around, but decided to build my own. It took me many hours of searching to finally figure out how to flash to a ESP8266 with a Mac. So, this tutorial is for anyone else with the same problem, and as my own reference for next time :).
SetupThe setup is super simple. Connect any ESP8266 to a MacBook via a USB wire. Thats it!
Pro tip: Some USB wires though, don't have data wires, so if this tutorial isn't working for you, switch your cable out for a different one ;).
FlashingTo flash your ESP8266, you first need to open terminal on your Mac.
Next, you need to install esptool using pip. So, type this line and hit enter. pip install esptool
Now, you need to erase your ESP8266's flash before re-flashing. So, type this line into terminal, and press enter. esptool.py --chip esp8266 erase_flash
If, when it gets to Connecting....
, the dots just keep going, make sure your ESP is plugged in and the USB is recognizable.
Now, you can flash your ESP! Download the Github code here. Next, locate your downloaded code (usually found in "Downloads" ;) ) and go back to terminal. Now, type this line into terminal:
esptool.py --chip esp8266 --port "your port" write_flash --flash_mode dio --flash_size detect "location" "computer location"
Replace "your port" with your USB device port, replace "location" with the HEX number at the beginning of each firmware file (for example, 0x00000), and replace "computer location" with the location of the firmware on your Mac (usually, you can just drag the file from finder onto the terminal window ;) ).
Example:
esptool.py --chip esp8266 --port /dev/cu.usbserial-1410 write_flash --flash_mode dio --flash_size detect 0x00000 /Users/kgray/Downloads/esp_wifi_repeater-master/firmware/0x00000.bin
Repeat the same procedure for all three files, and that's it! For how to use your WiFi Repeater, go to the GitHub page here.
Wrapping UpThanks for reading! I hope this helped! Please post in the comments if you have a question or any feedback.
Check out my other tutorials!
and my website
Comments