lancaster-university / microbit-samples

http://lancaster-university.github.io/microbit-docs
Other
114 stars 72 forks source link

Standard bluetooth serial #14

Open lloyd-g opened 6 years ago

lloyd-g commented 6 years ago

I'm having problems with connecting the bluetooth-uart example. I can connect to it with a phone but not a raspberry pi zero w or windows 10. After going through all combinations of config.json files. It suddenly came to me, when looking at the profile on nRF connect for android.

The code is using UART over GATT, not standard RFCOMM over L2CAP protocol. I have two question.

  1. Any one know how to connect UART over GATT on raspberry pi zero w and windows 10?
  2. Can this device be programed to give standard RFCOMM over L2CAP protocol?
ghost commented 6 years ago

You can't use RFCOMM. This is a Bluetooth Low Energy (only) device.

You should be able to use the UART service from a Raspberry Pi though. If you know how to read and write characteristics and how to handle notifications, that's all you need to know from the Pi end. For the micro:bit, see the information here: https://lancaster-university.github.io/microbit-docs/ble/uart-service/