Skip to content

API Upload

ChrisDaCrunk edited this page Nov 8, 2026 · 1 revision

API Upload Guide

ChrisDaDriver features an integrated cloud upload system that allows you to send your recorded WarDriving CSV logs directly from the M5Cardputer to supported cloud platforms (WDG Wars via API v2 and WarDrift(coming soon)) over secure Wi-Fi (WiFiClientSecure).


Prerequisites

Before initiating an upload, make sure:

  1. Your SD card contains valid WarDriving CSV logs in /ChrisDaDriver/WarDrive/.
  2. Your API keys are correctly configured in your SD card's config.txt.
  3. You are within range of a known Wi-Fi network with internet access. (or Hotspot on your Mobile phone)

How to Perform an Upload

  1. Open Main Menu: Long-press Btn 0 on your M5Cardputer.
  2. Select Upload Service: Use the arrow keys to navigate to Upload to WDG Wars (or WarDrift) and press Enter.
  3. Wi-Fi Connection Check:
    • If the device is not connected to a Wi-Fi network, it will automatically launch the WIFI Scan Menu.
    • Select your target Wi-Fi Access Point and press Enter.
    • If a saved password exists in the secure ESP32 NVS flash storage, it will connect automatically. Otherwise, an on-screen password input overlay will appear.
    • Otherwise, it will save the password if successfully connected.
  4. File Selection Menu:
    • Once connected, the File Selection Browser opens, displaying all available .csv logs along with their file sizes (e.g., 12.5Mb).
    • Use the Up/Down arrow keys (; / .) to navigate through the files.
    • Delete a file: Press the left key (,) to delete the currently highlighted file (requires a safety confirmation prompt).
  5. Initiate Upload: Press Enter on the desired file to start the upload process.

Upload Process & Server Responses

During the upload, the display will show an "Uploading..." status with the target filename.

  • Streaming Architecture: The firmware opens the CSV file and streams it block-by-block using multipart/form-data via a secure TLS socket with cooperative multitasking (yield()) to prevent watchdog timeouts.
  • API v2 Response (202 Accepted): The server processes the multipart upload and returns an asynchronous job queue status (HTTP/1.1 202 Accepted with a JSON payload containing the job_id).
  • Success / Failure Feedback: The screen will display a clear status message (Status: Success! :) or Status: Failed :() before returning to normal operations.

Configuration Keys (config.txt)

Ensure your API keys are defined in your config.txt to avoid missing key errors:

WDGWARS_API_Key your_wdg_wars_api_key_here
WARDRIFT_API_Key your_wardrift_api_key_here

Clone this wiki locally