Why aren't there any Bluetooth related functions?


#1

Hello David the great and powerful! And all the wonderful uLispers!

I really like uLisp running on my tiny little things.

It seems I can’t find any Bluetooth related function in uLisp on any platform. There are some Wi-Fi extensions, Graphics extensions, etc. But no Bluetooth.

I think many platforms have Bluetooth built in, for uLisp to have the Bluetooth extensions seems very natural to me. But I just can’t find it.

Am I missing something? Or the Bluetooth extensions are indeed useful, only they are waiting to be developed?


#2

The examples provided with the boards that support Bluetooth seem to be very application specific and microcontroller specific. This will make it difficult to implement generic Bluetooth functions in uLisp.

The alternative would be to implement each Bluetooth application as a uLisp extension file; see:

Adding your own functions

What would you like to do with Bluetooth? I’d welcome suggestions about what sort of Bluetooth functionality it would be useful to implement.


#3

Thanks for the reply! I will look into the link you provided.

I’m using a RPI pico W to detect nearby Bluetooth Beacons. This is the only thing stops me to use uLisp.

Currently I’m using a MicroPython lib aioble which provides the BLE scanning function.


#4

Can you give a bit of background information:

  • What Bluetooth Beacons would you recommend I support?
  • There seem to be different protocols: UUID, Major, Minor, TX Power, Interval, iBeacon, and Eddystone. Which one(s) should uLisp support?
  • Can you give a link to a C program for a typical Arduino Bluetooth board (eg Raspberry Pi Pico W, Circuit Playground Bluefruit, ESP32) that would do what you want.
  • What information does the Bluetooth Beacon provide?

Thanks, David


#5
  1. Bluetooth Beacons

    I’m using nRF52832 which suits my scenario

  2. Which protocol should uLisp support?

    I’m sorry, I don’t know much more about this. Currently, all my needs it to detect the existence of a beacon. It seems the generic Bluetooth Low Energy (BLE) advertisement scanning would do the job.

  3. A C program for a Raspberry Pi Pico W that would do what I want

    I think the following code would do what I want, but I haven’t tried it out, since I’m using MicroPython instead.

    gap_le_advertisements.c

    There are also many other C examples for Bluetooth relation function: Pico W Bluetooth

    The corresponding MicroPython implementation should be here - Usage - Active Scan

  4. What information does the Bluetooth Beacon provide?

    All I need it RSSI and MAC address.

    In the MicroPython example, they returned ScanResult class which contains the Device class. Something related to the management of a Bluetooth beacon, I suppose.