Good morning,
I have an Argon on Device OS 5.8.2 with a particular firmware that reports the wrong __system_product_version.
With this particular FW it reports 63:
0000005064 [app] INFO: PRODUCT VERSION: 63
0000005064 [app] INFO: PRODUCT ID: 18
With a brand new FW, almost blank, it correctly reports 123:
0000003701 [app] INFO: PRODUCT VERSION: 123
0000003701 [app] INFO: PRODUCT ID: 12
This is what I set in both FW. In the global space:
extern uint16_t __system_product_version;
extern uint16_t __system_product_id;
PRODUCT_VERSION(123);
In setup() or loop() (i've tried both):
Log.info("PRODUCT VERSION: %u", __system_product_version);
Log.info("PRODUCT ID: %u", __system_product_id);
What is it in this particular FW that is impacting the reading of the product version?
If I remove the extern declarations, the situation does not improve.
Thanks!
Test FW:
#include "Particle.h"
SYSTEM_MODE(AUTOMATIC);
SYSTEM_THREAD(ENABLED);
SerialLogHandler logHandler(LOG_LEVEL_INFO);
extern uint16_t __system_product_version;
extern uint16_t __system_product_id;
PRODUCT_VERSION(123);
void setup()
{
waitFor(Serial.isConnected, 5000);
delay(1000);
Log.info("PRODUCT VERSION: %u", __system_product_version);
Log.info("PRODUCT ID: %u", __system_product_id);
}
void loop()
{
}
EDIT: The issue seems to be how the device sees that value, since on the console I can see it correctly reports 123:
While logs on device show:
0000004748 [app] INFO: PRODUCT VERSION: 63
0000004748 [app] INFO: PRODUCT ID: 18
The device reports 63 no matter what I set with PRODUCT_VERSION.
Shot in the dark: could it be that I have added this Argon to a product in the past and it is still lingering there?