Skip to content

enabling BLE_NUS on nrf boards #1377

@jerryneedell

Description

@jerryneedell

Just a heads-up -- I wanted to try something with the BLE REPL -- (trying to troubleshoot the control-C issue on the feather_nrf52832) but it appears to be broken at this time.

Tried on both feather_nrf52832 and pca10059

  • same result

enable BLE_NUS in mpconfigport.h

index 86f5af20a..d473bc309 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -129,7 +129,7 @@
 
 #if BLUETOOTH_SD
     #define MICROPY_PY_BLEIO                     (1)
-    #define MICROPY_PY_BLE_NUS                   (0)
+    #define MICROPY_PY_BLE_NUS                   (1)
 #else
     #ifndef MICROPY_PY_BLEIO
         #define MICROPY_PY_BLEIO                 (0)

but the build fails with

jerryneedell@Ubuntu-Macmini:~/circuitpython_master/ports/nrf$ make BOARD=feather_nrf52832 
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
FREEZE freeze
bluetooth/ble_uart.c: In function 'ble_uart_init':
bluetooth/ble_uart.c:105:21: error: too many arguments to function 'mp_obj_new_str'
     m_device.name = mp_obj_new_str(default_name, strlen(default_name), false);
                     ^~~~~~~~~~~~~~
In file included from ../../extmod/virtpin.h:29:0,
                 from ../../py/mphal.h:80,
                 from bluetooth/ble_uart.c:33:
../../py/obj.h:638:10: note: declared here
 mp_obj_t mp_obj_new_str(const char* data, size_t len);
          ^~~~~~~~~~~~~~
bluetooth/ble_uart.c:108:29: error: too many arguments to function 'mp_obj_new_str'
     mp_obj_t nus_uuid_str = mp_obj_new_str(NUS_UUID, strlen(NUS_UUID), false);
                             ^~~~~~~~~~~~~~
In file included from ../../extmod/virtpin.h:29:0,
                 from ../../py/mphal.h:80,
                 from bluetooth/ble_uart.c:33:
../../py/obj.h:638:10: note: declared here
 mp_obj_t mp_obj_new_str(const char* data, size_t len);
          ^~~~~~~~~~~~~~
../../py/mkrules.mk:55: recipe for target 'build-feather_nrf52832/bluetooth/ble_uart.o' failed
make: *** [build-feather_nrf52832/bluetooth/ble_uart.o] Error 1

I tried just removing the ",false" argument, but that just moved the failure "downstream"

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions