Skip to content

Configure ubx ITFM on supporting versions#179

Open
aubin-cldn wants to merge 2 commits intoPX4:mainfrom
aubin-cldn:ubx_itfm_version
Open

Configure ubx ITFM on supporting versions#179
aubin-cldn wants to merge 2 commits intoPX4:mainfrom
aubin-cldn:ubx_itfm_version

Conversation

@aubin-cldn
Copy link

The UBX configuration CFG-ITFM-ENABLE has been removed for u-blox FW versions greater than 1.32 (so 1.40, 1.50...). Thus, trying to configure this parameter results in a NAK response, and prevents PX4 from configuring the receiver.

This MR:

  • Saves the FW version of the receiver in the variable _firmware_version;
  • Enables the configuration of CFG-ITFM-ENABLE on _firmware_version < 1.40.

To convert the FW version from a string to a float, uses atof on the last part of the string (after the space delimiting the number in the string), allowing to differentiate values like HPG 1.51 and HPGL1L5 1.40 for example.

@dagar
Copy link
Member

dagar commented Aug 8, 2025

I don't think we should get into carrying configuration differences for specific firmware versions unless there's significant benefit. Presumably there's a reason they fully dropped the jamming/interference monitor? That makes me think we should just remove support for now.

Any opinion @AlexKlimaj @dakejahl?

Copy link
Contributor

@dakejahl dakejahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aubin-cldn how did you arrive at these changes? The UBX-CFG-ITFM message is removed, but we are not using that message. We are using UBX_MSG_CFG_VALSET as it suggests

image

@aubin-cldn
Copy link
Author

Using UBX-CFG-ITFM even in UBX_MSG_CFG_VALSET results in the configuration issue. That's why this key should only be used in earlier version.

Copy link
Contributor

@dakejahl dakejahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and tested this out. I am indeed seeing a NAK returned on 1.51, but it appears to be harmless. The rest of the module configuration appears to work as expected.

Can you provide a little bit more context? How did you arrive at these changes? Was there a certain failure mode that prompted this discovery?


if (fwver_str != nullptr) {
GPS_INFO("u-blox firmware version: %s", fwver_str + strlen("FWVER="));
const char *fwver_val = strrchr(fwver_str, ' ')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const char *fwver_val = strrchr(fwver_str, ' ')
const char *fwver_val = strrchr(fwver_str, ' ');

this doesn't compile

// available only on firmware versions earlier than 1.40
if (_firmware_version < 1.40f) {
cfgValset<uint8_t>(UBX_CFG_KEY_ITFM_ENABLE, 1, cfg_valset_msg_size);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should also wrap the below sendMessage and waitForAck in this if statement

@dakejahl
Copy link
Contributor

I don't think we should get into carrying configuration differences for specific firmware versions unless there's significant benefit. Presumably there's a reason they fully dropped the jamming/interference monitor? That makes me think we should just remove support for now.

On 1.50 theres a new jamming detector enabled by default. We could remove this key entirely, but then modules on older firmware would lose jamming detection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants