Bluetooth Classic

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jayie
 
Posts: 7
Joined: Thu Dec 31, 2020 7:49 pm

Bluetooth Classic

Post by Jayie »

I have a CLUE board and i'd like to be able to read input from Bluetooth Classic devices like HID Keyboards.
I've run the Bluetooth demos on it, including the one below which scans for all devices but it doesn't pickup my Bluetooth Keyboard which runs Bluetooth Classic (BR/EDR). So, is the CLUE BLE only or is there an additional library that I need to import? My Android phone and Raspberry Pi seems to pair with the keyboard fine, so I guess the keyboard is working ok.

Code: Select all

from adafruit_ble import BLERadio

ble = BLERadio()
print("scanning")
found = set()
scan_responses = set()
# By providing Advertisement as well we include everything, not just specific advertisements.
for advertisement in ble.start_scan():
    addr = advertisement.address
    if advertisement.scan_response and addr not in scan_responses:
        scan_responses.add(addr)
    elif not advertisement.scan_response and addr not in found:
        found.add(addr)
    else:
        continue
    print(addr, advertisement)
    print("\t" + repr(advertisement))
    print()

print("scan done")
Thanks,

Jason.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Bluetooth Classic

Post by mikeysklar »

Hi Jason,

The CLUE is based on the nRF52840 which is only BLE support not classic.

https://learn.adafruit.com/ble-hid-keyb ... anding-ble

The CLUE can happily do the reverse and send BLE keyboard presses based on switches, but unfortunately needs to interact with BLE devices.

https://learn.adafruit.com/ble-hid-keyb ... rd-buttons

User avatar
Jayie
 
Posts: 7
Joined: Thu Dec 31, 2020 7:49 pm

Re: Bluetooth Classic

Post by Jayie »

Thanks, mikeysklar, I figured as much. I have another nRF52840 so i'll use that to send the keyboard codes.

Locked
Please be positive and constructive with your questions and comments.

Return to “CLUE Board”