• It would be very convenient if I could connect the app loader to my bangle.js during development using a WebRTC connection. In this way I would never have to deconnect the watch from my phone and my phone remains the bridge for all development work for both web IDE and app loader.

    I would also be willing to try to implement such a feature if someone could point me in the right direction.

  • It already exists!

    Just go to the App Loader within Gadgetbridge, then click the Web IDE Remote button.

    Take that link and copy it into
    Web IDE -> Settings ->Communication -> Remote Connection Bridge Peer ID on your Desktop and you're good to go.

  • Why @Gordon, thanks for your quick and thorough answer!

    I'm afraid I didn't make myself clear. I already extensively use the feature you described.

    What I can do now is this:
    bangle -> app loader on phone -> web IDE remote -> Web IDE on laptop

    What I'd like to do is:
    bangle -> app loader on phone -> web IDE remote -> development app loader on laptop

    So it would be great if the app loader could connect using the web IDE remote to the phone and therefore to the banglejs

  • additionally it would be nice if apploader shared the same code/library as the IDE itself for making the connection so it could use also serial/usb (for non-BLE espruinos like stm32) and possibly also the newly added SWD console (for Bangle 2 over cable) that could use dapjs/webusb or also usb serial (via translation in SWD debug dongle)

  • So it would be great if the app loader could connect using the web IDE remote to the phone and therefore to the banglejs

    Ahh, I see what you mean. I'm afraid I think that's a bit too painful - but for development I'd suggest you set up a webserver on your laptop, then you can change the settings in Gadgetbridge to point it at a version of the App Loader that you're hosting locally so you can make changes quickly.

    As long as you have ADB on your Laptop you can even connect via USB to your Laptop and do chrome://inspect/#devices in Chrome to get a full debugger and console for the App Loader that's running inside Gadgetbridge

    it would be nice if apploader shared the same code/library as the IDE itself for making the connection

    Yes... Actually for the Pip-boy I currently have a bit of a hack to use the UART.js library which allows Serial communications (I'm hoping that work will go live soon), and I wanted to fix that properly.

    Can you think of any other communications methods you'd want (or just Web Serial/Bluetooth?). For some reason I hadn't considered using the Web IDE's communications libraries before.

  • Can you think of any other communications methods you'd want (or just Web Serial/Bluetooth?).

    Well in addition to WebRTC as mentioned above, the SWD/RTT one over dapjs/rtt https://github.com/ARMmbed/dapjs/blob/master/examples/rtt/rtt.js could be one more in future, if it is not solved in hardware dongle by translating to plain usb serial. Integrating connection via rtt.js into IDE would allow unmodified SWD debug probes work with SWDCON console without any complicated setups (like running openocd + espruino command line IDE proxy). And having only IDE working but not the app loader is only half of the solution.

    For some reason I hadn't considered using the Web IDE's communications libraries before.

    Do you know why? Currently Gadgetbridge has builtin app loader integrated that is reusing the connection. It would also make similar sense from PC side - having Web IDE (or the command line espruino) connected and launch app loader from that and reuse the same connection.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Feature request: Use WebRTC/web IDE remote functionality in the app loader

Posted by Avatar for devsnd @devsnd

Actions