$5 WiFi module
$5 WiFi module
Health issues have forced me to set aside all of my projects for several months so I haven't been visiting play-space much. However, there is one project I'd like to resume and, yesterday, while browsing a PICBasic forum, I learned of the ESP8266 ($8 at Amazon, $5 on eBay).
http://www.instructables.com/id/Using-t ... 66-module/
Has anybody seen this? Anybody done anything with it using ZBasic?
There's tons of info on the web but I'm finding it hard to decipher and am hoping someone can translate to ZBasic.
http://www.instructables.com/id/Using-t ... 66-module/
Has anybody seen this? Anybody done anything with it using ZBasic?
There's tons of info on the web but I'm finding it hard to decipher and am hoping someone can translate to ZBasic.
ESP8266
I too, would like to try out this module. I bought one (see link below) received it in 3 days...
I have not been able to get it working yet, but hope to have more time to look at it next week. Anyone else made this work?
Tom W
http://www.ebay.com/itm/271647775639?_t ... EBIDX%3AIT
I have not been able to get it working yet, but hope to have more time to look at it next week. Anyone else made this work?
Tom W
http://www.ebay.com/itm/271647775639?_t ... EBIDX%3AIT
Re: ESP8266
I bought one from the same seller. I have it set up and responding to commands typed via a serial terminal (TeraTerm) but I've found it to be quirky. Note that the AT commands must be terminated with both CR and LF (you can probably configure your terminal program to send both with the Enter key).twesthoff wrote:I have not been able to get it working yet, but hope to have more time to look at it next week.
The pinout of the module is shown in the attached image. Note that the four center pins (GPIO0, GPIO2, RST, CH_PD) should be pulled up to or directly connected to Vcc (3.3V). The default baud rate on mine seems to be 9600. However, if you send the AT+RST command some "garbage" is output between the OK and ready responses. If you change the baud rate to 115.2K (AT+CIOBAUD=115200) the garbage become intelligible so it appears that the unit boots up at 115.2K baud and then switches to the configured speed.
I have gotten the module to output the access points in the area (AT+CWLAP) a few times but then it would do a watchdog reset when I executed the command. In spite of turning the watchdog off (AT+CSYSWDTDISABLE) it kept doing that.
I was unable to get an access point listing again even after powering the unit down. Nonetheless, I was able to make a connection to my main access point. With this connection operational, I tried the cloud update (AT+CIUPDATE) and it appeared to work but then ended up just spewing garbage. As it stands now, the unit is bricked so I'm going to have to figure out how to do a firmware update with a local file.
Here is a PDF listing of the device's AT commands:
http://woodsgood.ca/projects/wp-content ... ndsSet.pdf
- Attachments
-
- ESP8266.jpg (15.26 KiB) Viewed 5853 times
- Don Kinzer
I just received the command set document from the eBay seller (attached).
- Attachments
-
- ESP8266_Command_Doc.pdf
- ESP8266 Command Set
- (196.75 KiB) Downloaded 710 times
- Don Kinzer
$5 WiFi module
Thanks - The only thing else I have heard is that it needs almost 300ma supply and a "largish" capacitor at the power pins for peak currents. The supply I was using was only 100ma so I will try that next. The red led lighted brightly though.
Tom
Tom
$5 WiFi module
Thanks for the command set and for the tip about needing both cr and lf at the end of commands.
I haven't been able to get any characters from it yet.
Should I see something readable on the serial output at power up?
Tom
I haven't been able to get any characters from it yet.
Should I see something readable on the serial output at power up?
Tom
SeeedStudio has an SDK. It's in C so won't help me much but may be useful to someone else.
http://www.seeedstudio.com/document/pdf ... k_v0.6.zip
PS: From the multitude of EBay listings, there appear to be several versions. IIRC they range from esp-01 up to esp-12 and perhaps even later.
http://stores.ebay.com/tomyuen007/
http://www.seeedstudio.com/document/pdf ... k_v0.6.zip
PS: From the multitude of EBay listings, there appear to be several versions. IIRC they range from esp-01 up to esp-12 and perhaps even later.
http://stores.ebay.com/tomyuen007/
Last edited by dlh on 07 March 2015, 15:18 PM, edited 2 times in total.
Re: $5 WiFi module
With the terminal program's baud rate set to 115.2K baud I did see intelligible output at power up and then the device switched to 9600 baud and output garbage. Changing the terminal program to 9600 baud then allowed me to interact with it.twesthoff wrote:Should I see something readable on the serial output at power up?
- Don Kinzer
After bricking my device, I was able to re-flash it and get it running again. I used the flasher tool and binary image found at the link below. To put the device in update mode you must ground GPIO0 while the power is off and then power it up. The flasher tool takes a few minutes to re-flash the device.
https://drive.google.com/file/d/0B3dUKf ... gxelE/view
https://drive.google.com/file/d/0B3dUKf ... gxelE/view
- Don Kinzer
These links might also be helpful.
Board for flashing ESP8266
https://www.tindie.com/products/AtomSof ... 2-flasher/#
Tutorial and Lua script for flashing from Windows, etc.
http://hackaday.com/2015/01/10/flashing ... n-windows/
Espressif Forum: (tons of info)
http://bbs.espressif.com/viewforum.php?f=5
Board for flashing ESP8266
https://www.tindie.com/products/AtomSof ... 2-flasher/#
Tutorial and Lua script for flashing from Windows, etc.
http://hackaday.com/2015/01/10/flashing ... n-windows/
Espressif Forum: (tons of info)
http://bbs.espressif.com/viewforum.php?f=5
I updated the firmware on my ESP8266 and finally have it operating reasonably well (although it is still a bit flaky). The attached project contains some example code that resets the chip, sets the mode to 1 (if not already in that mode) and then connects to an access point. If the connection is successful, the assigned IP address is reported - useful if you want to ping it.
To assist in implementing a timeout while awaiting a response, I created a function to peek at a variable offset in the queue. This allows for attempting to match received characters to the expected response without disturbing the content of the queue.
To assist in implementing a timeout while awaiting a response, I created a function to peek at a variable offset in the queue. This allows for attempting to match received characters to the expected response without disturbing the content of the queue.
- Attachments
-
- ESP8266.zip
- (2.73 KiB) Downloaded 620 times
- Don Kinzer
$5 WiFi module
Thanks Don.
I haven't had time to work with mine this week, but this will help.
Do you know if source code is available for the internal firmware of the 8266? Maybe there is something that could be fixed so it wouldn't be so flakey. I have read other accounts about the chip being flakey. One said you needed a large capacitor across the power pins of the 8266, but didn't say the recommended value. My guess would be that the transmitter draws some big current spikes.
Tom W
I haven't had time to work with mine this week, but this will help.
Do you know if source code is available for the internal firmware of the 8266? Maybe there is something that could be fixed so it wouldn't be so flakey. I have read other accounts about the chip being flakey. One said you needed a large capacitor across the power pins of the 8266, but didn't say the recommended value. My guess would be that the transmitter draws some big current spikes.
Tom W
Olimex makes an ESP8266 Evaluation board. The webpage also has a link to an English translation of the Espreeif documentation for the ESP8266.
https://www.olimex.com/Products/IoT/ESP ... e-hardware
https://docs.google.com/file/d/0B9hyK_D ... edit?pli=1
And, here is a discussion of the power issue.
http://www.esp8266.com/viewtopic.php?f=6&t=497
https://www.olimex.com/Products/IoT/ESP ... e-hardware
https://docs.google.com/file/d/0B9hyK_D ... edit?pli=1
And, here is a discussion of the power issue.
http://www.esp8266.com/viewtopic.php?f=6&t=497
Re: $5 WiFi module
From what I have read, the source code for the core is open source but the source for the AT command set is no longer open source. You can find links to the source and instructions for building the binary.twesthoff wrote:Do you know if source code is available for the internal firmware of the 8266? Maybe there is something that could be fixed so it wouldn't be so flakey.
I've read a lot of complaints about the klunkiness of the AT interface. I haven't used it beyond the small example but I was thinking about what you'd have to do to interface with an NTP time server. I don't think that the text-oriented AT interface would work very well for that.
I tried 100uF but it didn't seem to improve things.twesthoff wrote:One said you needed a large capacitor across the power pins of the 8266, but didn't say the recommended value.
- Don Kinzer