Skip to content

enabling BLE_NUS on nrf boards #1377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jerryneedell opened this issue Dec 5, 2018 · 1 comment
Closed

enabling BLE_NUS on nrf boards #1377

jerryneedell opened this issue Dec 5, 2018 · 1 comment

Comments

@jerryneedell
Copy link
Collaborator

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"

@tannewt
Copy link
Member

tannewt commented Jul 13, 2021

BLE serial access is in added in #4957 for nrf only.

@tannewt tannewt closed this as completed Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants