TrackerEdge19 fails to boot on bare Tracker SoM modules

I spent a few days pulling my hair out trying to figure out why my code was working on the Tracker Dev Board, but not on the carrier board I had spun up.

I finally tracked the issue down to the TrackerEdge 19 firmware. A difference in model numbers between the DevBoard and the bare SoM Module causes Tracker::instance().init(). to fail and blocks the board from connecting to to the cloud.

In tracker.cpp

EdgePlatform::instance().init(_model, _variant);
switch (EdgePlatform::instance().getModel()) {
    case EdgePlatform::TrackerModel::eTRACKER_ONE:
        _platformConfig = new TrackerOneConfiguration();
        _commonCfgData = _platformConfig->get_common_config_data();
        break;
    case EdgePlatform::TrackerModel::eEVAL:
        _platformConfig = new TrackerEvalConfiguration();
        _commonCfgData = _platformConfig->get_common_config_data();
        break;
}

EdgePlatform::instance().getModel() will return TrackerModel::eBARE_SOM_DEFAULT, so _commonCfgData never gets set.

This causes the device to restart before finishing Tracker::instance().init(). You get a white breathing status led. You can put the Tracker into safemode and it will connect to the cloud, but itwill actually never run even the fresh version of Tracker Edged loaded during device setup.

Yes, that is the current behavior. It should be documented that you need to update the initialization if you are using a bare Tracker SoM. Or maybe it should initialize _commonCfgData in the default case, so at least it would run, even if not optimally.

Can you point me to that documentation?

This is the documentation for Tracker Edge but it doesn't include the information about using it with the bare Tracker SoM at this time, because it was changed in a recent-ish version of Tracker Edge.

The easiest workaround is to insert a default case before case EdgePlatform::TrackerModel::eEVAL:.