Open iomz opened 3 years ago
For more details about GIAI, see the genspec: https://www.gs1.org/standards/barcodes-epcrfid-id-keys/gs1-general-specifications ...but I think you can ignore the definition as long as you have the numbers.
I was thinking about using a more dynamic profile identifier at the controller level instead of using the GIAI also for the profile/registration identifiers. In this case, the GIAI would only be needed on the gateway for identifying each asset/endpoint. For identification of the registered profiles on the MCU a smaller Profil_ID is used, which is dynamically allocated when the profile is registered. This would have the following advantages:
To be honest, I also feel the GIAI is not suitable for identifying individual sensors, but for different reasons. The GS1 ecosystem treats an asset of an object of at least a size on which one of the GS1 data carriers (Barcode, DataMatrix or EPC Tag) can be attached, and not something in thumbnail sizes – it makes sense to use GIAI for the controllers, but not for sensors.
I'm not sure about "Profil_ID". If you mean a proprietary ID scheme then it may degenerate the interoperability and loses transparency in the context of explainability, but this also elicits the need for clarification – we need an identifier for both profiles and sensors.
To address other feature requirements in your proposal:
far less space is used on the MCU
This is not a dominant problem – even the 4k EEPROM can store far more 128-bit numbers than the number of PINs available for one MCU even with other required parameters. However, it becomes a prevalent problem when we need to include the lengthy ID in the line protocol to indicate which sensor data needs to be retrieved from the MCU to the Gateway.
we would not need a unique GIAI for each internal peripheral
We do need identification for each internal peripheral to provide the provenance of the data access – this is the primary initiative.
After the consideration above, I'd propose the following:
The use of UUID is open to discussion, but the 1-byte profile ID matches your idea. How about this?
Yes, that sounds great! I'm not sure if proto3 supports uint8 types, but for now, I'm using an uint32 type for the profile ID. But we can easily optimize this later.
Aha, true it doesn't. Perhaps length==1 of bytes
, but nanopb
explicitly excludes type uint8_t
: https://github.com/nanopb/nanopb/issues/485
Go for uint32 for simplicity :-)
Maybe we could use the first bit of the 8-bit Profile ID to differentiate profiles registered on MCU1 and MCU2. I think this would simplify the profile handling of the different MCUs and saves a bit of space for the registration list as this is implemented as a static array (registered_profiles[]
)
Not now, the profile management will be done in the Gateway.
To identify each physical devices (e.g., sensors, robots, etc...) in a "device profile" we need an identifier. Such devices usually don't have MAC or IPv6 address, so GIAI from GS1.
GIAI consists of the GS1 Application Identifier (8004), GS1 Company Prefix (7612345206 for our range), and Individual Asset Reference (something within 20 digits). We can use this 20-digit space to identifier individual assets.