HackerBox 0042: Worlds of WiFi

3,408

12

37

Greetings to HackerBox Hackers around the world! HackerBox 0042 brings us the Worlds of WiFi, Antennas, Networking Scanning, and much more. This Instructable contains information for getting started with HackerBox 0042, which can be purchased here while supplies last. If you would like to receive a HackerBox like this right in your mailbox each month, please subscribe at HackerBoxes.com and join the revolution!

Topics and Learning Objectives for HackerBox 0042:

  • Understand RF Interconnects
  • Explore WiFi Networks
  • Test 2.4GHz and 5GHz WiFi Antennas
  • Measure Antenna Performance
  • Assemble and Program a WiFi Scanner Kit
  • Descend into the Circuit Cellar

HackerBoxes is the monthly subscription box service for enthusiasts of electronics and computer technology - Hardware Hackers - The dreamers of dreams.

HACK THE PLANET

Supplies:

Step 1: Content List for HackerBox 0042

  • Exclusive HackerBox WiFi Scanner Kit
  • USB WiFi Adapter Dual Band 1200Mbps
  • USB Dock Stand
  • 5dBi Dual Band PCB Antenna with IPX Connector
  • IPX to SMA Adapter Coupling
  • TTL-USB CH340 Module with MicroUSB
  • 1/4 Wave Dipole Antenna Measurement Kit
  • Circuit Cellar Free Subscription Card
  • Circuit Cellar Decal
  • Bitcoin Decal
  • Exclusive Dual-Ended HackerBoxes Lanyard
  • Exclusive "Hack Life Phreak Club" Iron-On Patch

Some other things that will be helpful:

  • Soldering iron, solder, and basic soldering tools
  • Computer for running software tools
  • Wireless Networks to explore
  • Three AA Batteries

Most importantly, you will need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we really appreciate your taking a few minutes to read the FAQ.

Step 2: Radio Frequency SMA Connections

There are many types of RF (Radio Frequency) Connectors.

SMA or "SubMiniature version A" connectors are precision coaxial RF connectors with a small screw-type coupling mechanism. The connector has a 50 Ohm impedance. SMA is designed for use from DC (0 Hz) to 18 GHz, and is most commonly used in microwave systems, hand-held radio and mobile telephone antennas, and more recently with WiFi antenna systems and USB software-defined radio dongles. It is also commonly used in radio astronomy, particularly at higher frequencies (5 GHz+).

SMA connectors actually have four "polarities" as shown in the image. Reverse-polarity SMA (RP-SMA or RSMA) is a variation of the SMA connector specification which reverses the gender of the central contact pin. The female RP-SMA connector has the same external housing as a standard or conventional female SMA connector, which consists of an outer shell with the threads on the outside; however, the center receptacle is replaced by a male pin. Similarly, the RP-SMA male has threads on the inside like a conventional male, but has a center receptacle instead of the male pin in the middle.

(Wikipedia)

Step 3: WiFi and Antennas

Dual Band WiFi systems, like the USB WiFi 1200Mbps device, operate at both 2.4GHz and 5GHz frequencies. Antennas may be tuned to one of these frequencies, or in some cases both (Dual Band). WiFi antennas generally have a Male RP-SMA connector to couple to the WiFi Device.

The included antennas shown here:

  • 5cm 2dBi 2.4GHz Dipole Rubber Duck Antenna
  • 17cm 5dB1 Dual Band Dipole Rubber Duck Antenna
  • 5dBi Dual Band PCB Antenna with IPX Connector

Note that an adapter connector may be used to convert the IPX Connector for SMA use.

For background on comparing the performance of different types of WiFi antennas, it might be helpful to review the materials for Digital Airwaves HackerBox 0023.

The USB WiFi 1200Mbps Dual Band device is based on the RTL8812BU Chipset.

INTERESTING LINKS TO EXPLORE:

WiFi Adapters for Wireless Hacking

Hak5's Wi-Fi Hacking Workshop Part 1.1 (and so on through Part 3.3)

Antenna Theory.

Kali Linux is an open source Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security.

Cypress whitepaper on PCB antenna designs.

Texas Instruments whitepaper on 2.4Hz PCB antennas.

Silicon Labels whitepaper on Inverted-F PCB antennas.

Dropout’s Guide to PCB Trace Antenna Design.

Ceramic Chip Antennas versus PCB Antennas.

Step 4: Antenna Performance Measurement

The science of antennas is complex. But the article by Robert Lacoste from Circuit Cellar Magazine shows how the task of measuring an antenna’s performance is less costly and exotic than you’d think. Using a right angle SMA coupler, a Male SMA PCB edge connector, and some 14G wire, you can experiment with a 5GHz version of the 1/4 wave measuring dipole shown in Photo 2 of the article.

Step 5: WiFi Scanner Kit Assembly

WiFi Scanner Kit Components:

  • Exclusive HackerBoxes WiFi Scanner PCB
  • ESP8266 Based ESP-03 Module
  • 128x64 OLED Display
  • 5cm 2dBi 2.4GHz Dipole Antenna
  • Female RP-SMA PCB Edge Connector
  • 3AA Battery Housing with PCB Mount
  • HT7333A 3.3 Voltage Regulator (TO-92 Package)
  • Three pin slide switch
  • Tactile Pushbutton
  • Programming Header (6 pins)
  • Five 4.7K Resistors
  • Two 10uF Ceramic Capacitors

WiFi Scanner Kit Assembly Notes:

  • Observe the placement diagram for component positions
  • Note orientation for the regulator and the ESP-03 Module
  • Gently slide the black plastic spacer off the pins of the OLED
  • Solder ESP-03 module first
  • Solder remaining top components next
  • Closely trim leads on rear of board (wear safety glasses)
  • Lastly, solder battery housing through rear side of board
  • Anchor the battery housing with double sided tape, hot glue, etc.

Step 6: WiFi Scanner Kit Programming

  1. Install Arduino IDE
  2. Install ESP8266 Board Support for the IDE
  3. From the IDE Library Manager, install esp8266-oled-ssd1306 (v 4.0)
  4. Wire up TTL to USB module as shown here (3 wires only)
  5. Supply WiFi Scanner with AA Batteries (not USB)
  6. Open the WifiScanOLED.ino example code in the IDE
  7. Select Arduino IDE Settings as shown here
  8. Power OFF WiFi Scanner (Slide Switch DOWN)
  9. Hold Down Tactile Pushbutton
  10. Power ON WiFi Scanner (Slide Switch UP)
  11. Release Tactile Pushbutton
  12. Hit ARROW BUTTON on IDE to compile and upload
  13. SCAN ALL THE NETS (all the 2.4GHz nets anyway)

Holding down the pushbutton during power-up will put the ESP8266 in bootloader mode allowing it to be programmed by the IDE.

Step 7: Circuit Cellar Magazine - Free Digital Subscription

Circuit Cellar is a premier media resource for professional engineers, academic technologists and other electronics technology decision makers worldwide involved in the design and development of embedded processor and microcontroller-based systems across a broad range of applications. Produced monthly (print and digital), Circuit Cellar provides critical information on embedded, electronics technology and does so at level of depth and detail tailored specifically for advanced professional readers. Their mission is to tackle the key issues of technology to help readers make smart choices with their engineering projects - all the way from prototype to production.

Step 8: Livin' the HackLife

We hope you have enjoyed this month's voyage into electronics and computer technology. Reach out and share your success in the comments below or on the HackerBoxes Facebook Group. Certainly let us know if you have any questions or need some help with anything.

Join the revolution. Live the HackLife. You can get a cool box of hackable electronics and computer tech projects delivered right to your mailbox each month. Just surf over to HackerBoxes.com and subscribe to the monthly HackerBox service.

13 People Made This Project!

Recommendations

  • Gardening Contest

    Gardening Contest
  • Party Challenge

    Party Challenge
  • Woodworking Contest

    Woodworking Contest

37 Discussions

0
None
kensweeney

5 days ago

I had a hard time programming it, turns out the 3.3v regulator was only providing 500mv. Good thing I got solder wick a couple boxes ago!

0
None
HowardW29

5 days ago

I've got everything soldered and the Arduino IDE updated but when I attempt to upload, I get no connection. My soldering is a little rusty and I'm not sure I got everything just right on the ESP8266 board. Is there some way to verify with a multimeter whether all the connections are good or not?

0
None
mrc0de

6 days ago

Oddly, I've got everything working except for the screen.

Is it supposed to light up during the bootloader stage?

The button and the ESP seems to work, I was able to program it as well as see data when pressing the button (in serial monitor), just cant get the dang screen to light up....

What's the required input voltage... maybe my batteries are low... any ideas are appreciated.

I saw that post who said mind the power portion, but I'm pretty sure I did that one correctly.

0
None
lmperkins

Question 11 days ago

I'm running arduino ide 1.8.9 and I've added the version 4 library of esp8266-oled-ssd1306 and I'm seeing the missing .h files as others have been reporting but upon compiling this is the error message I keep getting:

In function 'void scroll_nets()':
WifiScanOLED:26:19: error: 'min' was not declared in this scope
ndisp = min(6, n); //num of rows (nets) to display

I'm guessing 'min' is a fcn in the library but not sure. Any help would be appreciated.

3 answers
0
None
MarcelC29lmperkins

Answer 9 days ago

Add these two lines before the setup() function.

inline int max(int a,int b) {return ((a)>(b)?(a):(b)); }
inline int min(int a,int b) {return ((a)<(b)?(a):(b)); }

0
None
lmperkinsMarcelC29

Reply 9 days ago

Thanks, the _min change seems to be working well

0
None
lmperkinslmperkins

Answer 10 days ago

Apparently this is a known issue with some ESP libraries, the min and max functions won't work. The solution is to use _min instead. Seems to work.

2
None
HunnyDob

17 days ago

Be careful with the leads from the battery pack. Unlike normal component leads they are made of hardened spring wire and can damage your cutters. They were the last things I soldered in place, I just grabbed my flush cutters, squeeze, squeeze, squeeze... why isn't this, ahh shoot!

Flushcut divots.jpg
3 replies
0
None
TechDoofusHunnyDob

Reply 15 days ago

Yep. I should have grabbed my old snips. Now my NEW ones have nicks in them as well :-)

0
None
lmperkinsTechDoofus

Reply 12 days ago

Thanks for the warning, saved my best cutters from ruin.

0
None
mrc0de

10 days ago

Hey... You guys know which component gets unexpectedly HOT while soldering something near it?

You will.

0
None
kiltedken

12 days ago

Hey Hackerbox,
Do you have an engineering diagram that I can use to create a 3d printed box for it?

Thanks.

Kenny

2 replies
0
None
HackerBoxeskiltedken

Reply 12 days ago

Kenny, check out the PCB outline image in Step 5. Scaling the outer flat edges of the PCB to 52.8 x 88.9mm will let you project all of the other dimensions.

0
None
pbhound

12 days ago

so i am trying to upload the code to the scanner and i get the following error:

"Invalid library found in D:\Program Files\Arduino\libraries\WifiScanOLED: no headers files (.h) found in D:\Program Files\Arduino\libraries\WifiScanOLED"

2
None
Earthwormchris

Tip 20 days ago

You will need to install an additional library (if you get errors about not having "SSD1306Wire.h"
Go to the library manager and search esp8266-oled-ssd1306 and install the second one, the version 4.0.
If the "more info" in the library manager button takes you to https://github.com/ThingPulse/esp8266-oled-ssd1306
you've got the right library.




3 replies
0
None
d4e5Earthwormchris

Reply 13 days ago

Man, _thanks_, you saved my day!
These project are so frustrating because there is always some sort of library missing. We really need to out standards in place for SBOM (Software Bill Of Material). No one should be allow to publish anything without a proper SBOM, and all tools should be able to cinsume them.

0
None
millerjr02Earthwormchris

Reply 20 days ago

That fixed that issue! next issue I have is warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
I think this may be related to the fact that I only have Com 1 and Com 4 for ports?