KMKfw / kmk_firmware

Clackety Keyboards Powered by Python
https://kmkfw.zulipchat.com
Other
1.34k stars 462 forks source link

Help with Bluetooth please. #840

Closed ItsTerm1n4l closed 1 year ago

ItsTerm1n4l commented 1 year ago

Hi, I have a Pi Pico W and I am trying to make a bluetooth keyboard with KMK, I set everything up and ran the test script and everything works fine, but how do I setup bluetooth? I followed the instructions in the KMK docs but the Pico does not show up here is my code.py

print("Starting")

import board

from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC
from kmk.scanners import DiodeOrientation
from kmk.hid import HIDModes
keyboard = KMKKeyboard()

keyboard.col_pins = (board.GP0,)
keyboard.row_pins = (board.GP1,)
keyboard.diode_orientation = DiodeOrientation.COL2ROW

keyboard.keymap = [
    [KC.A,]
]

if __name__ == '__main__':
    keyboard.go(hid_type=HIDModes.BLE, ble_name='KMKeyboard')

the contents of the adafruit_ble directory

drwxr-xr-x 2 pi pi 512 Jul 25 10:10 advertising/
drwxr-xr-x 2 pi pi 512 Jul 25 10:10 attributes/
drwxr-xr-x 2 pi pi 512 Jul 25 10:10 characteristics/
-rw-r--r-- 1 pi pi 14K Jul 25 10:10 __init__.py
drwxr-xr-x 3 pi pi 512 Jul 25 10:10 services/
drwxr-xr-x 2 pi pi 512 Jul 25 10:10 uuid/

I did notice that the adafruit_ble does not have a main.py file in it as the docs said it would but I assumed that adafruit had updated their BLE library since then and changed the name of the file to __init__.py. I would really appreciate help with this issue, thank you.

xs5871 commented 1 year ago

Closing this as a duplicate of #785: Circuitpython does not yet support BLE on the Pi Pico W.