btccom / libbtctools

A core library of BTCTools
MIT License
20 stars 36 forks source link

Get mac by tcp #1

Closed Vetalcraft closed 4 years ago

Vetalcraft commented 5 years ago

Hello!

Request *req = new Request; req->host = ip; req->port = "4028"; req->content_ = "stats|"; //Does not return MAC-Address! Just like "summary, lcd " and all other requests.

How to get the MAC-Address?

YihaoPeng commented 5 years ago

There is no MAC-Address in the response of bmminer API. But you can get it via HTTP request.

curl -uroot:root http://x.x.x.x/cgi-bin/get_system_info.cgi

https://github.com/btccom/libbtctools/blob/10798f9ca26c1b90aa5d7ee9b1506ecdfe5705c4/src/lua/scripts/minerScanner/antminer-http-cgi.lua#L240