Hello nRF world,
We have custom peripheral board based on the nRF51822 and need to be able to pair it with a host. Does anyone have a well documented example of code for doing so?
Thank you kindly,
Robin@TL
Hello nRF world,
We have custom peripheral board based on the nRF51822 and need to be able to pair it with a host. Does anyone have a well documented example of code for doing so?
Thank you kindly,
Robin@TL
An update: I have taken the advice of a related ticket and merged our code into the ble_app_gls example to attempt pairing.
However, although all modules compile independently, there appears to be a memory segmentation problem when linking. It appears to be associated with the fstorage for fds code, but I cannot determine the fix. The initial error messages are as follows:
Output/Debug/Exe/iDrink.elf section `.fs_data' will not fit in region `UNPLACED_SECTIONS'
Subsequently several errors ensue...
region `UNPLACED_SECTIONS' overflowed by 16 bytes
Output/iDrink Debug/Obj/fstorage.o: In function `check_config':
undefined reference to `__start_fs_data'
undefined reference to `__stop_fs_data'
... and on ad-nauseam...
What file might I be missing to define this unplaced section in memory?
Thanks again, in advance,
Robin@TL
You just needed to add one line in flash_placement.xml file in your project
<MemorySegment name="$(FLASH_NAME:FLASH)">
....
....
<ProgramSection alignment="4" keep="Yes" load="Yes" name=".fs_data" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />
</MemorySegment>
After that your project compiles fine.
...
this is to retarget your printf to UART instead of __stdout.
If you do not use printf, then remove it without hesitation.
Hello Susheel,
Our code does not use printf, but all of the sdk logging functions do.
What needs to be done to make this retarge work so we can see errors that may occur?
This seems it could be very helpful in debugging. I see that the sdk 12.3 retarget.c is considerably different. Are there any known problem with the sdk 11 version?
Hello again Susheel,
Just a note to let you know that I have found reference to SES have an alternative to printf for development. Not sure what will happen when we go to production code, with all the printf's in the sdk stuff, but for now I an not concerned about retarget. I am however having issues trying to use our newly acquired pca10031 dongle to redirect the data stream from our uart to a terminal emulator on our pc. There is a tutorial for this, but the terminology used does not match the latest nrf connect gui, so interpreting gets very guessing. I will open a new case for this one in hope we can get the data we need from our board to a pc for analysis.
Thanks
Robin@TL
Thanks for the feedback on this Robin, if things are not clear in the documentation, then we should know about it so that we can make it clearer. Creating a new case with that sounds perfect.
Hello again Susheel,
Just to be sure you know, we still need to get pairing up and running on our board. Please do not let the last post detract you from that. The critical point of needing data on the PC is imminent, so I am exploring other avenues to do so until we are there, but the goal is to get both uart and pairing running on our board so we can finalize the code before we release to production. Any guidance you can offer on the most direct path to this end is greatly appreciated.
Thanks again, awaiting guidance,
Robin
Hello again Susheel,
Just to be sure you know, we still need to get pairing up and running on our board. Please do not let the last post detract you from that. The critical point of needing data on the PC is imminent, so I am exploring other avenues to do so until we are there, but the goal is to get both uart and pairing running on our board so we can finalize the code before we release to production. Any guidance you can offer on the most direct path to this end is greatly appreciated.
Thanks again, awaiting guidance,
Robin
Hello Robin,
You need to add peer manager to your code in SDK12.3. Please look at its usage documentation to be able to include it in your project.
Hello Susheel,
I believe peer manager is in the code. Do you not see it in the uploaded project?
Robin
I missed to see that, I will see if there is any initialization of peer manager in that project tomorrow, Its late here in Norway now.