I have developed a custom PCB using nRF52832. It's meant to work as an ibeacon currently and consequently works in a non-connectable, advertising only mode. I will be going into production soon and hence would like to know how to batch program these devices? I will have the SWD ports exposed on the PCB and might also have the option to get the nRF modules pre programmed with the firmware before PCB assembly. Regardless of which way I go about it, I will still need a quick way to reprogram the devices on the field if required(mainly major, minor value modification). What might be the best way to go about it?
My need is to be able to modify the major and minor values OTA. DFU feels a little overkill. What are the ways in which I can achieve this? Could you also suggest the best way to go about firmware programming for batch production wherein every device needs a unique major, minor combination? Some vendors who can provide pre programmed modules require me to provide a combined hex file. In such a manner how do I go about ensuring that all devices get unique major, minor combinations?
You can find some information about Production programming and testing in the getting started documentation.
If you need to update the value OTA, I would recommend adding a connectable mode in the beacon, where you have characteristics that can be written to modify major and minor values. The values can then be written to flash in the characteristics write handler. This is a simpler approach compared to DFU, where the whole firmware would be replaced.
We have this implemented in the nRF51822 Beacon Kit, but this has been discontinued. You can also implement the configuration service yourself by following the BLE tutorials.
If you specify a static location in flash where you store the major and minor values, you can write these directly with the programmer, or add it to the hex-file before programming.