First Raspberry Pi Zero Hack – Piggy-Back WiFi.

And we have the first Raspberry Pi Zero hack! In less than 72 hours from the official release announcement [Shintaro] attached an Edimax WiFi USB Adapter directly to the USB solder pads on the Pi Zero. He couldn’t bear to disturb the small dimensions of the Pi Zero by using the USB On-the-Go (OTG). The OTG is needed to convert the micro-USB connector on the board to a full USB-A connector.

The case was removed from the Edimax and the device and Zero wrapped in Kapton to insulate the exposed solder points. Power was taken from the PP1 and PP6 points on the back of the board. These are the unregulated inputs from the USB power so should be used with caution. Some cheap USB power supplies can put out more that 5 volts when first connected and that might let the smoke out of a device.

raspberry_pi_quarter

The data wires were connected to PP22 and PP23, also on the back, and behind the USB data connector. Since USB is a differential signal these wires were carefully kept of equal length to avoid distorting the signal.

An SD card was created and edited on a Raspberry Pi B 2 to set the WiFi credentials. Inserted into the Zero it booted fine and started up the WiFi network connection.

Congratulations, [Shintaro] for the first Hackaday Raspberry Pi Zero hack. Is that a Hack-a-Zero-Day hack?

122 thoughts on “First Raspberry Pi Zero Hack – Piggy-Back WiFi.

        1. Connecting a dot matrix printer is quite special isn’t it?

          So if your printer has USB, you can connect it via the OTG USB port.

          You may use the GPIO ports to build your own GPIO to LPT port for example with some CMOS driver chip. Implementing a Linux driver for this use case is not impossible.

          Or you may buy a USB to printer adapter: e.g. http://www.amazon.com/C2G-16899-Parallel-Printer-Adapter/dp/B000UX21PY/

          Please don’t complain for the 8$ price tag – how much does this printer cost? Just add this to the price of the printer as it’s you who wants this.

        2. @netimp ;)

          That few connector is normal: in the presentation video Eben stressed they wanted to lower the cost as much as possible: that’s mean reducing components number and PCB size. Given this tiny PCB, having a normal USB would have increased the price much more than the USB OTG adapter: such cable are 8 c$ on Aliexpress, even 23c$ once shipping included (~1 month)… http://www.aliexpress.com/item/Android-Robot-Shape-Micro-USB-to-USB-OTG-Adapter-Cable-for-Smart-Mobile-Phone-Android-Tablet/32385486756.html?spm=2114.01020208.3.1.jhxrTt&ws_ab_test=searchweb201556_7_79_78_77_80,searchweb201644_5,searchweb201560_6

          1. Cute! (BTW, you can drop everything after the “.html”, basically all of the search parameters, and still have a functional link. This kind of thing works for a lot of sites; e.g. for eBay, drop everything after the 12-digit number that follows the descriptive text.)

        3. That is far too difficult for him.Nor any 10Base 2 BNC connector or any access to Twinax networking.. It’s like the guys making the Raspberry Pi’s just dont have a clue as to what people need!

          1. While this is true, with the small size of my “nano” Wifi dongle, I’m more than happy to have it stick out the side considering it will still be smaller than the RPi2.

            What I AM worried about is physical damage since it’s a rigid plub design, it has no give to it :-/

            I guess I’ll find out in a month or so whenever these show up, at $1.60 for 2 shipped I can afford to experiment. I bought the Adafruit $30 starter kit thing since the standalone Pi’s were gone by the time I noticed them the next morning, so i’ll be set either way.

            Now to wait for shipping :(

      1. Putting a contact strip both for USB and supply would have allowed much more flexibility and bring down the costs further. Adapters could be made at home using ready made micro usb breakouts (just an example: item 231768653070 on ebay) for a few cents each and no flying wires. Easy, solid, cheap. This board is much better designed than the first PI (connectors on the right side for example), still there are some quirks that make me consider alternatives even if they cost more. And it’s still in part closed source.

    1. I agree. This is not about money, but practicality and also aesthetics. But most of all I miss Wi-Fi, at least this project tends to that.

      Come to think of it the decisions made for the Zero really limit its application. What good is a video port for it? The small form factor would suggest a portable full Linux system, a headless computer that could do the image processing/heavy algorithm crunching on a robot for example, this needs a camera input, WiFi and a proper power regulator (buck-boost?)… I’ll stick to RPi2 for now.

      1. The HDMI and GPU are built-in to the Broadcom chip, so not adding a small connector to make it accessible would be a sin.

        Built-in WiFi would be nice, but I don’t sweat it too much. It’s possible that one day, the RF environment around my home will become too crowded to support 2.4Ghz WiFi at a decent speed; and that might even occur due to things out of my control (neighbors, new tech, changes in spectrum usage laws, etc). So even if there’s built-in 2.4Ghz WiFi, I always plan around being able to later add a dongle to support 5Ghz.

      2. I think that WiFi has the problem that the device needs to have approval to be a radio device before it may be sold on the market. This approval costs money and would push the price of the unit up. While there are hundreds of different cheap WiFi devices around which already have approval and cost next to nothing due to mass production.

        So, I can imagine WiFi to not be on this board. It would be nice if there was a USB hub on-board and it had more than one USB OTG port. But ok, put-through components are expensive too.

        And I’m sure that someone will create a case which contains a USB hub and a few USB ports. Maybe even using spring-loaded contacts, so that you can just screw the board in and have power and USB in one go.

    2. Would have been *very* smart of them to put an unpopulated USB A connector on the underside, optional, adds no cost, adds flexibility so you never even have to do things like this.

      They’ve realized that the PI needs 4 USB ports, now they have ‘zero’ unless you use a OTG cable.. why..

    3. Well I got the hardware hack done as shown but I’m new to this Pi Zero so I need to do the software changes to my image on the SD card so it detects the piggy-back dongle installed…???

    1. I like it. I understand that if the makers would have added the wifi module to the board, that it would have cannibalized the RPi2 sales but honestly I would like to see something like pins for power, USB, and ethernet so that someone could use a simple perf board achieve the amount of connectivity they want. This is a good hackish solution though.

      1. LAN9512 for a 2 port hub with a shared NIC and a LAN9514 for a 4 port hub with shared NIC. So that you can plug multiple devices into the one and only real USB 2.0 port.

        But I do not see a similar chip on the RPi0 board that is providing the USB OTG and USB port, does anyone know what is going on they added a new USB OTG port to the silicon core or is another tiny hub chip ?

        1. No. It is the VideoCore JTAG port used by the Broadcom/RPi Foundation staff for development of the bootloader and associated files. You’ll need to solder on a FFC connector to use it.

  1. I saw the Edimax WiFi USB for 10$ on amazon. We need new WiFi options that match the zero in shrinking size and price. A tiny 2$ micro USB WiFi dongle? Lower bandwidth would be OK for many uses.

          1. Gaffer tape is different tape anyway. The tape itself is much better quality + easier to rip cleanly whilst the adhesive is far less likely to leave residue. If you leave it long enough then it’ll leave bits though. It is far more expensive than the cheap duct/tape tape though and you’ll always get cheapskates who don’t know any better substituting duct/duck tape for it ><

      1. If Wikipedia is to be believed then duck tape is actually the original name for that kind of tape. People eventually switched to calling it duct tape and then somebody reused the duck tape name for their specific brand.

        1. You could probably set it up so that if it can’t make a WiFi connection after say 5 minutes then it’ll go into AP mode and offer a configuration screen. No need to mess with the pins that way.

          If you wire it up with a small 4 pin connector in the middle then you can disconnect it to plug in a keyboard + monitor. The serial console should be available also unless you’re using that. If all else fails then it’ll have to involve pull the microSD card and rewriting the configuration using another system.

  2. This is a very helpful idea. Instead of taking apart a wifi unit like the Edimax, I’d just solder a usb socket to the board with a pigtail. Given that my use for boards like this is in embedded systems where the board is in a custom case, that is less of an issue than you might think. I can do the same for an LCD display, push buttons, etc. The result would be a rather inexpensive headless system with a multi-tasking OS (Linux), a large base of example code and hardware examples (Rasperry Pi), and it would all be small enough to fit in any of the pile of cases I’ve got lying around.

    I could even use the on-board usb port to connect an old parallel printer if I wanted through a usb-parallel cable I’ve also got lying around… Of course, I’d have to have a parallel printer!

    It looks interesting enough to get in line to order through Adafruit. At this price it costs less than many of the prototype boards I’ve been getting through TI and NXP.

    1. That’d be a really horrible hack to get integrated into the kernel TCP/IP stack though and would be a maintenance headache. Throughput would also be awful. It’d be much better to just use WiFi USB dongle. You can get a cheap one for a couple $ more than what the ESP8266 costs.

        1. A PPP connection to where exactly? The ESP8266 runs lwIP which doesn’t have a PPP server and running PPPd on the RPi over a TCP connection initiated by the ESP8266 to a server is nasty on many levels.

          USB WiFi adapters can be found for $2-$3 and a OTG adapter is $1 or you just directly wire it up like Shintaro did. The ESP8266 modules are great if you’re not able to cheaply + easily connect up a WiFi adapter such as Arduinos or other uCs. If you can however like the Raspberry Pi then you should just do it properly and save yourself time + headaches. It’ll work out of the box and be several magnitudes faster.

          1. The ESP would just be a modem. Set up a PPP server on a separate computer and you’re done. You really think setting up a PPP connection is hard? God I feel old…

            A USB WiFi adapter would work too, but if you need the USB for something else, this would work for a cheap, low bandwidth connection without adding a USB hub.

          2. Running a PPP server is easy and I have done in the distant past but lets not get in the way of you trying to be condescending. It is the fact you need to have a PPP server running on a server somewhere just so you can tunnel your connections through PPP over TCP via the ESP connected via serial with no handshaking. Keeping it simple and cheap right?

          3. Exactly – a PPP server and connection is easy, which is why I was surprised when you said “save yourself headaches” and “work out of the box.” PPP connections work out of the box, too. They’re straightforward.

            Yes, you would have to have a PPP server running on something, but if you can’t run one on your WiFi router, well, get a better one. :) Obviously a USB WiFi adapter is more capable and significantly faster, but, again, it takes more resources (and probably more power, too). An ESP8266 isn’t a terrible option if you want to preserve that single USB port, and only need really limited throughput.

  3. While most people complain about the USB, I find this okay since I desoldered mine as a drop-in controller for some project. The only thing that disturbs me here is the lack of Ethernet port.I might just do this hack.

    1. Me too! Lack of ethernet makes me unhappy. If ethernet over GPIO was a thing, I would be happy. I like how the composite video is still available if you do a small amount of soldering. Too bad the same wasn’t true about Ethernet,

      1. Isn’t it the case that the Broadcom chip doesn’t have Ethernet, and the original Pi used a USB Ethernet adaptor? So for the money you may as well add your own.

        Other than that though, the idea of having solder pads for the sockets that they’ve removed is a great idea. Or even have pads ready to populate with the sockets if you want to buy one yourself. Or both! Wouldn’t cost anything, and would help a lot. For all I know they’ve done that already.

  4. So no need to pull the USB ID down then to get it into host mode? I put a blob of solder between pins 4 and 5 of the microSD socket as it is connected so something on the Pi Zero board and appears to be being pulled up, as it is on an Android phone/tablet.

  5. Or you could just wait for Next Things co’s $9 CHIP computer with integrated WiFi and BLE ($8 preorders on cyber monday).

    You could also get a $32 nanopi2 Quadcore A9 +1GB RAM+ WiFi + BLE.

    Pricing the Pi Zero @ $5 dollars makes it really accessible but without connectivity it really limits its use as an SBC. If they had priced it at $10 with integrated WiFi+BLE in the same form factor, it would’ve been a better deal in my mind.

    Or if they offered it with the Quad core A7 (instead of the ancient ARM11) + 1GB RAM + Integrated WiFI+BLE for $25 it would’ve been an even better deal.

    Having said that, the Pi Zero still makes an excellent ‘Python-puter’. And with a $6-$15 USB WiFi/Ethernet dongle it’s an OK deal, but then it’s not $5 anymore now is it.

    Cheap isn’t always better.

      1. Were you a kernel-hacker backer? If not then it’s not even due yet! “Backer fulfillment” -May 2016. Didn’t you read their schedule?

        Just curious here – how much does it cost – all in all, to add a simple Wifi dongle to Pi Zero?

        1. Usb otg for under a dollar on eBay. WiFi adapter for under 5 dollars on eBay. Otg adapters are available in many brick and mortar shops too now, was one for £5 in Asda (WalMart operate in UK as Asda), more expensive but an option.

          Although I already have otg adapters and usb WiFi adapters so for some of us that’s a null point and as this hack shows you don’t even need the otg adapter.

  6. I like the RPi 2 and Odroid SBCs. They’re not $5 but $35-40 is still cheap for an SBC. and the Nanopi2 is looking real good..an improved version of the Exynos core, with 1GB of ram, HDMI, USB and integrated WiFi and BLE in a smaller form factor than the RPi2 ..all for $32. Its manufactured by friendlyarm a company that has been making ARM SBCs for a long time so it looks good. I’ve already bought one to try it out.

    As for the CHIP I remember when it first showed up on Kickstarter, they said that the first boards for backers would be delivered early 2016 so they’re on track. Those that paid for the alphas (kernel developer packs) seem to have gotten theirs. Also the very fact that the incredibly competent and amazing people at free-electrons (http://free-electrons.com/) are involved in the kernel/OS side of the project makes me trust these guys. Heck if I knew that they were involved in the project, I would’ve backed it immediately.

    A caveat though, for beginners to Linux and programming as well as for kids, the Raspberry Pi ecosystem is unparalleled, But for those with intermediate to advanced skills in Linux and programming….Other SBC’s may be more enticing.

    Anyway you look at it…..The RPi Zero could’ve offered so much more value at $8-$10 if it came with integrated WiFi and BLE. Way more important that HDMI….especially in this tiny form factor.

    1. The point of this is, it’s basic, and it costs five dollars. That’s pocket money, throwing away money. You wouldn’t be too depressed if $5 fell out of your pocket.

      They made compromises to get it to that price point. But what you get is a general purpose computer, a capable PC replacement (which cost a fair bit more) for many purposes. It can do what people were using micro-ATX boards for a few years ago. GPIO, USB, and video. Did I mention it’s FIVE DOLLARS? What can you even buy for that now?

      If you want to pay more to get more, there’s a million other boards available. For this, $5 $5 $5 is it’s selling point. Five dollars! For a gigahertz and HALF A GIG of RAM! That ought to knock you out of your chair, if you’ve been into computers for more than 6 months. There’s so many things it can do, and $5 makes it practical for many of them.

  7. It’s for autonomous type projects so it’s perfectly suited to its needs. And why would you need otg? Just get two phone USB to micro USB cables, a charger plug and a USB hub. When you have it set to do what you want wired, screen, buttons or whatever then you can unhook the USB and just power it off the one USB port using a charger battery pack or whatever. Anyone complaining just doesn’t understand what the board is for and need to get something else.

    1. @LJ: If it is for what you say, what is the advantage over an Arduino then?
      Besides that: in a time when the hype talks about IOT then just another kind of Arduino-board is just not what everybody is waiting for, but rather a small as possible and cheap as possible networkdevice with GPIOs that could be attached to every 7$ LED-light only doubbeling the price.

      1. Advantage over an Arduino? About 900-odd megahertz and approx 512MB RAM. It runs an OS, and applications, it’s coding for a computer, not a microcontroller chip. Also costs less than many!

  8. I’ve been using RPi boards from the very beginning. I’ve blogged extensively about them and I’ve used them in many projects. I’m also trying to be very objective here and I do highlight the pros of the Pi Zero…..incredibly low cost and amazing community support. It also still makes a great ‘python puter’ for those wanting to learn to program in Python and be introduced to the Linux CLI…not to mention learn scratch, sonic pi, mathematica, minecraftPi e.t.c. In my mind there’s still more value in the Pi Zero than say the incoming bbc micro:bit.

    I also must have at least 8RPis; 4 Model B, 2 Model B+ and at least 2 more RPI2. The thing is, we’re not living in 2012 anymore. Connectivity on any SBC (WiFi or at least Wired Ethernet); autonomous or not, is a must.

    In fact the very fact that its autonomous necessitates that the Pi Zero have integrated WIFI at least. HDMI on the other hand not that important. It was included simply because it was easier and ‘cheaper’ to include (already available on the SOC). The keyword here is ‘cheap’…All the design decisions made were made such that the Pi Zero would be ‘cheap’. When the objective is to make everything oh so very cheap many good design decisions go right of the window.

    The problem is when you need to add a USB WiFi dongle and cable and possibly hub….it’s not cheap nor is it portable anymore. In fact if you add the cost of a mediocre WiFi dongle, a USB hub (powered or unpowered), and all the necessary cables It’ll cost you at least $15. And while I’m at it…what’s up with the ARMv6 core? How about we get something a little bit more recent?

    1. It’s awesome (without wifi) for those of us that want an easy to secure embedded computer that is also easy to set up and use. I’d rather trust my coffee pot to a computer that can’t be easily internetted than to something that’s designed to be always on. Prank value with coffee way too high for that.

      Also good for the younger crowd that doesn’t have a fully enabled set of wetware filters yet. I can sneaker-net in a great gob of useful content with modern storage, and have a homework and book balancing machine that has lot fewer distractions. (Except then I have local wiki* and tropes to be distracted by… Rats, defeated again!) But this is the wrong machine for that anyways, since the form factor is too likely to get eaten by the dog.

      -BB-

  9. Unfortunately the Pi was not designed to be downscaleable, for the original Raspberrypi it was the perfect and cheapest solution to chooce a SOC without any IP-capabioity (cheaper) and to combine it with a 2nd chip for USB-hub and USB to LAN (including IP), the trick here is also that to the os the LAN appears as a USB2LAN-adapter plugged in an external USB and thereby avoiding to use drivers for a special hardware-concept .
    To make a cheaper solution with LAN a completely different SOC (with ethernet on chip) had to be chosen. For the given SOC of the old Pi it is maybe only possible to add a Wifi-chip connected by SPI, but then needing different drivers too not leaving it 100% compatible to the other RaspberryPis.
    Maybe the original Pi design just cannnot be the cheapest solution for IOT too afterall.

  10. Excellent idea, and really not that hard to do. I enhanced it by using a small 4-pin header and soldering pins onto each of the wifi dongle’s connector pads, so that I can remove it when and if it’s ever necessary to connect another USB device – like a powered hub. Works great!

  11. Thanks all, lets summarise, so we have 4 options for IP connectivity on the pi zero:
    1. otg micro usb to ethernet(possibly with usb hub) e.g. http://www.ebay.co.uk/itm/252215005485
    2. SPI to ethernet from GPIO (anyone knows a 100Mb PHY tried?) this is 10Mb
    http://raspi.tv/2015/ethernet-on-pi-zero-how-to-put-an-ethernet-port-on-your-pi
    3. PPP running on GPIO serial console port http://tinyurl.com/gqgjzvn
    4. non-otg, virtual ethernet from usb (gadgets) http://pi.gbaman.info/
    5. HDMI-ethernet? “No, the SoC does not support ethernet over HDMI.” (only CEC)
    https://www.raspberrypi.org/forums/viewtopic.php?t=6378&p=243457
    Anything more?

  12. I have been wanting to use my Raspberry Pi Zero as a remote weather station. I like the idea of what was done here – but decided to put a slightly different spin on this modification.

    I dug up a dead motherboard I had laying around, and blow torched a USB socket off of it. Torching the back of the mother board (being careful not to damage the USB port – located on the front of the mother board) I softened all solder leads at the same time with the torch, and my son pulled off the socket with a pair of needle nose pliers (couldn’t have been easier).

    *** Note to self – do this outside next time (stunk up the kitchen pretty bad).

    A little J-B weld permanently attaches the used USB body to the back of the Zero’s circuit board (making sure the USB wifi dongle is easily removable after the J-B weld cures).

    I used “single strand” Cat-5 Ethernet for the wiring. I kept the data wires for the wifi connection the same length, and soldered them (and the power wires) directly to the leads on the USB casing.
    And of course – this allows the Wifi dongle to be easily replaced, upgraded, etc. as needed.

    Done … and the setup looks almost “OEM” except for the wires.

    My next task is to try and get the zero running from a solar panel …
    ideally the setup would power the zero 24×7 – even during the shorter winter days in the N.E. US.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.