Matt Groh

Networking and Communications

This week we are making an electronics circuit with WiFi using a ESP8266 (2.6 GHz Wi-FI) chip.

Once you've milled and soldered the electronics component like you see in the beautiful picture above, the next step is to do something. You'll need, which is part of the pyserial package. Here's a script to clone the pyserial repo and run the miniterm on your electronics. Like I've mentioned before, you can figure out the filepath of the electronics component by tab completing /dev/cu.

git clone
cd pyserial/serial/tools/ /dev/cu.usbserial-XXX 115200

If you want to try out a UDP connecty, you have to enter ESP8266 commands, which you can find here.


The next step would be to run the node server in a separate terminal window. Type cmd-d in the terminal to split the terminal screen into two terminal screens and run the following.

curl > udpsnd.js
curl > udprcv.js
node udpsnd.js 1234 "hello" && node udprcv.js 1234

And this works, but the first time I did it something went wrong... here's a video trying to do it without the code to connect to the wifi AT+CWJAP="MIT","" . Just as a comment, the tutorial video doesn't connect to the wifi and you need to connect to the wifi.

So, without the wifi connection, when I try to do AT+CIPSTART=1,"TCP","",80 , I get a DNS Fail error. Likewise, when I host a server AT+CIPSERVER=1,80 and try a telnet connection, I don't see any feedback.

So, I posted an issue on Gitlab. And Caroline suggested checking out this tutorial. Here's the code (that you enter into the terminal) to get it working:

git clone
cd pyesp8266
python2 /dev/tty.usbserial-FTAP8P1F 115200 'MIT' '' 

And voila, if you keep the code as is and curl the IP address or enter it in your browser, you'll get GOT IT! (2018-12-05 10:40:10.716597). If you're so inclide you could change the code in process_request to do something different. For example, you could imagine you tweet something every time someone pushes a button on the board. This board doesn't have a button. But it could!