I have been testing the AP_Periph with the LightWare rangefinder and I cannot have it to work.
The same rangefinder works when I use it with my Pixhawk over I2C by setting TYPE=7 and ADDR=102.
However, when going to the AP_Periph, and setting the same parameters over UAVCAN GUI Tool, I can never get the uavcan.equipment.range_sensor.Measurement message out.
When trying my old rangefinder LidarLightV3HP by change the TYPE=21, everything works.
Since my LightWave is working with the Pixhawk, and the AP_Periph is working with other rangefinder over I2C, am I missing some parameters?
For this I have tested the latest AP_Periph 1.4.1.
Yep, confirmed , I have the same issue.
I did not had time to dig deeper ATM, but I minimally we should open an issue. @rishabsingh3003 would you be interested to investigate ?
Thanks for the tag @ppoirier . Fortunately, I have a matek L431 and a lightware L20. I will investigate and fix it if I find a bug… but cannot guarantee a time frame for the possible fix
I found an old chat with Sampson from Matek who said the MatekL431 does have 4.7k pullup on SCL and SDA @ppoirier do you have a logic analyser? If so can you check the traffic on SCL and SDA?
so it sees version “SF20,4.0.0,16 "
which means that i2c clearly is working
then we see the sf20_disable_address_tagging() call
sf20_send_and_expect(”#CT,0\r\n", “ct:0”);
we then see:
sf20_send_and_expect(“#SC,0\r\n”, “sc:0”);
and then:
sf20_send_and_expect(“#LC,20\r\n”, “lc:20”)
then:
sf20_send_and_expect(“#LO,0.00\r\n”, “lo:0.00”)
then:
sf20_send_and_expect(“#LM,7\r\n”, “lm:7”)
then:
sf20_send_and_expect(“#LB,0.00\r\n”, “lb:0.00”)
all of that looks like normal AP_RangeFinder_LightWareI2C::sf20_init() calls. Your screen capture is cut off at that point, so I can’t tell if the sf20_init() call completes.
once you send me the saved captures I’ll know more
@ppoirier thanks. That log shows the SF20 is completing init and giving distance when connected to the L431. The distance readings are around 1.95m.
Assuming in this example you checked if you were getting range_sensor_measurement packets on the bus and were not getting them then something is going wrong between the driver backend and the AP_RangeFinder frontend. We’d need some GCS_SEND_TEXT() calls to try to work out what is wrong.
Responding in this old thread since I also have problems getting the LW20/C working with a CAN node. I am using a https://arkelectron.com/product/ark-cannode/ . It has AP_periph flashed. The LW20/C is set to use I2C. It is working when directly connected to the I2C port of the Cube Orange AP. I have checked as a Subscriber on DroneCAN GUI tool and it is not sending any data.