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

Add support for Web Bluetooth connection to device #16

Open
deinhofer opened this issue Sep 14, 2023 · 1 comment
Open

Add support for Web Bluetooth connection to device #16

deinhofer opened this issue Sep 14, 2023 · 1 comment

Comments

@deinhofer
Copy link

Web Bluetooth is implemented for many browsers and OSs including iOS and Android.
So adding support for Web Bluetooth would enable to configure the devices (FABI, FlipMouse,...) from within a smart phone without having to connect it via a cable.

There is a library developed by Espruino which supports both Web Serial and Web Bluetooth connections. So this way we could consistently support both.

So on the client side it is probably not a big change, but I guess we would have to implement a Serial connection over Bluetooth in the firmware of our devices.

See more at:

@benjaminaigner
Copy link
Collaborator

I think the current WebSerial together with a Bluetooth based serial connection is no way, because it will never be supported on mobile devices (it would be the easiest option).

WebBluetooth does add Android to the list, but iOS is not working out of the box (you need to install a special browser):

https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API
http://www.espruino.com/Quick+Start+BLE (iOS)

Nevertheless, you are right, we should add WebBluetooth for mobile configuration possibility.

We need to implement an additional GATT characteristics to the currently used HID ones.
And this must be done for 2 different BT chipsets:

The uart.js library looks like they are using the "Nordic UART service" behind the scenes, which means we need these UUIDs to be compatible with the library (otherwise it won't work):
https://github.com/espruino/EspruinoWebTools/blob/2ab71a33d69bfda40465174ffe57adb03c21fc42/uart.js#L117

Personally I really would like to have this feature, but I'm not sure when we should do that.
In addition, we need to adapt the firmwares in the controllers (FM3, FABI2, FABI3) a little bit to distinguish between
"serial" commands coming from the BT module or responses from the BT module to serial commands from USB-CDC.

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

No branches or pull requests

2 participants