Unable to use GPS and Rangefinder on CAN ports 1 and 2

We believe we’ve encountered a bug that occurs when trying to operate both a GPS and a rangefinder on the CAN ports of the flight controller.
Using the Pixhawk Cube Orange, we connected the here3 GPS into CAN port 1 and the US-D1 altimeter into CAN port 2. We configured the parameters as follows:
For the here3 GPS:
CAN_D1_PROTOCOL: 1 set virtual driver of CAN1 to DRONECAN
CAN_P1_DRIVER: 1 set this parameter to enable CAN 1 bus
GPS_TYPE: 9 set the communication protal type of GPS 1 to DRONECAN
NTF_LED_TYPES: 231 Set to DRONECAN for LED type

For the US-D1:

  • CAN_P2_DRIVER = 1 (second can port driver set to driver 1)
  • CAN_D2_PROTOCOL = 7 (USD1 protocol for driver 1)
  • RNGFND2_TYPE = 33 (USD1_CAN)
  • RNGFND2_MIN_CM = 50
  • RNGFND2_MAX_CM = 4500

With these parameters selected, the here3 GPS works correctly, but the US-D1 does not provide any output.
If the devices are swapped, and the US-D1 is connected to CAN port 1 and the here3 GPS to CAN port 2, and the parameters are changed accordingly, the US-D1 will work correctly and the GPS will not work. Only the device connected to CAN port 1 seems to work correctly.

Is there a problem with our Copter parameter values, or is there another bug occurring?

also want to +1 to bring attention to this. We had similar issues a year or so back using here3 gps and the US-D1 on CAN

1 Like

Hi @Camron_Myers,

Thanks for the report. I see this is posted in the Copter-4.0 category. If you’re using 4.0 it would be good to upgrade to 4.3.x.

If you’re not then I’ll move this message to the 4.3 category.

Hello Randy,

We are operating on Copter 4.3.3. Please move the message to that category.

I think your problem is this:

CAN_P2_DRIVER = 1 (second can port driver set to driver 1)

You are trying to use driver 1 for both CAN ports. Try setting CAN_P2_DRIVER = 2.