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

Usefull info/commands #4

Open
DrSimgear opened this issue Nov 4, 2023 · 1 comment
Open

Usefull info/commands #4

DrSimgear opened this issue Nov 4, 2023 · 1 comment

Comments

@DrSimgear
Copy link

Hi would this project be helpful for you to port over some extra functionality. https://github.com/huyugit/om-miner/tree/master/sm-miner-slave/src/psu

@DJJo14
Copy link

DJJo14 commented Feb 21, 2024

thanks for the hint.

I went digging around in the source and fount that. I do not understand it correctly and not everything in implemented. so correct me if I am wrong.
but next to the:
source: https://github.com/huyugit/om-miner/blob/master/sm-miner-slave/src/psu/msg/huawei_r48xx_msg.h
0x108180FE request control (HUAWEI_R48XX_MSG_CONTROL_ID 0x80)
0x1081807E request control
and
0x108040FE info request (HUAWEI_R48XX_MSG_DATA_ID 0x40)
0x1081407F info respond
where the data feild's get decoded: https://github.com/huyugit/om-miner/blob/master/sm-miner-slave/src/psu/data/data_feild.h

there is also a 0xD2 = desc id (HUAWEI_R48XX_MSG_DESC_ID 0xD2 )
0x1080D2FE request?
0x1081D27F response?
where the comment is this:

接收华为电源模块上报的模块信息,r48xxMsgCount返回0表示数据接收完毕,开始解析;
先取一行,然后查找关键字,符合关键字,再相应取出信息 
原始的数据如下:
	/$[ArchivesInfo Version]
/$ArchivesInfoVersion=3.0
[Board Properties]
BoardType=EN1MRC5G1A1
BarCode=2102310FFABTG4002898
Item=02310FFA
Description=Function Module,R4850G2,EN1MRC5G1A1,1U 3000W Rectifier,Power Only
Manufactured=2016-04-11
VendorName=Huawei
IssueNumber=00
CLEICode=
BOM=
过滤后获取的数据就是
Description BoardType Manufactured BarCode
的相应数据

so I think it has to do some thing with barcode and unit code

but there is also the: ((msgCmdId<<8)&0x0000FF00)
HUAWEI_R48XX_MSG_INFO_ID 0x50
HUAWEI_R48XX_MSG_CONFIG_ID 0x81
HUAWEI_R48XX_MSG_QUERY_ID 0x82
What that do I do not know yet, end are not always implemented.

HUAWEI_R48XX_PROTOCOL_ID 0x21
but they do this with it (0x21<<23)&0x1F800000= (0x21<<23)&0x10800000
so that's our starting address
((msgAddr<<16)&0x007F0000) this is the address of the device (for us always 0) but there can be more on one can bus

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