Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE, TCP and UDP Support #1498

Merged
merged 3 commits into from
Apr 12, 2022
Merged

BLE, TCP and UDP Support #1498

merged 3 commits into from
Apr 12, 2022

Conversation

Scavanger
Copy link
Contributor

@Scavanger Scavanger commented Mar 31, 2022

Adds support for wireless connections.

Bluetooth Low Energy:
Hardware:

  • CC2541 based modules like HM1X/HC08/09
  • Nordic Semiconductor NRF (Adafruit BLE Shield)
  • SpeedyBee adapters

For CC2541 based modules a small hack in iNav is necessary: iNavFlight/inav#7931
See also: iNavFlight/inav#7783

TCP and UDP
See discussion here: #1436

I have written a firmware for ESP8266 modules that allows easy configuration via a web interface.
It checks MSP frames for errors and wraps an MSP frame in one UDP/TCP packet.
UDP runs very smoothly, TCP is a bit laggy.
https://github.com/Scavanger/MSPWifiBridge
But any device that forwards the data of a UART one-to-one to TCP/UDP should work the same way.

if #1447/iNavFlight/inav#7812 is merged, this PR/iNavFlight/inav#7931 may needs a rebase.

@@ -463,22 +463,33 @@ var mspHelper = (function (gui) {
console.log("Servo mix saved");
break;
case MSPCodes.MSP2_INAV_LOGIC_CONDITIONS:
LOGIC_CONDITIONS.flush();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Scavanger this is a great PR. But we have to change how it's done. I've left a review in the INAV repo but it ultimately goes down to:

  1. Leave MSP2_INAV_LOGIC_CONDITIONS unchanged
  2. Add MSP2_INAV_LOGIC_CONDITIONS_SINGLE frame
  3. Switch configurator to use MSP2_INAV_LOGIC_CONDITIONS_SINGLE

And then, in one of future releases we can remove support for MSP2_INAV_LOGIC_CONDITIONS completely.

What do you think?

@DzikuVx DzikuVx added this to the 5.0 milestone Apr 1, 2022
@Scavanger
Copy link
Contributor Author

@DzikuVx

Yeah, this is the cleaner way.
Should the version check for firmwares < 5.0 remain in and then be switched back to MSP2_INAV_LOGIC_CONDITIONS if necessary?

@DzikuVx
Copy link
Member

DzikuVx commented Apr 1, 2022

@Scavanger yes, we'd like for Configurator 5 to support INAV 4. So it should indeed check for supported message.
If this will be to time consuming or just too complex we can always say: sorry, we do not support older version. Your call

@DzikuVx
Copy link
Member

DzikuVx commented Apr 5, 2022

@Scavanger could you please add a small doc here or in the firmware repo on how to use it? It would be awesome to have at least a short explanation of what's going on

@Scavanger
Copy link
Contributor Author

@DzikuVx DzikuVx merged commit 2fb3faa into iNavFlight:master Apr 12, 2022
@EduardTheThird
Copy link

Tried this feature using this board, https://www.adafruit.com/product/2821,
running this code:
https://github.com/EduardTheThird/inav-configurator-ESP8266-WiFi-UART-transparent-bridge/blob/master/WiFiUartTransparentBridge/WiFiUartTransparentBridge.ino

Worked, thanks! I only had to change my baud rate to 57600.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants