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

iBeacon production firmware flashing

Hi,

I would be coming out with a batch of 2500 iBeacon devices made using nRF51822. For small batches I've used an STM32 configured as a Black Magic Probe to program the devices. What I would like to know is that would a similar setup that uses BMP work for production programming too? What other alternatives are there that are cost effective (Segger JLink etc seem to be expensive options and pre fabrication programming is also not desirable) and efficient in terms of time required and ease of programming.

Also since we would need to program separate UUID's into every device, how do we go about generating the firmware such that the few fields that need to be varied are automatically changed while flashing. Is there any such method? 

Thank you! 

Parents
  • Hi,

    You can generate UUIDs from the DEVICEID in the FICR registry. 

    Are you thinking about generating random or unique Minor/Major values for the iBeacons?

    This is how we generate random Major/Minor values for our example beacon firmware:

    beacon_data[BEACON_MANUF_DAT_MINOR_L_IDX] = (uint8_t)(NRF_FICR->DEVICEADDR[0] & 0xFFUL);
    beacon_data[BEACON_MANUF_DAT_MINOR_H_IDX] = (uint8_t)((NRF_FICR->DEVICEADDR[0] >>  8) & 0xFFUL);
    beacon_data[BEACON_MANUF_DAT_MAJOR_L_IDX] = (uint8_t)((NRF_FICR->DEVICEADDR[0] >> 16) & 0xFFUL);
    beacon_data[BEACON_MANUF_DAT_MAJOR_H_IDX] = (uint8_t)((NRF_FICR->DEVICEADDR[0] >> 24) & 0xFFUL);

    If you want to have Major/Minor values from a fixed list you could use nrfjprog or pynrfjprog to accomplish this. Here is the code for writing to a certain part of Flash memory with nrfjprog:

    --memwr <addr> --val <val> 

    Here is example code for a batch script you could create to program each board:

    program.bat
    @echo off
    nrfjrpog --erase 
    nrfjprog --program <softdevice> 
    nrfjprog --program <firmware>
    nrfjrpog --memwr <addr> --val <value>
    nrfjrpog --pinreset
    echo "finished, restart"

    Have you seen this information about production programming?

    Could you please add some more details of what you want to accomplish and how?

    Ketil

Reply
  • Hi,

    You can generate UUIDs from the DEVICEID in the FICR registry. 

    Are you thinking about generating random or unique Minor/Major values for the iBeacons?

    This is how we generate random Major/Minor values for our example beacon firmware:

    beacon_data[BEACON_MANUF_DAT_MINOR_L_IDX] = (uint8_t)(NRF_FICR->DEVICEADDR[0] & 0xFFUL);
    beacon_data[BEACON_MANUF_DAT_MINOR_H_IDX] = (uint8_t)((NRF_FICR->DEVICEADDR[0] >>  8) & 0xFFUL);
    beacon_data[BEACON_MANUF_DAT_MAJOR_L_IDX] = (uint8_t)((NRF_FICR->DEVICEADDR[0] >> 16) & 0xFFUL);
    beacon_data[BEACON_MANUF_DAT_MAJOR_H_IDX] = (uint8_t)((NRF_FICR->DEVICEADDR[0] >> 24) & 0xFFUL);

    If you want to have Major/Minor values from a fixed list you could use nrfjprog or pynrfjprog to accomplish this. Here is the code for writing to a certain part of Flash memory with nrfjprog:

    --memwr <addr> --val <val> 

    Here is example code for a batch script you could create to program each board:

    program.bat
    @echo off
    nrfjrpog --erase 
    nrfjprog --program <softdevice> 
    nrfjprog --program <firmware>
    nrfjrpog --memwr <addr> --val <value>
    nrfjrpog --pinreset
    echo "finished, restart"

    Have you seen this information about production programming?

    Could you please add some more details of what you want to accomplish and how?

    Ketil

Children
No Data
Related