PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.5k stars 13.51k forks source link

UUID 18 open issues #10638

Open davids5 opened 6 years ago

davids5 commented 6 years ago

1) Eliminate the use of msg.uid and PX4_CPU_UUID_WORD32_UNIQUE_x in code base OR at a minimum make sure they represent the slowest changing digits in the ID on all arch.

2) Legacy formats removed ? Remove all DEPRECATED data types, #defines and functions and comments. board_get_uuid board_get_uuid32_formated board_get_mfguid_formated

3) Implication on Uavcan: HardwareVersion:unique_id holds 16 bytes. We used 12 in the past written to offset 0-11.

@pavel-kirienko - PX4_GUID is now 18 bytes.

I am assuming rather than change the UAVCAN lib to be 18 bytes we should use the most rapidly changing from (node to node) bits of the ID to fill the 16 bytes. In this case it is the last 16 bytes of the PX4_GUID as the ID for HardwareVersion:unique_id in application?

Will this be a problem if that PX4 application use 16 bytes and we do not rev the bootloader to use the 16 bytes?

Are there other implications of this not being globally unique in uavcan?

pavel-kirienko commented 6 years ago

A 16-byte (128-bit) UID is required for UAVCAN; it cannot be changed by modifying libuavcan alone because it is required by the protocol specification (affects wire compatibility). The same UID must be used both by the bootloader and by the application.

davids5 commented 6 years ago

Given Pavels input, and if we do not want to change the bootloaders, we have the option on the STM32 uavcan application truncate the PX4 UUID to the last 12 bytes with 0 fill in the 12-15 offsets. This will match the bootloader.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

Closing as stale.

julianoes commented 5 years ago

@davids5 is there still work to do here?

davids5 commented 5 years ago

@julianoes - yes but with UAVCAN 1.0 pending there will be a lot to do, including redoing all the bootloaders.

@pavel-kirienko can we get a larger UUID in the 1.0 spec?

pavel-kirienko commented 5 years ago

can we get a larger UUID in the 1.0 spec?

The argument seems too PX4-specific. Rest of the world uses 128-bit UUID so I would prefer to stay with the existing standard.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.