Betaflight-configurator: Mobile support?

Created on 24 Sep 2019  路  23Comments  路  Source: betaflight/betaflight-configurator

Has there been any effort to port the configurator to a mobile (Android and possibly iOS) app? It seems that either Cordova or Flutter would be the best approach. It'll basically be a webview with a thin wrapper around the chrome.* calls. As far as I can see the following Chrome Apps APIs need to be ported:

chrome.runtime.lastError
chrome.storage.local.get/set/remove
chrome.app.window.create/current
chrome.fileSystem.*
chrome.usb.*
chrome.serial.*
chrome.sockets.tcp.*

For Cordova, the following plugins already exist, although most of them are not actively maintained anymore:
https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-runtime
https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-storage
https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-fileSystem
https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-usb
https://github.com/r1000ru/cordova-plugin-chrome-apps-serial
https://github.com/KoenLav/cordova-plugin-chrome-apps-sockets-tcp

For Flutter or another framework, it would require creating the Chrome Apps API wrapper from scratch.

Feature Request

Most helpful comment

I didn't have too much time to work on this, but there is some progress:

flutter-bf-config

All 23 comments

No, it has been talked several times but nobody has tried to do it. I don't have experience with it so I can't give an opinion.

It will be a great addition, but we need some requisites:

  • The maintenance must be very low. We don't have too much time for it.
  • It must use the sources of the standard Configurator, without the need of duplicate and modify each of them.

Do you have experience with this? Do you think is possible?

@niek Have you tried "Speedy Bee" application by Runcam? It does work via cable as well.

Yep, Speedy Bee works with Betaflight, Inav and Kiss and as a bonus you can change motors spinning direction, however it won't have the latest changes in Betaflight configurator

I am aware of Speedy Bee, but that's closed source (CMIIW) and doesn't have the full/latest Betaflight Configurator functionality.

I'll try to build something based in Flutter (since the Cordova libs are deprecated) using the existing source and see how far it'll come.

Waiting your news about it 馃

flutter looks like it uses a slightly different language, but this might still be worth looking at if shipping standalone apps is possible. is "flutter for desktop" a thing?

Yes, flutter desktop was released recently. It's still in heavy development though and webviews are not yet supported. Ref: https://github.com/flutter/flutter/issues/31712 https://github.com/flutter/flutter/issues/31713 https://github.com/flutter/flutter/issues/31714

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@Niek have you worked on this? Only to know, if not the stale bot will close this if we don't take some action ;-)

I didn't have too much time to work on this, but there is some progress:

flutter-bf-config

I tried to port the configurator to android with Cordova and it works well. The main issue I found actually is the firmware flasher : the configurator detects dfu but is not able to flash the fc.
I created gulp tasks to build the cordova folder with the ressources of the classic configurator. Only the serial.js file is different. If you are interrested https://github.com/WalcoFPV/betaflight-configurator/tree/cordova

@walcofpv woow very good neews, how I can try it? With normal yarn gulp build?

You can try this apk https://github.com/WalcoFPV/betaflight-configurator/releases/tag/10.6.0
Actually yarn gulp cordova will build the cordova folder. But you need to install java jdk, android sdk and build manually with cordova command line. I try to find an easy way to build the app with gulp.
Moreover, I found an other bug, sometimes, after a "Save and reboot", you need to manually disconnect and reconnect the fc

Good job @WalcoFPV! The Cordova route is definitely quicker to implement (although not as cross-platform, I don't think there is enough iOS support in the plugins to make it work on Apple devices).

BTW I think the "plugins" dir should not be committed to the repo, as those should be installed by NPM (to keep the changes as minimal as possible).

I see release 10.7.0 has Android support (preview), is this a NWJS build for Android? I can't find any reference in this repo or NWJS. Or is it built from the @WalcoFPV repo?

It will be merged and released AFTER 10.7.0.

Would be great to see a iOS version, too! Or are there any technical restrictions due to iOS?

@Thunfisch2 It should be possible to make a ios version. But first we need to implement bluetooth connection in the configurator

@Thunfisch2 It should be possible to make a ios version. But first we need to implement bluetooth connection in the configurator

I saw that configurator seems to support Bluetooth already right. It鈥檚 more of a Cordova thing?

But first we need to implement bluetooth connection in the configurator

Hey @WalcoFPV, is there are any approximate dates when we can expect support connection via bluetooth?

@molor No. There is no date. I began to work on it but I don't know when it will be finished

@molor No. There is no date. I began to work on it but I don't know when it will be finished

Glad to hear this! What kinda bluetooth module are you using on your FC to communicate with the app?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Etruscian picture Etruscian  路  10Comments

Stavr0s91i picture Stavr0s91i  路  5Comments

richard-scott picture richard-scott  路  3Comments

el-kwadro-fpv picture el-kwadro-fpv  路  8Comments

MathijsG picture MathijsG  路  9Comments