# How to integrate RDDRONE-BMS or MR-BMS771 in PX4 via DroneCAN

## Hardware needed

1. NXP BMS (RDDRONE-BMS772 or MR-BMS771)
   1. Including 4 wire CAN wire
   2. Tested on MR-BMS771 (7S – 14S) NXP BMS (planned to be released June 30 2025)
2. FMU (any Pixhawk with CAN)
   1. Tested on MR-VMU-RT1176
3. USB-C cable (FMU to PC)
4. 3V3 FTDI cable and DCD-LZ
5. Programmer (JLink base or edu)

## How to integrate the BMS into PX4 step by step guide

1. Be sure to download the latest the NuttX BMS application example code version 6.0 or higher.
   1. RDDRONE-BMS772: [NXPHoverGames/RDDRONE-BMS772: NuttX source code for RDDRONE-BMS772 ](https://github.com/NXPHoverGames/RDDRONE-BMS772)
   2. MR-BMS771: <https://github.com/NXPHoverGames/MR-BMS771>
2. Program the BMS (see [`releaseNotes`](https://github.com/NXPHoverGames/MR-BMS771/blob/master/BMS771_releaseNotes_7.0.pdf)) and follow the instruction of the releaseNotes to make sure the BMS set up and is operating in NORMAL mode.
3. Make a UART connection to the BMS according the releaseNotes to use the CLI.
4. Enter the following parameters in the CLI for the BMS, save and reboot.
   1. `bms set can-mode dronecan`
   2. `bms set dronecan-node-static-id 31`
   3. `bms set dronecan-bat-info 1`
   4. `bms set dronecan-bat-info-aux 1`
   5. `bms save`
   6. `reboot`
5. Connect from the PC to the FMU with the USB cable
6. Open QGroundControl and wait for auto connect to complete
7. Go to parameters -> UAVCAN and set it to sensors and actuators & save
8. Reboot ((right top) tools -> Reboot vehicle)
9. Go to parameters -> UAVCAN -> UAVCAN\_SUB\_BAT and set to raw data & save
10. Reboot (tools -> Reboot vehicle)
11. Connect 4 wire CAN wire from FMU CAN1 and to BMS CAN0.
12. To validate: go to Analyze -> MAVLink Console and type “uavcan status” -> this should result in
    1. `Sensor ‘battery’:`\
       `Name: uavcan_battery`\
       `Channel 0: node id 31 --> instance 1`
    2. You can also check cell voltages with “listener battery\_status”

It should now work.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nxp.gitbook.io/rddrone-bms772/software-guide-px4/how-to-integrate-rddrone-bms-or-mr-bms771-in-px4-via-dronecan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
