Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P330 Battery Intelligent board - collaboration - decoding SMBUS #415

Open
Gustavomurta opened this issue Jan 6, 2025 · 2 comments
Open

Comments

@Gustavomurta
Copy link

Gustavomurta commented Jan 6, 2025

I don't know if anyone has already done this, but I managed to decode the SMBUS of my Phantom 2 Battery.
I would like to contribute to this Wiki.

P330 Battery Intelligent board
https://github.com/o-gs/dji-firmware-tools/wiki/P330-Battery-Intelligent-board

https://forum.dji.com/forum.php?mod=viewthread&tid=198978&page=1#pid3515374

BM3328 Datasheet (chinese):
https://www.rcgroups.com/forums/showatt.php?attachmentid=6480463

  • Data format supports Smart Battery Specification (SBS) Data V1.1 protocol
  • Communication interface supports System Management Bus (SMBus) 2.0 protocol

Using Logic Analyser - Logic 2 (version 2.4.22)
https://www.saleae.com/pages/downloads

Select SMBus analyzer with this configuration: (data hexadecimal format)
SMBUs config

Captured Log:
Phantom 2 Assistant on SMB data 01 2025_01_06.xlsx

Decoding the Battery SMBus:
SMBUS decoded

My battery information:
Bat2 info 2025_01_06

Reference - SBDS – Addendum For Fuel Cell Systems
https://sbs-forum.org/specs/sbdata_addendum_fuel_cells_20070411.pdf

@mefistotelis
Copy link
Collaborator

I would like to contribute to this Wiki.

The wiki page is its own git repository - it can be cloned (git clone https://github.com/o-gs/dji-firmware-tools.wiki.git) and modified, then the changes shared as a patch/PR. On you can just write the specifics here, and sooner or later I should be able to update it.

I don't know if anyone has already done this, but I managed to decode the SMBUS of my Phantom 2 Battery.

Yeah, probably. DJI uses SBS-compatible chips, so no problem reading that. The external UART communication of early drones was also decoded to some extent; protocol details are available in form of Wireshark dissector:
https://github.com/o-gs/dji-firmware-tools/blob/master/comm_dissector/wireshark/dji-p3-batt-proto.lua

But looking at the Wiki, Ph2 battery doesn't seem to have an uC which would provide UART interface. So the SBS is at external terminals.

@Gustavomurta
Copy link
Author

Hi Mefistotelis,

Clarifying - The Smart Battery communication interface is not Serial UART, but rather another type of interface called SMBUS (similar to the I2C interface). This interface SMBus is connected directly to the BM3328 Chip (responsible for controlling the battery charge and balancing)
https://www.smbus.org/specs/smbus20.pdf

I did not find any information on this communication protocol with the Phantom2 battery in my internet searches.

Thanks for the tip on how to contribute to WIKI.

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

No branches or pull requests

2 participants