官术网_书友最值得收藏!

Hacking RPZ hardware to add up permanent Wi-Fi dongle

The USB dongle solder hack is considered one of the very first hacks shared in the community after the release of the Raspberry Pi Zero. With such a small form factor and USB OTG connectors, many hackers didn't like the idea of adding to the size of the board with an adapter and then tacking on a USB dongle. This recipe shows you how to attach an uncased Wi-Fi adapter to the Raspberry Pi Zero to keep your footprint still small enough to fit a mints tin.

Getting ready

This is another soldering hack, and not necessarily for the faint of heart. You'll need a compatible USB Wi-Fi dongle, but it is important to make sure to check the compatibility list on https://www.elinux.org to ensure that your dongle is both compatible and does not require additional power. Since we will be soldering this one right to the Zero, it will need to be able to get all of the power it needs from the incoming USB 5V port.

A great way to test whether you have the right equipment is to set it up with the USB OTG dongle in the previous recipe. If you can get your Wi-Fi set up with only the Wi-Fi and OTG dongles (and no supplemental power), then it should work fine when soldered directly to the board. You can even set up your SSID beforehand so that it will come right up after you've finished the soldering and started up the board again.

How to do it...

  1. First, carefully remove the case from your Wi-Fi dongle. This will result in just a small board with four connectors. The adapter is really just a very small board and its casing, as shown in this before-and-after picture:
  2. The connectors are for Power, Transmit, Receive, and Ground. The power and ground wires will attach to PP1 and PP6. The Transmit and Receive will connect to PP22 and PP23. Use short, equal lengths of wire to solder the two together, and be sure to twist the Transmit and Receive wires.
  3. Here is how we will connect the adapter to the Pi Zero:
  4. This will connect to the test pads on the Raspberry Pi Zero here:
  5. You'll want to make the data wires as short as possible, the same length, and twisted, just like the inside of a network cable.
  6. With the Raspberry Pi Zero's power detached, solder the connecters together. My approach to soldering with test points is heavy preparation.
  7. First, put a small bit of solder onto each test pad and on each cupper strip of the Wi-Fi card.
  8. Next take the wires you will be using to solder, and apply solder to the wires themselves.
  9. Finally, when you get to attaching the wires to the connection points, the solder from both should bond everything together nicely. Be careful not to use too much, as solder running across the test pads or connections will cause a short, and they can be a true pain to clean off.

After your connections have been made, start up your Pi Zero and see how things work! You should see your device when running lsusb, and if you configured your Wi-Fi before soldering, ifconfig should show an active wlan0 connection with IP addresses. If not, follow the instructions from the previous recipe, and you will be up and running!

Whether you decided to go with USB OTG or solder the Wi-Fi adapter directly to your board, your Raspberry Pi Zero can now be accessible from pretty much anywhere you have a Wi-Fi network. Now that we're on the network, we will start moving into recipes to make you a true power user!

Note

If you have your Wi-Fi dongle in, remove it first. It will be easier to test your recipe, and easy to configure.

If soldering onto the board isn't your thing, that's OK too. This cookbook doesn't require it, and we are going to experiment with Wi-Fi over the GPIO bus later, so we aren't finished with hacking the Raspberry Pi Zero and Wi-Fi devices.

主站蜘蛛池模板: 龙泉市| 铜鼓县| 巴彦县| 丰原市| 鄂州市| 壶关县| 新郑市| 盐边县| 嘉善县| 鄂州市| 大冶市| 互助| 诸城市| 天水市| 阳曲县| 孟津县| 东明县| 清涧县| 翁源县| 滨州市| 介休市| 陵川县| 施甸县| 叶城县| 罗城| 临潭县| 商南县| 杨浦区| 潍坊市| 洪洞县| 河间市| 大埔区| 本溪市| 东乡县| 长汀县| 修水县| 辉县市| 黄平县| 彭州市| 金华市| 河曲县|