Adding WiFi to PocketBeagle

PocketBeagle WiFi DIY

For the next part of my series on PocketBeagle, I will show how to add WiFi connectivity to the board. This board doesn’t come with built-in WiFi like the Raspberry Pi Zero W. With a simple hack, I managed to add WiFi connectivity to it.

Adding USB to PocketBeagle

There is a provision for adding an additional USB port on the PocketBeagle as shown:

PocketBeagle USB Port

I have seen most people attach Adafruit’s microUSB breakout board to these pins which makes sense because the pins on the PocketBeagle and the breakout board line up.

So yeah, this is the easiest way. Then you add a USB OTG cable and attach a WiFi USB dongle like this:

PocketBeagle WiFi Diagram with microSD

But I don’t have the microUSB breakout board and I’m not planning to purchase it. Naturally, I had to create my own breakout board. I salvaged a type A USB port from a damaged power adapter and soldered it to a perf board:

PocketBeagle DIY USB Breakout Board

The type A USB has four pins compared to five pins for microUSB. I simply attached the ID pin to ground as suggested by this diagram:

microUSB to USB Type A

Also, since my custom breakout board uses a six-pin header (I couldn’t find one with five pins on my stock), the extra pin (VB on the PocketBeagle) is connected to 5V. So basically, this is how my breakout board is connected to the PocketBeagle:

PocketBeagle USB Type A Connection

WiFi Ready!

The actual setup:

PocketBeagle WiFi DIY

When the WiFi dongle is now attached to your PocketBeagle, all it takes is to enable WiFi via connmanctl

sudo connmanctl 
connmanctl> enable wifi

Next, scan available WiFi connections:

 

connmanctl> scan wifi
Scan completed for wifi
connmanctl> services

You should see a list of all available WiFi SSIDs in the format wifi_xxxxxx_xxxxxx_managed_psk. To connect to a specific SSID, just use:

connmanctl> agent on 
connmanctl> connect wifi_xxxxxx_xxxxxx_managed_psk

You can quit connmanctl using:

connmanctl> quit

That’s it! To check if you are now connected to WiFi and have an IP address, use

ifconfig

Next, I’ll make use of the added Internet connectivity by sending some data to the web

Leave a Reply

Your email address will not be published. Required fields are marked *