Ardupilot I2c devices not communicating after address change

I believe the read is at the end:

From the adafruit driver:
_PHASECAL_CONFIG__TIMEOUT_MACROP = const(0x004B)
This is the range_mode address, the range measurement is stored in:
_VL53L1X_RESULT__FINAL_CROSSTALK_CORRECTED_RANGE_MM_SD0 = const(0x0096)

After reading the rangefinder file in the repo, Everything appears to line up, so I doubt this is the origin of the problem.

Common issues would be more along the lines of forgetting to terminate the end of the bus with a resistor, a clash in address space (two devices with the same i2c address), an issue with the bus speed negotiation, or a length issue. Off the top of my head you get 3ft.

Oh and voltage incompatibilities like the whole bus needs to be 3.3 or 5v, where you need a logic level shifter to jump between and I have also had issues with clock stretching.

With one Benewake serial TFMini downwards, and four I2C TFLuna’s front/back/left/right (addresses changed), the five supplied with an independent 5V supply, I have observed similar effects. I think turning off and on was the only solution, since everything seemed right. Here it all worked.

This setup is all 3.3v, the drone is small so I know it’s far less than three feet, what kind of resistor setup did you use for the termination?

I have already used a 328 to change the sensor addresses, i never flight tested it.

Whats interesting is I can’t get the sensor to communicate even when I use a single unit with the default address. This is a 3.3v system, what’s odd is the sensors are indeed detected at the target address, but data sampling never initiates.

This is very similar to my script, with the exception that mine opens and takes a reading from each sensor to confirm it’s functioning. I’m still baffled as to why Ardupilot cannot receive data from only the VL53L0x sensors, the I2c compass modules work without issue on the same bus.

The FC is a JHEMCU-GSF405A (it’s a small drone):

are you sure the driver is there for it? have you used the custom firmware builder to make a firmware with the rangefinder drivers?

I have indeed
selected_features.txt (275 Bytes)

I think you need to add the VL53l0x driver, when I use the VL53l1x in my rover im using it set as type 16 the same as the VL53l0x,

RNGFND1_ADDR,41
RNGFND1_FUNCTION,0
RNGFND1_GNDCLEAR,50
RNGFND1_MAX_CM,120
RNGFND1_MIN_CM,5
RNGFND1_OFFSET,0
RNGFND1_ORIENT,0
RNGFND1_PIN,-1
RNGFND1_POS_X,0
RNGFND1_POS_Y,0
RNGFND1_POS_Z,0
RNGFND1_PWRRNG,0
RNGFND1_RMETRIC,1
RNGFND1_SCALING,1
RNGFND1_STOP_PIN,-1
RNGFND1_TYPE,16

I have RANGEFINDER_VL53L1X selected

select both rangefinders.

what you have selected is
28 VL53L1X-ShortRange mode, so if you set your rangefinder to type 28 it will probably start working. or add the VL53l0x driver so it works as type 16.

That might explain some things, ill give it a try, thanks

Recompiled with the added options, sadly, the issue is unchanged.

Have you tried both type 16 and 28?

Yes indeed, the rangefinders still show “no data”

what address do you get when you scan using this, it should register as device address 41.

I can resolve the address, I can also read from it if I connect another I2C master to the bus