curious4872
Posts: 73
Joined: Sun Nov 29, 2015 3:33 am

Re: Pi Zero onboard wifi hack

Wed May 18, 2016 11:17 am

mthomason wrote:I like the look of this solution best, so far. It uses SPI on the GPIO pins and doesn't touch USB, so it can be used on a Pi Zero to add WiFi while leaving the USB OTG port usable as an actual OTG port (so you can connect the zero directly to a PC as a peripheral using the Linux USB Gadget modules.) I'm going to give it a go using an ESP-201, which comes in a larger/easier format to work with, as well as being a bit cheaper than most other ESP8266 modules as it doesn't have any onboard flash memory.
The ESP8266 is pretty legendary, and apparently ~$2 in a quantity of 1. (just google, for example google "esp8255 ali".) It's unreal. And getting it onto a pi zero? Wow.

I mean basically imagine the cheapness of this: http://www.aliexpress.com/item/NodeMcu- ... 03041.html

but paired with 1 GHZ and 512 MB of RAM to do any processing you want. If that isn't worth $2.00 I don't know what is. :-D

User avatar
piglet
Posts: 893
Joined: Sat Aug 27, 2011 1:16 pm

Re: Pi Zero onboard wifi hack

Wed May 18, 2016 11:54 am

FYI these ones at £2.52 delivered use a CP2102 rather than a CH340 USB serial interface and seem a lot more robust than other ones I've tried.

gregeric
Posts: 1508
Joined: Mon Nov 28, 2011 10:08 am

Re: Pi Zero onboard wifi hack

Wed May 18, 2016 12:33 pm

These esp8266 modules are indeed very versatile: standalone iot devices, provision of networking to mcu's over serial with the AT firmware... or you can ditch the AT firmware entirely & have it slave boot the eagle esp8089 linux firmware/driver over SDIO. That way it behaves & performs much like the RPi3 embedded WiFi.

If you all you want is fast WiFi without using USB, buy the module on its own for <£2 eg http://www.ebay.co.uk/itm/Esp-12E-ESP82 ... Swl9BWGIbX

mthomason
Posts: 113
Joined: Sun Apr 24, 2016 12:28 pm

Re: Pi Zero onboard wifi hack

Wed May 18, 2016 1:02 pm

The one I'm going to try on my Zero is this:

http://www.aliexpress.com/item/ESP8266- ... 35848.html

It's a decent breakout that'll fit into a breadboard, doesn't have all the clutter of the NodeMCU-type modules. It's no use as an actual programmable module without adding a separate flash module, but the tutorial I mentioned above uploads firmware from the Pi directly over SPI every time it boots (and actually recommends removing any onboard flash, so that's one less job to do, too). Not sure about the external antenna, as I've found the onboard is generally fine - but it's just a matter of moving a resistor to switch them back to the internal one.

For using as a programmable module, I've been playing with the NodeMCU-clones ever since my robot code got too big for an Arduino Nano. I noticed there was a compatibility library for the Arduino IDE to program ESP8266s, so I managed to get my code ported with very few modifications, and now have at least four times as much space to play with (and they were cheaper than moving to a Mega.) Having onboard WiFi was just a bonus, for around £2.50 each I find they're nice just as general purpose microprocessors. Now I'm lining up more projects like a WiFi-enabled alarm clock with a mail+news ticker and find I'm now ordering an ESP8266 a week (I try to keep a couple spare so I don't have to worry about the 2-3 week shipping times.)

mthomason
Posts: 113
Joined: Sun Apr 24, 2016 12:28 pm

Re: Pi Zero onboard wifi hack

Thu May 19, 2016 3:59 am

gregeric wrote: Edit- I see they may in fact be there on header pins after all..
Yeah, it took a bit of reading but I finally figured out all the necessary ones appear to be there, they're just not all labelled quite the same (The one I had trouble with was CH_PD, which on the 201 is labelled CHIP_EN)

gregeric
Posts: 1508
Joined: Mon Nov 28, 2011 10:08 am

Re: Pi Zero onboard wifi hack

Thu May 19, 2016 6:45 am

Yep, that's the one that's normally pulled high, but must be driven low briefly if you reboot the Pi. That unloads the firmware from the esp's ram, as the linux driver expects to see the esp in a virgin state. Had it not been there, you could have used the reset pin for the same purpose.

Sudos
Posts: 1
Joined: Wed Sep 21, 2016 10:57 pm

Re: Pi Zero onboard wifi hack

Wed Sep 21, 2016 11:10 pm

yy502 wrote:Here's my solution. The full size female USB socket is semi-secured onto the board by soldering with 2 of the feet of the mini HDMI socket. It holds the socket and a WiFi dongle reasonably stable. You will still need to press the USB socket against the PCB when plug/unplug anything to be safe. This also resolves the reboot issue caused by current surge when plugging in a USB device, e.g. some WiFi dongles.

Image
Image
Image
Sorry to revive a slightly old topic, but I just made this account to post in this thread. I did something similar just a few days ago:
Image

it's not the nicest-looking thing, but it's well-protected and USB devices can be plugged or unplugged with ease without worry of breaking anything. The white stuff is a white-colored silicone caulk-stick type hot-snot I found in the cabinet. the brand is Sears-Craftsman and I've never seen anything like it before otherwise... but I surmise the white-colored hotglue-gun sticks you'd find on the interwebs will be something like that-- there's some really higher-end stuff available as well.

as for why it's everywhere... lack of a glue gun forced me to make do with a lighter, and smearing the stick around until it started to go tacky. I honestly think this worked out better, though, and although messy, it's nothing I need to be concerned about, since this was the first try. I've since picked up two more Pi Zero's since they're currently $1 at Microcenter, and if I'm desperate enough to use such a method again for a project, it'll be a lot cleaner the next time around.

I see the SPI-controlled solutions as a bit cleaner, but the USB port hack-on was the best I could see at being a thing, especially with the port power problems removed afterwards, so long as your power source is clean and able to handle the load you'd be putting on it.

Bodmoor
Posts: 2
Joined: Fri Feb 05, 2016 3:05 pm

Re: Pi Zero onboard wifi hack

Tue Jan 31, 2017 3:34 pm

brilliant, I applied this using an actual usb port, so now I can even use it for other usb devices. Especially useful as it frees up the only port without sacrificing internet access, and you can now connect an utp to usb converter and the wifi usb stick at the same time, so you can ssh into the pi and configure the wifi.
First time I had to configure the wifi 'blind', so edit the networking settings, reboot, switch the utp converter to the usb wifi stick and pray... this is way more comfortable, I'll probably hack my other zero as well.

Return to “General discussion”