
4
Project Caretaker. Part 10. Bluetooth
Among other things, I had previously attempted to get into FPV. For various reasons, it wasn't successful, but I was left with a Radiomaster Tx12 (controller, first revision without BT and ELRS), as well as an external ELRS module and a receiver with an antenna.
The initial plan was to connect the ELRS to the ESP32 and connect the receiver to the controller.
As usual, something went wrong here - the receiver wouldn't bind with the transmitter. Investigations led to the need to update the transmitter firmware, which fortunately can be done via Wi-Fi:
- Download the ELRS configurator or launch the web version,
- Build the latest firmware version,
- Connect to the transmitter's Wi-Fi network,
- Open its IP, try to flash and... fail without any explanation of the reasons.
You can't flash directly from version 1.0 to the latest. Through trial and error, I went through all versions - only managed to flash the old version 2, which provided a new interface and the ability to get information about errors during updates - the error was strange - the new version firmware file was too large.
Fortunately, Google still works, and a hack was found in the form of a binary that is uploaded as if it were firmware to the ELRS TX module and repartitions the internal memory so that the new firmware can fit entirely. Upload the hack, then the firmware, and you get an up-to-date device.
I didn't get to flashing the receiver and connecting it - in the new version, the ELRS module menu had an option to pretend to be a BT controller (the module is on ESP32, it would have been a shame not to use the built-in BT, so kudos to the developers).
Our ESP32CAM also supports BT, so the need for a separate receiver disappeared (and now we don't need to occupy the RX and TX pins of the controller).
I managed to implement the connection in the firmware with just one prompt, and it took a bit more time to figure out the packet data structure. Perhaps this is some standard format for BT data transmission, but it was unknown to me and I had to reverse-engineer it, fortunately there was no encryption.
Apart from the readings of two joysticks, nothing else came in the analyzed packet - no other bytes of the packet change, no matter which controls you use on the controller. It might be possible to subscribe to other data channels that BT sends (or whatever they're called, I'm not strong in BT terminology), but this is enough for me - there's no point in turning on the light from the controller or changing the video resolution, and two sticks are sufficient for control.
Next, we simply add a button to the firmware that activates BT mode with status display, and test it
No comments yet
-
Project Caretaker. Part 10. Bluetooth
Connecting the Radiomaster TX12 as a BT controller through the ELRS module. -
Project Caretaker. Part 9. Charging
Since one of our goals is remote control, we should address the power supply is… -
T-CTF: Write-up of a Cybersecurity Competition
Capture The Flag (CTF) is a competition for white hat hackers, who need to "hac… -
Project Caretaker. Part 8. Software
The ESP32CAM is a fairly popular controller. Wi-Fi-controlled devices with came… -
Project Caretaker. Part 7. Hardware
I've already shown the device diagram, let's now take a closer look at the phys… -
Regional Championship in Competitive Programming
I'll diversify my posts about robots with a life story. I'll return to robot in…