Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Feather nRF52832 BLE Compile but Not Working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather nRF52832 BLE Compile but Not Working

by lucas86 on Sat Feb 01, 2020 8:07 am

Hello, i'm new, i have bought 3 Adafruit Feather Nrf52832 boards, arduino has been fresh installed, i have added the adafruit repositories, added the nrf52832 board from the board manager.

First things fisrt, i wasn't able to do anything, so i updated the bootloader, now it works, the board can be programmed to do blinky things with leds and ports.

After this i tried to open an example code, i tried both Central and Periphral, BluefruitUart, it compile and loads, in the central the blue led come up blinking, but i cant find it with any mobile phones, i tired with nrf toolbox or nrf connect and other apps here and there, but nothing seems to works.

Where am i doing wrong ?

lucas86
 
Posts: 5
Joined: Sat Feb 01, 2020 7:02 am

Re: Feather nRF52832 BLE Compile but Not Working

by jevada on Sat Feb 01, 2020 1:01 pm

BLE defines two roles: central and peripheral. A peripheral advertises itself but won't initiate a connection. A central however, does not advertise. Instead, it scans for peripherals and actively initiates the connection on a peripheral.

Thus, a central typically won't find another central. That's why you won't find the bluefruit it in your phone when it is compiled in central mode.

Note: bluefruit these days also allows dual role - it can be central and peripheral at the same time.

jevada
 
Posts: 141
Joined: Fri Dec 15, 2017 5:29 am

Re: Feather nRF52832 BLE Compile but Not Working

by PWK on Sat Feb 01, 2020 2:06 pm

Hello lucas86,

I had the same issue with the Peripheral example not working with nRF52832. It has to do with this error NRF_ERROR_NO_MEM. If you run the Arduino in Debug Level 2 you should see the error in serial monotor. If you change this line in the Peripheral example, Bluefruit.configPrphBandwidth(MAX); to Bluefruit.configPrphBandwidth(HIGH); the example will work. This is the link https://learn.adafruit.com/bluefruit-nr ... memory-map. I think it changes the memory map. There is more information in this post, Bluefruit Feather NRF52 Peripheral
examples.
on the forum. Hope this helps.

Paul

PWK
 
Posts: 32
Joined: Wed Mar 06, 2019 9:08 am

Re: Feather nRF52832 BLE Compile but Not Working

by lucas86 on Sat Feb 01, 2020 2:06 pm

Thank you, i tried both roles but there's no signs of life, if i open therminal it will start streaming lines, but no connection at all.

I was wondering if it can be a bluetoth versin problem, my phones are all 4.0 or 4.2 versions, while the nrf52832 is 5.0... I give it for shure that it was retrocompatible but... Do you believe that the problem may reside there ?

I worked with nrf 51822 some time ago and al worked flawlessy.

lucas86
 
Posts: 5
Joined: Sat Feb 01, 2020 7:02 am

Re: Feather nRF52832 BLE Compile but Not Working

by lucas86 on Sat Feb 01, 2020 5:53 pm

PWK You made my day, it worked ! But hey why they didn't fixed it yet in the examples ?

Just to chat a bit, what's the problem with the ram ? These devices has lots of ram, well a lot compared to an arduino.

lucas86
 
Posts: 5
Joined: Sat Feb 01, 2020 7:02 am

Re: Feather nRF52832 BLE Compile but Not Working

by PWK on Sat Feb 01, 2020 7:44 pm

lucas86,
I don't think there is a problem with the SRAM, its how the SRAM is allocated. I have a post on the issue but Adafruit never replied. My project worked for almost a year, then I upgraded Arduino BSP to 0.16.0 and that is when the issue started. My project was built using the bleuart Peripheral example with additional code added but it no longer worked. Then I came accross this statement in the learning guide. If you run into an error message saying "SoftDevice require more SRAM than provided by linker", try altering your system config -- for ex. lower bandwidth, fewer connection or a smaller attribute table size. Another advanced option is to modify the linker script, but this should be done with care and knowledge of what you are changing. So I just tried different options with Bluefruit.configPrphBandwidth(MAX). There are four options LOW,NORMAL,HIGH,MAX. The only one that doesn't work is MAX, and that is the default. Not sure how much it effects the bandwidth but my project is working. Maybe Adafruit will correct the issue.

Paul

PWK
 
Posts: 32
Joined: Wed Mar 06, 2019 9:08 am

Re: Feather nRF52832 BLE Compile but Not Working

by PWK on Sat Feb 01, 2020 9:05 pm

lucas86,

Adafruit just released a new BSP version for nRF52 0.17.0. The bleuart Peripheral example in that release works with Bluefruit.configPrphBandwidth(MAX). Just update Arduino IDE with the new version. Maybe they were reading the posts. But it does make it very difficult when troubleshooting and the known good example does not work. Well I guess you learn more that way, at least I did.

Paul

PWK
 
Posts: 32
Joined: Wed Mar 06, 2019 9:08 am

Re: Feather nRF52832 BLE Compile but Not Working

by lucas86 on Sun Feb 02, 2020 6:07 am

Thank you Paul,

I want to believe that we contriuted to this with this post, the timings are a bit suspicious. However the important thing is that now it works.

I just want to make the device listening for connection, when connected send some bytes here and there, just transmit temperature and humidity once per minute, at only one device, so very low bandwidth. And to sleep and wake up only when an mpu6050 will detect motion. Now i have to do some searching and check out if the device will reconnect by itself when it wakes up.

lucas86
 
Posts: 5
Joined: Sat Feb 01, 2020 7:02 am

Re: Feather nRF52832 BLE Compile but Not Working

by PWK on Sun Feb 02, 2020 7:33 am

lucas,

Your project sounds interesting. The nRF52 boards are still under development on the Adafruit side. The Nordic SoC nRF52 is very stable. When there is a new software version release I am always a little hesitant to upgrade. My project runs off LIPO battery, still trying to get the BLE into very low power mode. Adafruit was working on a learning guide on this topic. Hopefully it will be released soon.

Paul

PWK
 
Posts: 32
Joined: Wed Mar 06, 2019 9:08 am

Please be positive and constructive with your questions and comments.