This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Spec for nrf8001 setup format

Is it possible to get a complete specification of the setup format for nrf8001?

/Erik

Parents
  • Hi, I found this post on nRF8001 setup issues and it's quite applicable to a problem I am working on. I want to be able to update the device name for my nRF8001 radio. So I added the "writeable device name" in nRFGO studio and the Service Changed GATT attribute that is required to get device name changes to show up on remote devices. And I added a way for a remote device to send my device a new name over the UART service.

    I can get a new name and write it from my application to the nRF8001 name. I update the Service Changed attribute to signal handles 1-11 changed and everything works fine (ie name shows up on remote iPhone). Problem is that if a different remote device that supports writing to my name service does change the name I don't think the nRF8001 can report that change. So I want to disallow remote name changes. And it seems like the ble_modify_setup_data example that is provided as part of the BLE Ardiuno library from Nordic is meant to address that exact issue. However, I can't make any sense out of the example.

    There is a readme_modify_setup.docx file provided in the BLE Arduino SDK documentation directory that documents how you could change the services.h file to remove write permissions and there is a services_ota_with_pipe_ota_removed.h file in the ble_modify_setup_data example directory that removes the write permissions. But nothing else in the example directory makes any sense relative to the example. I would have thought there might be some tool there that could update a services.h file to do the modifications and recompute the CRC and write out the updates. But there isn't.

    I see where the user Eric wrote a Python tool that might do this. Sounds pretty slick but doesn't appear to be accessible. I'm wondering if Nordic does have any tool to make the changes. Actually, I really don't understand why they don't provide an option within nRFGO Studio to allow you to have a locally writeable device name that can't be written from remote devices. Because it doesn't seem like there would be any way to make remote name changes work.

    Am I missing something? I think supporting BLE name changes is an important capability. And much of it seems to work. Just the few problems I mentioned above.

    Hopefully someone has some suggestions?? Thanks. Fred

  • Thanks for the update David and Runar! I did find that I could decode the setup data format by hand and understand it well enough from the documentation you provided that I could make the changes to remove the OTA write setting. The problem is that I want to update the services.h file to remove the OTA write the way you folks did in the services_ota_with_pipe_ota_removed.h file so that I can build my application and have it not support the OTA write. But because of the CRC value, patching the services.h file is not easy to do by hand.

    I was hoping to not have to write my own program to parse the services.h file and tweak it. It just really seems like it should be possible to use nRFGO Studio to add a changeable device name that doesn't support OTA writes.

    On a positive note, I did verify that updated device names are stored as part of the nRF8001 dynamic data and therefor changed names are preserved when you save and then restore the dynamic data. That's a nice feature that I couldn't really figure out from any documentation or forum posts I could find. I'm glad it works that way!

Reply
  • Thanks for the update David and Runar! I did find that I could decode the setup data format by hand and understand it well enough from the documentation you provided that I could make the changes to remove the OTA write setting. The problem is that I want to update the services.h file to remove the OTA write the way you folks did in the services_ota_with_pipe_ota_removed.h file so that I can build my application and have it not support the OTA write. But because of the CRC value, patching the services.h file is not easy to do by hand.

    I was hoping to not have to write my own program to parse the services.h file and tweak it. It just really seems like it should be possible to use nRFGO Studio to add a changeable device name that doesn't support OTA writes.

    On a positive note, I did verify that updated device names are stored as part of the nRF8001 dynamic data and therefor changed names are preserved when you save and then restore the dynamic data. That's a nice feature that I couldn't really figure out from any documentation or forum posts I could find. I'm glad it works that way!

Children
No Data
Related