Sending data from mobile device to micropython device over bluetooth

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Richardson
Posts: 4
Joined: Thu Dec 24, 2020 9:07 am
Location: https://mini-militia.com/

Re: Sending data from mobile device to micropython device over bluetooth

Post by Richardson » Sat May 01, 2021 6:19 am

Tupps wrote:
Tue Dec 29, 2020 10:55 am
From an App Developers perspective, BLE is the easiest option for communicating with a device. An app developer has the APIs and the control to talk to the device. Using other protocols are difficult on to implement.

One other thing to look at is Web BLE which is a Chrome (as in browser) feature instead of building custom Apps. This will make your configure tool available to Windows/Mac/Linux via Chrome (although Linux isn't 100% on all versions) and Android. The only downside I have seen with WebBLE is that the some older versions of chrome setup a low MTU (think under 50 characters) which is a PITA for SSID passwords (which can be 63 character long). However this seems to have been fixed in the later builds on Android Chrome.

Only downside is the Web BLE isn't officially supported on iOS (there are a few options).
How about Unix BLE support? I'd like to have that so that I can use my desktop for development. Of course Unix BLE is way different but that would be hidden behind the API.

BetterAutomations
Posts: 83
Joined: Mon Mar 20, 2017 10:22 pm

Re: Sending data from mobile device to micropython device over bluetooth

Post by BetterAutomations » Sat May 08, 2021 11:22 am

mattyt wrote:
Mon Dec 28, 2020 1:29 am
Damien presented an overview at a recent Melbourne MicroPython Meetup but, unfortunately, we couldn't organise a recording of it at the time. He did mention he could repeat the session and record it, particularly if there's demand...
I'm interested. If I can't figure out L2Cap though I'll prob just send files in chunks over GATT. The documentation says it's not supported on ESP32 so that's probably the way I'll have to go.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Sending data from mobile device to micropython device over bluetooth

Post by jimmo » Sun Jul 11, 2021 2:36 pm

Richardson wrote:
Sat May 01, 2021 6:19 am
How about Unix BLE support? I'd like to have that so that I can use my desktop for development. Of course Unix BLE is way different but that would be hidden behind the API.
I use the Linux MicroPython port for all my BLE development with an USB BLE dongle. Mostly I use a Nordic nRF52840 Dongle running the Zephyr HCI Controller. You can also use few different "real" USB BLE dongles (i.e. BCM20702A or CSR8510) if you use the Bluekitchen Btstack stack (instead of NimBLE).
BetterAutomations wrote:
Sat May 08, 2021 11:22 am
I'm interested. If I can't figure out L2Cap though I'll prob just send files in chunks over GATT. The documentation says it's not supported on ESP32 so that's probably the way I'll have to go.
If it helps, take a look at the file transfer demo in aioble.

(Althogh please see my WIP branch here with a bunch of improvements and fixes, hoping to turn into a PR this week -- https://github.com/jimmo/micropython-li ... e/examples )

Post Reply