Simple ESP Telemetry Serial Bridges

It’s fine. Took me a while to grasp what should have been more obvious to me.

I am happy to find these as they are exactly what I need to move data to my antenna trackers.

@Yuri_Rage This is not your code I am pretty sure but a C+++ noob thing. I do code quite a lot for a living but rarely in C++. Usually I just tinker with other people’s projects in C+++. Arduino IDE handles strings by default but a proper IDE demands you add #include in the header file. I have and I still cannot compile and get lots of these:
lib/BluetoothSerial/src/BTAdvertisedDevice.h:28:18: error: ‘string’ in namespace ‘std’ does not name a type

I only have the libraries you reference installed. Is there even a String library that can be installed?

I think that is my only issue…but I am stumped.

I think you may need to include Arduino.h for PlatformIO. Use the Arduino framework for Espressif boards. I can post a screenshot later if you still have issues.

Bingo. Thanks so much. That is my issue.

Yep. It’s auto included in the Arduino IDE. But if you include it in PlatformIO, you get all the “crutches” that come with Arduino and can still use a better IDE. However, PlatformIO will enforce declarations more strictly than the Arduino IDE, so you can’t put all of your utility functions or classes at the bottom of the main file like so many Arduino sketches and examples tend to do (poor practice, of course).

PlatformIO is also “smart” enough to rename a single .ino file to a temporary .cpp file during the build, so the projects can be used somewhat interchangeably between the two IDEs.

This is my typical platformio.ini when developing for ESP32 within the Arduino framework.

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200

FWIW the issue was something else. I had done what I always do which is to download the libraries and dump them in the lib folder. This did not work for one library – the one that did not think it was in an Arduino environment. I redid the project and tried without installing any libraries and PlatformIO found all of the required libraries and installed them. Compiled without any issues.

1 Like

If the libraries you’re using are within the Arduino scope, PlatformIO will find them. There’s a whole UI for that, or you can use the lib_deps tag in platformio.ini. Probably best to use the UI because it will automatically include syntax to keep the libraries updated.

Yuri – hopefully you can help me here. I have your Mavlink Client working on an ESP32 V1 Dev module. I am configuring it to feed Mavlink to an antenna tracker. I have an ESP32 is running Mav2PT on my Dragonlink TX and using UDP and connected to my mobile Hotspot. No issue connecting on my phone using QGround Control and Yaapu is working fine.Your ClientBridge is also connected and using UDP. I can see it is connected to my hotspot as a client. I can also connect Mission Planner to the UART pins on the ESP32 running ClientBridge and it does connect (so there is a heartbeat and the baud is ok) but it will not receive parameters. My antenna tracker (Pitlab) is obviously not a GCS and only looks for a few specific Mavlink packets and I do not think will request parameters. Either way I do not seem to be able to receive Mavlink packets through this setup. Any idea what I am doing wrong here?

No clue man. You have like a dozen radios in that setup, and it sounds like a nightmare.

1 Like

Sounds more complex than it is. Only two ESP32 radios that are using my phone’s hotspot. Just trying to bridge Mavlink to an antenna tracker. Weird that it’s is transmitting heartbeats but not mavlink packets. I will continue to tinker though.

The problem probably lies in the telemetry configuration and not in the serial bridges. They are just transparent links.

For sure. The serial bridge does seem to be fine in as much as it has been given an IP address. I was just wondering about the significance of connecting on Mission Planner through your serial bridge but not passing any mavlink packets. For it to connect the baud and serial connection has to be correct. Anyhow I will play with it some more.