![]() ![]() Scope capture of a full wake-up cycle using just WiFi.begin(ssid,passwd) on an open access Mode 0: basic WiFi.begin()ĭiving right in, this is a scope capture of a full wake-up cycle: It is immediately obvious that there is over an order of magnitude difference in those 4 modes, i.e.įrom about 140ms to connect to Wifi to almost 3 seconds! We could start hypothesizing based on theĭifferences in the four modes, but it’s far more interesting to just focus on mode 0 and Point, and the total time is from the start of the clock to calling the function to go into The start of setup() to the moment the wifi subsystem reports that it is connected to the access Microcontroller clock to the beginning of the sketch’s setup() function, the connect time is from These are representative messages for many iterations. The 4 modes differ in the amount of information passed into the Wifi initialization functionsĪ quick look at the information coming out of the sketch shows the following: Mode 0, Init 34 ms, Connect 2927 ms, Total 2961 ms, SSID test, SDK 3.0.0-dev(c0f7b44) Sends a line of text with some timing info to the server. Then it initializes the Wifi in one of 4 modes based on the config data,Ĭonnects to a TCP server on the network using the server’s IP address (no DNS lookup), and Starts by loading data from the real-time clock memory, which doesn’t get lost during deep-sleep. The number of retransmissions don’t actually affect the overall outcome. I compared with using my home Wifi and realized it’s not all that different plus, as we’ll see, I tried changing preamble sizes, etc, to no avail. It happens whether the two systems are 1ft/30cm or 10ft/3m apart. Point on the ODROID, which I cannot explain. The second issue is that there seems to be a high packet loss between the esp8266 and the access The first is that the Wifi adapter in monitor mode misses some packets, specially some back-to-back packetĬombinations are systematically missed and I didn’t find any tricks to fix that. Point and an Android cell phone in hot-spot mode.Īs I dove in I found two issues with my set-up, which I want to mention up-front. TCP connections a log the data sent into a fileĪnd for comparison purposes I also used a secured/encrypted home Wifi network with a Senao access a simple TCP service cobbled together using netcat running on my desktop to accept the esp8266’s.a second USB-Wifi adapter attached to my desktop box running in monitor mode to capture the Wifi.hostapd running on the ODROID with bridging to my home network where my DHCP server runs.an open unencrypted access point using a USB-adapter attached to a ODROID SBC.In addition, I set-up a controlled Wifi environment: an oscilloscope to measure the current and a probe on a random esp8266 gpio pin to trigger.a FTDI USB-serial adapter to program the esp8266.a LiPo battery to power the esp8266 without interfering with oscilloscope ground.a uCurrent Gold to amplify the current (a 1 Ohm resistor would have probably done just fine given.a jumper on the ground connection leading into the esp8266 module to measure supply current.a small custom PCB that houses an esp-12e module with a switching power regulator and anįTDI-style connector to access the serial port and programming pins.Of magnitude! So I’ll spare you that derivation… Experimental set-up Protocols, and I almost fell from my chair when I saw the first packet traces! I was off by an order I tried to derive the time the above steps might take from first principles, e.g. TCP connection set-up, data transfer, and tear-down.ARP broadcast and response to obtain the server’s MAC address.request-response to DHCP server to obtain an IP address.exchange multiple packets to associate with the access point, includingĬrypto operations when dealing with secure access points.scan wifi channels to locate the Wifi access point.initialize the microcontroller (set-up clocks, flash access, caches, etc).Send some data to a server on the local network using raw TCP, and go back to sleep.ĭiving one level deeper, the esp8266 will need to go through the following phases The experiments will have the esp8266 wake-up from deep-sleep (basically a reset), The best way to find out is to run some experiments! Question really is how often can it wake-up? The esp8266 can last for years on battery in deep-sleep mode, so that’s a good place to start.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |