Introduction: HackerBox 0048: SIMSAT
Greetings to HackerBox Hackers around the world! For HackerBox 0048, we are experimenting with programming ESP8266 WiFi microcontroller modules, GSM mobile/cellular communications for IoT, integrated GPS satellite positioning, multi-band antennas, coaxial RF adapters, and power supply considerations for embedded wireless communication systems.
This Instructable contains information for getting started with HackerBox 0048, 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!
HackerBoxes is the monthly subscription box service for enthusiasts of electronics and computer technology - Hardware Hackers - The Dreamers of Dreams.
Step 1: Content List for HackerBox 0048
- WeMos D1 Mini Pro ESP8266 WiFi Module
- SIM808 GSM and GPS Breakout Module
- Soracom Cellular IoT SIM with $10 Credit
- GSM Quadband SMA Antenna
- GPS Antenna with 1m SMA Cable
- Two SMA to uFL/IPX Coaxial Cables
- MicroUSB Breakout Module
- Three Black Mini Solderless Breadboards
- Bundle of 65 Male Jumper Wires
- Pentester Labs "Hack the Planet" Decal
- Exclusive HackerBoxes Maker Decal
Some other things that will be helpful:
- Soldering iron, solder, and basic soldering tools
- Computer for running software tools
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: WeMos D1 Mini Pro
The WeMos D1 Mini Pro is a mini WiFi module featuring 16MB flash, external antenna connector, and built-in ceramic antenna. The module is based on the ESP-8266EX system-on-chip (SOC).
Make the initial tests of the WeMos D1 Mini Pro before soldering the header pins onto the module.
Instal the Arduino IDE and the ESP8266 support package
Under tools>board, be sure to select the "WeMos D1 R1"
Load the example code at Files>Examples>Basics>Blink and program it to the WeMos D1 Mini Pro
The example program should cause the blue LED on the module to blink. Experiment with modifying the delay parameters to make the LED blink with different patterns. This is always a good exercise to build confidence in programming a new microcontroller module.
Once you are comfortable with the module's operation and how to program it, carefully solder the two rows of header pins into place.
Step 3: Satellite Positioning
Satnav systems use satellites to provide autonomous geo-spatial positioning. They allow small electronic receivers to determine their location (longitude, latitude, and altitude/elevation) to high precision (within a few centimeters to metres) using time signals transmitted along a line of sight by radio from satellites. As of October 2018, the United States' Global Positioning System (GPS) and Russia's Global Navigation Satellite System (GLONASS) are fully operational global navigation satellite systems (GNSS). China's BeiDou Navigation Satellite System (BDS) and the European Union's Galileo are scheduled to be fully operational by 2020. Japan's Quasi-Zenith Satellite System (QZSS) is a GPS satellite-based augmentation system to enhance GPS's accuracy, with satellite navigation independent of GPS scheduled for 2023. Global coverage for each system is generally achieved by a satellite constellation of 18–30 medium Earth orbit (MEO) satellites spread between several orbital planes. (Wikipedia)
Step 4: SIM808 Breakout Module
The SIM808 module is a combined GPS receiver and GSM cellular/mobile transceiver. (Datasheet)
In this step, we will enable and explore the GPS receiver functionality.
WIRING: As shown, the SIM808 is wired to the serial port of the WeMos D1 Mini (or most any microcontroller) using three lines: RX, TX, and GND. The pins in the diagram correspond to the same code below. The 5V Power and Ground can be supplied from any high quality USB power bank or adapter using the included MicroUSB breakout. A bench power supply or similar supply can also be used. Do not try to power the SIM808 from the WeMos D1 Mini.
ANTENNA: Connect the GPS Antenna via its 1m SMA ccable to one of the SMA to uFL/IPX coaxial adapter cables. Connect the uFL/IPX end of the adapter cable to the coaxial connector on the SIM808 module marked GPS.
SATELLITES: Power up the SIM808 with the GPS Antenna connected. The RED LED (power) will come on. After a couple of minutes four (or more) GPS satellites should be acquired and the BLUE LED on the SIM808 will start blinking slowly.
SAMPLE CODE: Use the Arduino IDE to program the GPSdemo.ino example code into the WeMos D1 Mini. The Arduino Serial Monitor can be used to observe the time and position information determined by the GPS receiver. For example:
"1,1,20191001155512.000,36.118994,-115.167543,119.400,1.06,94.9,1,,1.1,1.4,0.8,,7,7,,,39,,"
Note that the field starting with the year (for example, 2019) can be broken down as a date/time stamp (in UTC). The next two fields are latitude and longitude. These can be pasted into a google search box for mapping to verify your location. Test the lat/long in the example string above for a map to DEF CON 28 in August 2020.
Attachments
Step 5: SORACOM Cellular IoT SIM
The Soracom IoT SIM is designed for IoT devices, development and deployment at scale. Featuring commitment-free, pay-as-you-go pricing and multi-carrier connectivity in over 130 countries. Available in a full range of SIM and eSIM form factors, with service across 2G, 3G, 4G LTE and Cat M1 bands (where available).
TEN DOLLAR CREDIT: The included Soracom IoT SIM includes a $10 data credit for initial experimentation.
SIM SIZE FORMAT: As shown in the image, the Soracom SIM Card includes an all-in-one or three-way SIM, the SIM808 modules requires he Micro SIM format so be careful not to pop out the Nano SIM outline.
SORACOM LINKS:
Soracom Registration Video
Soracom Developer Documentation
ANTENNA: The "Rubber Duckie" GSM Quadband SMA Antenna can be connected to the SIM808 coax port marked GSM using the second SMA to uFL/IPX Coaxial Adapter Cable.
EXAMPLE GSM CODE:TinyGSM, SIM808 Tracker, SnortTracker
Step 6: Satellite Internet - Coming Soon
Satellites can do a lot more than tell us where we are. The next era of satellite internet will be the result of a race to deliver affordable high-speed, low-latency internet. Several well-funded organizations have already begun launching satellites and more have launches scheduled soon. Satelliteinternet.com takes a look at those networks and the companies building them.
Step 7: Hack the Planet
We hope you are enjoying this month's HackerBox adventure into electronics and computer technology. Reach out and share your success in the comments below or on the HackerBoxes Facebook Group. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.
What's Next? Join the revolution. Live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month. Surf over to HackerBoxes.com and sign up for your monthly HackerBox subscription.
36 Comments
3 years ago
Bit older project now but will see if anyone has response or idea. I had no issue setting up the main project, pick up the GPS and all that. Being SIM808 I thought hey lets send txt message to my phone with the numbers. I do have the AT+SAPBR=3,1,\"APN\","soracom.io" command and it's showing on the Soracom network and active / online. When I send a txt, I get error back 28 which means "Unidentified subscriber". Here is the interesting thing, I can txt it, and the message receives with no issue! So I can receive but not send the txt. Looking all over I'm just bashing my head in.
Question 3 years ago
Ok, so I'm trying to get the GPS side of things working. I haven't moved on to the SIM card.
I was able to get the program loaded however the green LED is flashing I never get the Blue LED indicating a successful link to satellites. My lab is in my man cave (basement). I took it outside hoping to see it connect. Nothing! no link. I do live in Michigan and this time of year it is very cloudy but today I could see some patchy blue ski so I thought this would be my best shot for now. Wrong. What am I missing? below is my successful load.
esptool.py v2.8
Serial port COM9
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: dc:4f:xx:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
WARNING: Suspicious segment 0xee, length 0
WARNING: Suspicious segment 0x0, length 16777216
Warning: Image file at 0x0 is not a valid ESP8266 image, so not changing any flash settings.
Compressed 269888 bytes to 115611...
Writing at 0x00000000... (12 %)
Writing at 0x00004000... (25 %)
Writing at 0x00008000... (37 %)
Writing at 0x0000c000... (50 %)
Writing at 0x00010000... (62 %)
Writing at 0x00014000... (75 %)
Writing at 0x00018000... (87 %)
Writing at 0x0001c000... (100 %)
Wrote 269888 bytes (115611 compressed) at 0x00000000 in 3.1 seconds (effective 689.5 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
3 years ago
I waited for 10 minutes to get the GPS to connect. It didn't - light stayed red. I pulled the antenna off to check the connection. Antenna connection came off board. Nice. Is there a trick to getting these on and off? Anyway, that is that and the stuff is in the trash now.
Reply 3 years ago
Mine came off too, the mounting ring AND the center pin. I VERY carefully soldered the pin and ring back on and it seeeeems to be OK, but I added a glob of hot glue to be sure it doesn't come off again. In the end, I think this was a nice trial piece, but I'll need to buy another SIM808 or FONA if I want to get serious.
Question 3 years ago
I'm not familiar with using SIM cards for arduino IoT. I've created an account on the sora.io website and registered the chip on my consule To get the card to go from 'ready' to 'active' is it some code I put into the WeMos D1, or do I need to activate it using another device first? Thanks!
Answer 3 years ago
I watched many videos trying to learn, and happened across this one:
His library of sketches is at http://www.iforce2d.net/sketches/, the one that I specifically grabbed was www.iforce2d.net/sketches/sim808GPSTracker.zip
In sim808.h, change line 348 to read
sendGSM("AT+SAPBR=3,1,\"APN\",\"soracom.io\"");
Power everything on, open the serial monitor, and a loooong time for the GPS to get a lock. Once it does, the sketch will move to the "upload my GPS coords" stage. Now wait even longer, and eventually your console.soracom.io SIM status will switch from Active/Offline to Active/Online.
I never did get my location to appear on his practice map page, but I can see in the monitor that my data is being sent, so that's something. At least I know the hardware is active and working.
Reply 3 years ago
Actually, give it a try now! I contacted the creator on YouTube, and there was an issue server side - I tried, and through no further effort of my own points started plotting!
Reply 3 years ago
Did you use the includd .ino sketch with the library and if so, did you have to make any modificaions to it? Thanks :)
Reply 3 years ago
I had to make two modifications: change the journey code (your unique identifier) and then replaced their APN login information Soracom’s
Reply 3 years ago
Thanks jdquaff! I'm gonna play with it more this weekend. I'll post back here with my results.
Reply 3 years ago
It does work now, though on one trip it just stopped after about 20 mins, no new points were uploaded. I didn't know until I got back, of course, and no logs, so can't say what happened.
Reply 3 years ago
Actually, I just remembered my first time using the same thing happened. I think by default the URL only pulls up a set number of points, so add at the end <=10000 or some other absurdly high number to get all of your data.
Reply 3 years ago
Yeah, my URL is iforce2d.net/gt/index.php?jn=mykey&tz=-8&os=1& lt=250
On one trip, I got about 15 data points at the start, then nothing for the rest of the hour. Other trips work all the way through. Meh.
Reply 3 years ago
Did you notice the space in your hyperlink? Right before the <=#? Might have something to do with it, but I also could be wrong I’m grasping at some straws haha
Reply 3 years ago
The comments system here was translating the lt= section, so I added a space so people wouldn't comment that I had an error in my URL ... which caused someone to comment that I had an error in my URL. :)
Reply 3 years ago
Oh no lol my bad!
Reply 3 years ago
Same thing happens to me sometimes - not sure what the issue is, but the lights flash on the SIM808 so I’m not sure what’s going on.
When it does work, it records a point every 10 seconds. I’ve never had it not work spontaneously, but sometimes on startup
Reply 3 years ago
Interesting! In the meantime, I moved over to trying out Adafruit's Treat Tracker, https://learn.adafruit.com/track-your-treats-halloween-candy-gps-tracker/overview, and after MANY alterations to get their FONA code to work, I got some results.
I'll have to give iforce2d's sketch another go, since Adafruit's use of AT+CIPSTATUS to verify connectivity causes headaches.
Reply 3 years ago
Hey there,
I am at the same point as you I think. I wasn’t seeing any updates on the map site, realized that I hadn’t signed into the APN, edited the code and STILL can’t get the GPS points posted on the site - but at least my SIM card is online.
Did you ever manage to get your journeys to upload on the site? Just curious; I sent an email to the video creator.
Reply 3 years ago
Your link to the url and the sketches is broken, server not found.