Introduction: HackerBox 0042: Worlds of WiFi
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
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.
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)
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.
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
- Install Arduino IDE
- Install ESP8266 Board Support for the IDE
- From the IDE Library Manager, install esp8266-oled-ssd1306 (v 4.0)
- Wire up TTL to USB module as shown here (3 wires only)
- Supply WiFi Scanner with AA Batteries (not USB)
- Open the WifiScanOLED.ino example code in the IDE
- Select Arduino IDE Settings as shown here
- Power OFF WiFi Scanner (Slide Switch DOWN)
- Hold Down Tactile Pushbutton
- Power ON WiFi Scanner (Slide Switch UP)
- Release Tactile Pushbutton
- Hit ARROW BUTTON on IDE to compile and upload
- 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.
Attachments
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.
53 Comments
4 years ago
I am failing to connect. data and power connections all look good. Not sure what is happening.
Arduino: 1.8.9 (Mac OS X), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), nodemcu, 26 MHz, 40MHz, QIO (fast), 1M (512K SPIFFS), 0, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Sketch uses 273468 bytes (54%) of program storage space. Maximum is 499696 bytes.
Global variables use 27436 bytes (33%) of dynamic memory, leaving 54484 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port /dev/cu.usbserial-1450
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
File "/Useibrary/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/upload.py", line 25, in
esptool.main(fakeargs)
File "/Users/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool/esptool.py", line 26main
esp.connect(args.before)
File "/Usery/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool/esptool.py", line 468, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
_
Reply 3 years ago
I had a similar problem. I pulled out the multimeter and found that the voltage regulator wasn't working. There was no voltage going to the ESP or the OLED. I happened to have another similar 3.3V regulator in my junk box so I swapped it in. Everything worked fine after that.
4 years 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.
Reply 4 years ago
I used the image above to put the circuit togethor.
It's different. The reference image shows one yellow band on right, next yellow band on left, and so on. User images where the screen is working, shows them all or most on the same direction.
edit: thats not it then, I'll post my images
Reply 4 years ago
Resistors are not polarized. Their function is to resist the flow of current. it does not matter which way they are installed. Could you please provide a picture of your assembly so that i can investigate. perhaps the code you loaded as well.
Reply 4 years ago
Got it! Thanks :)
Reply 4 years ago
What did you do to get the screen to work?
Reply 4 years ago
I got some wire cutters this time, which I should have already had, but didn't. I got a better soldering iron tip and overall better tools. Most importantly I got one of those many-arm thingies to hold it while I went to town on it. The end result was that I discovered one of the solders was not making contact, you can see it in the image below, once I resoldered all those neatly, everything started working.
Reply 4 years ago
I took out my clippers and went to town on the back to quell my shame of the previous images. When I did this, I cut them flush down to the board through my huge globs and all. I love my new clippers.
Because I cut them flush, I noticed one got cut UNDER my tiny glob of solder I was so certain was properly affixed. You can see the 2nd resistor from the bottom on the left of the image is more like a hole+wire instead of a solid mass like the others, I'm guessing this or another connection(lack thereof) may be at fault.
Still trying to fix it now.
Reply 4 years ago
Firstly allow me to apologize for my absolutely rubbish camera on my phone. I took two pictures of the front since different details were better shown with and without flash. Hope the picture of the backis okay.
About the long leads, when I assembled this, I didn't have clippers, but I do now and it looks like a teardown is imminent so I intend to trim them more properly. I dont *think* any are touching anything though, I tried to be careful.
I replaced the battery pack solder-on with 2 pins I had and use alligators to power it from the same detached pack and I've got brand new batteries in there now. In operation, it seems able to communicate and I can program it successfully from adruino IDE. During the whole process, the screen never comes on, the serial monitor can see it when I press the button, this made me think my power portion was working, at least for the ESP. I'm a C/C++ guy, everything compiles as expected with minimal tweakery. Obviously I'm a programmer though, my circuit is fail. I haven't had a problem with the last 5 boxes though. I'll grab the code too if you think that is needed, didn't change anything there.
My only problem is the screen never comes on, can I power it up to test the screen or require backing code to light it at all? Thanks in advance for all your suggestions.
4 years ago
My display is showing the information upside down, is there a way to correct this? Also there is a lot of white noise around the edges.
Reply 4 years ago
Actually after resetting it is right side up and no white noise in display now. So working fine now.
Tip 4 years ago
So initially i was confused about the USB Dongle thingy. I just assumed it plugged right in. I also assumed that usb would power it... . So after getting on track and actually soldering the "AA" battery pack to it, i found out that the TX, RX and GND signals line up if you flip the CH340 over (illustrated). However the only flaw i have seen is that the TX and RX are backwards. Since I love to hack stuff, time to cut some PCB Traces and add in new ones. with the finished result the CH340 is now pluggable (IF you turn it over). I also went ahead and redesigned my own version of this little unit since I love rechargeable battery packs. This new board is smaller and measures 70mm x 40mm. it features a DC/DC boost converter module that can be powered by any 3.7V LiIon/LiPoly battery and convert the battery output to 5.2V DC for running your 5V projects. A 1000mA 3.3v regulator was added for the functionality of this circuit. For the programming this features a CP2102 USB to UART Bridge. Happy Hacking everyone !!! Can't wait for the next hackerbox!
Reply 4 years ago
I cut the traces on the back side of the pcb and cross connected them with short insulated leads. Thanks for your info, quite helpful.
4 years ago
Hey Hackerbox,
Do you have an engineering diagram that I can use to create a 3d printed box for it?
Thanks.
Kenny
Reply 4 years 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.
Reply 4 years ago
Thanks. I will give that a go.
Reply 4 years ago
Hello, was wondering if you designed a 3d box and if you did would you share?
Reply 4 years ago
I am working on it. If I get one designed in June, I will post it. I am envisioning something to snap over the front to protect the components there while leaving the side open to access the pins and swithch. The back will be open as well.
Reply 4 years ago
Was wondering how the box design was going? I too would like to print a nice cover for this package.