Documentation for PhoenixMiner claims that it uses same api approach as Claymore.
Here's our code:
Code:
TCP_IP = '127.0.0.1'
TCP_PORT = conf("MINER_API_PORT")
BUFFER_SIZE = 1024
MESSAGE = '{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}'
log.debug ("{}:{} - {}".format(TCP_IP, TCP_PORT, MESSAGE))
log.debug("Socket creating...")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
log.debug ("Socket connecting...")
s.connect((TCP_IP, TCP_PORT))
log.debug("Socket sending request...")
s.send(MESSAGE.encode('utf-8'))
log.debug("Socket receiving response...")
data = s.recv(BUFFER_SIZE).decode('utf-8')
log.debug ("Claymore API Response: {}".format(str(data)))
log.debug ("Socket closing...")
s.close()
result = json.loads(data)['result']
It works perfectly well with Claymore, but it gets stuck at "Socket receiving response..." with Phoenix miner. So it seems it does not receive any data from socket connection. I could not find any detailed documentation on Phoenix's api, other than a statement that "it is the same as Claymore protocol".
Please, help - did I miss anything in documentation, is there a more complete documentation or how should I fix the code to work with Phoenix?
Thanks for your time and attention.