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

Modify DEVICE_NAME

Hello.

I use nrf51822 chip.

I want modify Device_name as below.

1EA product "CoCoNut - 001"

other 1EA product "CoCoNut - 002"

other 1EA product "CoCoNut - 003" .....

So, 001,002,003 numbering is storage from flash memory.

I want modify only one source code.

but, I don't know add device_name.

How can I modify source code?

please confirm it.

Parents
  • You could use a script to modify your binary for each device you upload to.

    e.g. In your code define a constant array with the text "CoCoNut - 001"

    In the binary there were be a the text "CoCoNut - 001", so you just need to get your script to change this to "CoCoNut - 002" etc before you upload

    You'd need to keep track of the index number somehow, e.g. some sort of database (or even just a text file)

Reply
  • You could use a script to modify your binary for each device you upload to.

    e.g. In your code define a constant array with the text "CoCoNut - 001"

    In the binary there were be a the text "CoCoNut - 001", so you just need to get your script to change this to "CoCoNut - 002" etc before you upload

    You'd need to keep track of the index number somehow, e.g. some sort of database (or even just a text file)

Children
Related