USB powered standalone map server

Imagine this: you've just reached the trailhead, miles away from civilization, and the map app on your smartphone decides it's time to go offline. Application status? Disabled. Updates? Forget it. Memory? Completed. Welcome to nature, where your phone is more lost than you are.

This is where it comes to the rescue Backcountry Beacon is an open source device that does not rely on Wi-Fi. It comes pre-installed with detailed USGS topographic maps that require no updates; it is equipped with a reliable GPS that accurately determines your location; It also works as a simple file server where you can store everything you might need on a hike, be it knot guides, plant guides, or even audio books from classic naturalists who really knew their stuff.

And at the same time, you don’t have to carry a bulky device with you. The Backcountry Beacon is compact and can be powered by a car adapter or a reliable power bank while you watch sunsets and ward off squirrels from your food bag.

Peculiarities:

  1. Offline maps and GPS: Navigate confidently with USGS topographic maps and built-in GPS—all without an internet connection.

  2. Personal file server: Download essential files for your hike—knot tying guides, plant guides, audiobooks, and more—and access them whenever you want.

  3. Portable and USB Powered: The device is small enough to fit in a backpack and is powered via a simple USB-A so it lasts as long as your battery lasts.

  4. Easy connection: The device creates a Wi-Fi hotspot with a QR code, making it easy to connect and access maps and files.

Restrictions:

  1. Speed ​​limits: With a throughput of about 1 MB/s, you will have to be patient – the device is not designed for high-speed data transfer.

  2. Limited multitasking: Although multiple connections are supported, the device cannot handle downloading multiple files at the same time. Process them one by one.

  3. Manual file upload: You will have to download maps and files yourself before the hike, so prepare in advance.

The Backcountry Beacon will be your faithful companion on off-the-grid trips, even if it prefers to take its time. It's not built for speed, but it's ready to keep you consistently and reliably in the loop wherever the trail leads.

The Github repository is now publicly available.

Required materials

Supplies

For assembly you will need:

  1. Lilygo TDongle S3

  2. GPS module BZ-181 FPV

  3. Qwiic cable 50mm long

  4. A suitable microSD card (I use this)

  5. 3D printed GPS holders (optional)

The list of equipment here is quite short, and the project will cost less than $100, and depending on the choice of SD card and cable length, even less, around $60.

Step 1: Print GPS Holder

Print GPS Holder

GPS Holder Print

Print GPS Holder

GPS Holder Print

Print GPS Holder

GPS Holder Print

Print GPS Holder

GPS Holder Print

Bringing Backcountry Beacon to Life – Layer by Layer

It's time to fire up the 3D printer and print the parts that will hold the GPS module and keep it safe. I have placed the models in the files below for review before printing.

Download 3D models:

  1. Go to the parts3D/ folder in GitHub repositories and download the STL files for the GPS mount and other components you plan to use.

Printing details:

We printed these parts on a photopolymer printer using a material similar to ABS for durability. Here are the settings we used:

  1. Support: Automatic supports with 80% density.

  2. Layer thickness: 100 µm (0.1 mm)

Due to the small design elements, we cannot guarantee the print quality of an FDM printer, but if you are comfortable setting up your machine to create detailed models, you can give it a try.

Don't have a 3D printer?

No problem! These parts can be ordered from various 3D printing services. Just provide them with the STEP files and they will do everything for you.

BackcountryBeacon

Step 2: Connecting the GPS module

Wiring the GPS Module

Connecting the GPS module

Wiring the GPS Module
Wiring the GPS Module

Now that you have all the necessary components ready, you can connect the GPS module.

Both the T-Dongle S3 and the drone's GPS module use Qwiic connectors, making connection relatively simple, but with one catch: although the connectors are the same, the pin configurations are different. You will need to swap the pins on the GPS side of the connector – the operation requires a very careful approach, but once completed you will have a working connection.

Qwiic connector pin configuration:

  • T-Dongle S3 (Qwiic): GND, 3.3 V, TX (T-Dongle), RX (T-Dongle).

  • GPS module: 5V, RX (GPS), TX (GPS), GND

Setting up the pin order:

To make the correct pinout, carefully use a small flathead screwdriver or pin extractor to free each pin from the GPS connector housing. Then insert them in the correct order according to the specified pin configuration.

If you're not familiar with this process, here's an example of how to extract and reinstall pins: Here.

For clarity, I showed the location of the pins on the cables so that this can be easily repeated.

Connecting the GPS module to T-Dongle S3:

Once you have placed the pins correctly, connect the Qwiic connector to the GPS module and the other end to the T-Dongle S3. Make sure the connection is secure and that the wires are not strained or loose.

Now that the connection is complete, the GPS module is ready to begin exchanging data with the T-Dongle S3. Next we move on to installing the GPS holder and assembling the entire structure.

Step 3: Install the GPS Holder

Installing the GPS Holder – Snap, Slide, and Secure

Installing the GPS Holder

Installing the GPS Holder – Snap, Slide, and Secure
Installing the GPS Holder – Snap, Slide, and Secure

Assembling the GPS module

Assembling a GPS module with T-Dongle S3 is as easy as shelling pears, to do this follow these steps:

  1. Connect the cable: To begin, connect the Qwiic T-Dongle S3 and the GPS module with a cable. The pin order is already set, so there is no need for additional settings.

  2. Install the bottom GPS holder: Attach the bottom GPS holder to the T-Dongle S3. It should fit snugly, but if it feels too tight or too loose, you can lightly sand or touch up the 3D printed part for a perfect fit.

  3. Place the GPS module: Install the GPS module on the lower holder. Make sure it is securely fastened.

  4. Snap the top holder: Carefully secure the top holder of the GPS module – it should snap into place, holding everything securely in place.

  5. Optionally, secure with a tie: If you are planning active adventures in harsh conditions, you can additionally secure the structure by wrapping it with a tie. This will add strength and prevent the assembly from becoming loose when shaken.

That's it! Now your GPS module is securely attached to the T-Dongle S3 and is ready for use. Remember, if 3D printed parts don't fit perfectly after printing, a little sanding or adjusting will do the trick.

Step 4: Preparing to Compile

Get Ready to Compile

ESP32: Small but bold (with some features)

This tiny microcontroller is a monster for its size, but it has its limits. Think of it like a hiking multi-tool: very useful, but it can't knock down a tree. The ESP32 is great for simple tasks – it can serve web pages, handle Wi-Fi, and perform lightweight operations. However, there is one caveat – you should not expect high performance from it. This controller is not designed to work with heavy applications or complex servers.

Why static files?

Given these limitations, we exploit the strengths of the ESP32 by relying on static files. What does it mean? Everything – maps, web interfaces, resources – is pre-compiled and stored on a microSD card as static files. When you connect to Backcountry Beacon, the ESP32 does not attempt to generate pages or process requests in real time. Instead, he simply hands out pre-prepared files, like a friendly tour guide handing you a map at the entrance to a nature reserve.

Limitations of our static HTTPS server

Here's the thing: the static file approach means no dynamic content. If you're expecting complex web applications with real-time interactivity, this is not the case. Our server is very simple – like a reliable old compass that you always carry with you in your backpack. It does one thing very well: serving static content quickly and reliably. But it can't handle complex operations, processing data on the fly, or processing multiple heavy queries at once. But it wins in simplicity and reliability. This system just works, and that's exactly what you need in the wild.

What are we compiling?

So what do we have? This is what we load into those same static files:

  1. Offline maps: Detailed USGS topographic maps saved as image tiles. It's your main reference when you're out of network coverage, showing your exact location and surrounding area.

  2. Web interface: HTML, CSS and JavaScript files that make up a simple and intuitive interface for interacting with the device. No unnecessary elements – only what is necessary to complete the task.

  3. Additional materials: Everything you need on the trail, from knot tying guides and plant PDFs to videos for when you get stuck in your tent due to bad weather.

By compiling all this into static files, we ensure that Backcountry Beacon can perform its functions – without the need for the Internet, updates or any complications. Just reliable, ready-to-use access to the maps and resources that really matter when you're miles from the nearest Wi-Fi hotspot.

Step 5: Preparing the SD Card – Digital Starting Point

Prepping Your SD Card – the Digital Trailhead

Preparing the SD Card – Digital Trail

Formatting the SD card

Before loading all the maps and necessary files onto the SD card, it needs to be prepared and cleaned.

  1. Get a MicroSD card: You'll need a card with at least a 32GB capacity, and if you plan to load a lot of maps and resources, it's better to get a card with a larger capacity.

  2. Format the card:

a) On Windows:

  • 32GB or less: Right-click the SD card under This PC, select Format, and select FAT32 as the file system. Quick formatting is fine.

  • 64GB or larger: Windows may not allow you to format large cards to FAT32, so choose exFAT instead. This format is just as reliable and supports larger files.

b) On macOS:

  • 32GB or less: Open Disk Utility, select the SD card, and click Erase. Select MS-DOS (FAT) for FAT32 cards or ExFAT for larger cards, and specify the Master Boot Record (MBR) scheme. Then click “Erase”.

  • 64GB or larger: Follow the same steps, but select ExFAT format.

c) On Linux:

  • 32 GB or less: Use the command sudo mkfs.vfat -F 32 /dev/sdX (replace X with your SD card ID) to format the card to FAT32.

  • 64 GB or larger: Format the card to exFAT using the command sudo mkfs.exfat /dev/sdX. This will allow you to efficiently use more memory and process large files.

Setting up the initial directory structure

After formatting and preparing the map, it's time to set up the directory structure needed for Backcountry Beacon to work. This is where all the maps, web assets, and any additional materials you want to use on your hike will be stored.

  1. Download the template:

a) Go to our GitHub repository and download the sdCard folder. This folder contains the structure template that you will need to copy to your SD card.

  1. Copy the sdCard folder:

b) Simply drag and drop the sdCard folder downloaded from GitHub to the root directory of your formatted SD card. After copying, the structure on your SD card should look like this:

Root directory:

  • leaflet.css (for styling the map)

  • leaflet.js (for map interactivity)

  • error.png (in case some tile does not load))

  • favicon.ico (because every good website needs a favicon)

/tiles directory: Map tiles will be stored here, organized by zoom levels and coordinates.

/serve Directory: This is where your additional resources will be stored, such as PDFs, manuals, or any other files you may need.

Step 6: Loading map tiles – your offline navigator

Downloading Map Tiles – Your Offline Navigator

Loading tiles – your offline navigator

Downloading Map Tiles – Your Offline Navigator
Downloading Map Tiles – Your Offline Navigator
Downloading Map Tiles – Your Offline Navigator

Setting up and using a Node.js script to load map tiles

Before you hit the road with Backcountry Beacon, you'll need to download the maps you'll rely on when there's no coverage. These map tiles will allow you to see detailed topographical information without the need for an internet connection. We've simplified this process with a handy Node.js script.

1. Start with Cache Explorer:

  1. Visualization of available tiles: Please visit the website before downloading Cache Explorer. This visual tool will help you understand the map tile structure and give you a preview of the tiles you will be loading. While it currently shows tiles for Hawaii, you'll get an idea of ​​how the zoom levels and regions are organized.

  2. Plan your downloads: Use Cache Explorer to understand exactly what tiles and zoom levels you need for your specific area.

2. Set up your local environment:

  1. Install Node.js: Make sure you have Node.js installed on your computer. If not, you can download it from the official Node.js website.

  2. Clone the repository: Download the tileDownloader folder from our repository on GitHub and go to it in the terminal.

3. Install dependencies:

  1. Run npm Install: In a terminal, go to the tileDownloader directory and run the command to install the necessary dependencies for the script, including @turf/turf and @mapbox/tilebelt.

4. Load tiles:

  1. Run the download command: To download tiles for a specific state, such as California, up to zoom level 14, run the corresponding command in the terminal.

node tile-downloader.js --states "California:14" --output ./tiles

  1. Output directory: Flag --output specifies where downloaded tiles will be saved. In this example they will be saved to a folder called tiles in the current directory.

5. Check the download:

  1. Check the results: Once the download is complete, go to the output directory and make sure the tiles are loaded correctly.

  2. Organize Files: If necessary, organize tiles into appropriate directories for use with Backcountry Beacon.

6. Upload tiles to Backcountry Beacon:

  1. Transfer to Device: Once all the desired tiles are downloaded, transfer them to the desired location on your Backcountry Beacon's microSD card.

  2. Test your setup: Make sure everything is working by turning on Backcountry Beacon and checking that maps are loading.

Using Cache Explorer, you will get a clear picture of the tiles you need, making the download process even easier. By following these steps, you'll be able to fully equip your Backcountry Beacon with detailed maps for your outdoor adventures.

Step 7: Flashing – Bringing Backcountry Beacon to Life

Flashing the Firmware – Bringing Your Backcountry Beacon to Life

Firmware is the brains of your Backcountry Beacon. This is what turns the ESP32 into a powerful, portable server that gives you access to offline maps and files any time you need them. Firmware is the stage where we program the ESP32 to perform given tasks: serving pre-compiled static files and managing Wi-Fi connections.

Preparing the firmware

  1. Firmware download:

a) Go to GitHub repository and download the latest firmware for Backcountry Beacon. The firmware is located in the firmware/ directory and is already configured to work with the LilyGo S3 USB adapter.

  1. Setting up PlatformIO:

b) You will need PlatformIO, an integrated development environment (IDE) that makes it easy to flash firmware on the ESP32. If you haven't installed it yet, download PlatformIO as a plugin for Visual Studio Code.

c) Open Visual Studio Code, go to the firmware/ directory you downloaded and open it as a project in PlatformIO.

  1. ESP32 connection:

d) Connect the LilyGo S3 USB adapter to your computer using a USB cable. Verify that PlatformIO recognizes the device by checking the connected COM port in the bottom pane of Visual Studio Code.

  1. Configuration and firmware:

e) Once you open the project in PlatformIO, ensure that the correct board configuration is selected. The platformio.ini file in the firmware/ directory is already configured for the ESP32, so you don't need to make any changes.

f) Click the Upload button in PlatformIO (it looks like an up arrow) to start the flashing process. PlatformIO will compile the firmware and upload it to the ESP32. It may take a few minutes, but once completed your ESP32 will be a full-fledged Backcountry Beacon!

  1. Firmware check:

g) Once the firmware is completed, open Serial Monitor in PlatformIO to ensure that the ESP32 is working properly. You should see status messages indicating that the device is booting up and ready to serve files.

What's next?

After flashing the firmware, your Backcountry Beacon is completely ready to use. All that remains is to turn it on, connect to its Wi-Fi network and start exploring your offline maps and resources.

Step 8: Go ahead and explore the world

Get Out and Explore

So your Backcountry Beacon is ready to accompany you on your next adventure. But this is just the beginning.

  • Make it yours: Whether you're customizing the device, exploring new ways to use it, or adding personal touches, this project is your opportunity to get creative. Your creativity and curiosity are the main driving forces in maximizing the potential of your Backcountry Beacon.

  • Share your discoveries: As you embark on your adventure, consider sharing your experiences, tips, and insights. You never know who might benefit from your expertise, and this is a great way to contribute to the spirit of nature exploration.

  • The most important thing is to go outside: Now that your device is ready, it's time to hit the road. The world is waiting to be explored, and Backcountry Beacon will help you navigate and discover new places. Enjoy the fresh air, take on the challenges of adventure and get the most out of every trip.


All the necessary programming skills can be developed through online courses led by experts. In the catalog you can watch all the programs and in the calendar — sign up for open lessons.

Similar Posts

Leave a Reply

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