Firmware Reference
A look at A0's preloaded firmware "ESP32RET"
Introduction to ESP32RET
What is ESP32RET?
ESP32RET is the name of the firmware that comes pre-loaded on your new Macchina A0. ESP32RET stands for ESP32 (based) Reverse Engineering Tool and provides two primary functionalities*: ELM327 emulation for use with apps like Torque, and Wi-Fi based connection to SavvyCAN.
*These functionalities are current as of version 0.1, however future versions may have expanded features.
Note: there was a previous version called A0RET that you might still see references to in code, documentation, etc.
ELM327 Emulation, Explained Extra Efficiently
Why would you want to emulate an ELM327 device? ELM327 is a closed-source black box interpreter chip (a PIC with some firmware) and you'd much rather know exactly what is being sent to and from your car, right?
Another answer is that now you can take advantage of the numerous existing, (semi) working and tested applications out there for every platform.
SavvyCAN
A Super Powerful CAN bus reverse engineering and capture tool written by Collin Kidder. Wireless Car Hacking!
LED Color Codes
RED - Not connected (In WIFIMODE=2 you are creating an AP with the A0, so it will go green immediately because you're the AP)
Green - Ready to connect to application
Blue - Connected to application
Purple - Update mode
Smartphone apps
A0 should be compatible with any ELM327 based app.
Android - Torque Lite can be found at the link below:
Search the Google play store for more options.
iOS - Software version 14 of iOS breaks support for A0. We are working to regain iOS support. For those interested in testing on 13 or older make sure your app settings are:
Connection = WiFi
IP address = 192.168.4.1
OBD2 adapter port = 1000
Other ELM based software
A0 System Menu
Many low level configurations can be done via a Serial Terminal (Real-Term, Tera Term, Arduino Serial Monitor, etc). This includes turning ON and OFF WIFI and Bluetooth, setting CAN speed, and setting the WIFI password.
Here is the system menu:
To enter A0 System Menu using the Arduino IDE Serial Monitor, follow these steps:
If you don't already have the Arduino IDE installed, download and install the Arduino IDE from here.
Connect A0 to your computer with a USB cable (A0's LED should turn green)
Open Arduino IDE.
Select the port (port numbers change frequently, your port number will likely be different than the one pictured).
Open an Arduino Serial Monitor: (button in the upper right corner)
Set your baud rate to 1000000 if it is not already
Send a question mark (?) to open the Menu
On the left is the current setting. On the right in parentheses are the options. For example, BTmode=0 means Bluetooth is currently off. Send "BTmode=1" in the top line to turn it on. Send another ? to make sure the change was made.
Re-Flashing ESP32RET
ESP32RET is the firmware shipped pre-loaded on A0, follow these steps to return it back to that state.
Download the below Zip file
Extract the files
Plug A0 into your computer via USB
Run the correct file for your computer
PC - Updater.bat
MAC - Updater.sh
Linux - Updater.command
A green light should appear on the A0
To compile the code yourself, find everything for ESP32RET here:
Feel free to make improvements, submit pull requests and post issues!
Putting your own code on A0 (using Arduino IDE)
This removes the preinstalled ESP32RET
Using Arduino to install your own sketch
The following steps are needed to get started programming on the Macchina A0 with the Arduino IDE:
Install the Arduino Desktop IDE
Install the Macchina A0 Board Configuration
Build and upload a sketch
Arduino Desktop IDE
Follow the official installation instructions for your operating system then return here to continue with Macchina A0 specific setup.
Board Definition
Before using Arduino IDE with A0 for the first time, you must follow the instructions in the link below to add ESP32 board definitions.
Flashing A0
Make sure any dependent libraries are in your Arduino>Libraries folder
Connect A0 to your computer via a micro USB cable
In "Tools" set the Port
Select "ESP32 Dev Module" as board type
Upload a sketch
Press upload
Attached is a simple sketch "ColorPallette" for blinking the LED on A0 and the required "FastLED" Library (both need to be unzipped).
Last updated