Device OS 4.0: No more Gen 3 setup done bit!

Starting with Device OS 4.0.0-alpha.1, there is no longer a setup done bit on Gen 3 devices (Argon, Boron, B Series SoM, Tracker SoM, and Tracker One). Once the Argon has valid Wi-Fi credentials it will exit listening mode (blinking dark blue) automatically. Cellular devices will beginning connecting to cellular (blinking green) without going into listening mode at all.

Note that 4.0.0-alpha.1 is a pre-release and you should not upgrade production devices to it, but you can experiment with it on development devices in your product to get ready for it. Eventually, 4.0.0 will become the new LTS release of Device OS.

If you set the bit using the mobile apps or CLI, you will be able to skip that step once you’ve started using Device OS 4.0.0.

If you set the setup done bit from your firmware, you can remove the code entirely, or if you want to make it conditional for 4.0 and later builds, you can do something like this:

void setupDone() 
#if defined(DCT_SETUP_DONE_OFFSET) && !defined(SYSTEM_VERSION_v400ALPHA1)
    // On Gen3 devices, set the setup done flag to true so the device exits
    // listening mode. This happens immediately on cellular devices or after
    // valid Wi-Fi credentials have been set on the Argon.
    // This is only necessary with Device OS 3.x and earlier.
    uint8_t val = 0;
    if(!dct_read_app_data_copy(DCT_SETUP_DONE_OFFSET, &val, sizeof(val)) && val != 1)
        val = 1;
        dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, sizeof(val));

This is probably a specific use case, but what if you have Argons that don’t use WiFi and is in SYSTEM_MODE(MANUAL)? In that event, is it still necessary to write the setup done bit?