Author

Topic: Getting Minera working with Innosilicon A4+ ASICs (Read 141 times)

newbie
Activity: 12
Merit: 1
I'm pretty sure if I can turn off error reporting, it will work. Its the PHP errors freezing the dashboard, all the info is there though.
newbie
Activity: 12
Merit: 1
For anyone more savvy than me.. Here is the full JSON returned with the A4+ from Minera

Code:


A PHP Error was encountered



Severity: Notice


Message:  Undefined property: stdClass::$Type


Filename: models/util_model.php


Line Number: 435





A PHP Error was encountered



Severity: Notice


Message:  Undefined property: stdClass::$Type


Filename: models/util_model.php


Line Number: 435





A PHP Error was encountered



Severity: Notice


Message:  Undefined property: stdClass::$Type


Filename: models/util_model.php


Line Number: 435



{"notrunning":true,"network_miners":{"MY RIG":{"start_time":1515689761,"totals":{"temperature":false,"frequency":false,"accepted":2027,"rejected":2,"hw_errors":14729,"shares":0,"hashrate":0,"last_share":1515703884},"pool":{"hashrate":629125673,"url":"MY POOL","alive":true},"pools":[{"priority":0,"url":"MY POOL","active":true,"user":"MY RIG","pass":false,"stats":[{"start_time":false,"accepted":2027,"rejected":2,"shares":883415,"stop_time":false,"stats_id":1}],"stats_id":1,"alive":true}],"config":{"ip":"192.168.1.41","port":"4028","algo":"Scrypt"}}},"minera_id":"ymmyjknmfhzm","miner":"cpuminer","algo":"Scrypt","sysload":[1.04,0.28,0.1],"cron":null,"sysuptime":"31","temp":{"value":"54.23","scale":"c"},"btc_rates":{"high_eur":12549.19,"last_eur":11274.52,"high":"14973.07","last":"13452.19","timestamp":"1515703820","bid_eur":11293.3,"vwap_eur":11506.84,"bid":"13474.60","vwap":"13729.39","volume":"19181.92181082","low_eur":10727.91,"ask_eur":11303.11,"low":"12800.00","ask":"13486.31","eur_usd":1.19315},"altcoins_rates":{"error":"true"},"avg":{"1min":[],"5min":[false],"1hour":[false],"1day":[]},"profits":[{"symbol":"btc","coin":"bitcoin","algo":"sha256","reward":12.5,"difficulty":1931136454487.7,"blocks":503751,"networkhashps":"19504895985485860000","btcValue":1,"price":1,"coin_profitability":1.3021197676727e-10,"btc_profitability":1.3021197676727e-10,"timestamp":1515703803,"hashrate":1000000},{"symbol":"bch","coin":"bitcoin cash","algo":"sha256","reward":12.5,"difficulty":53206941.883907,"blocks":518174,"networkhashps":6.0455462793642e+14,"btcValue":0.18799036,"price":0.18799036,"coin_profitability":4.7260204447539e-6,"btc_profitability":8.8844628477665e-7,"timestamp":1515703803,"hashrate":1000000},{"symbol":"ltc","coin":"litecoin","algo":"scrypt","reward":25,"difficulty":3660955.7838378,"blocks":1348615,"networkhashps":1.1439741936518e+14,"btcValue":0.01717569,"price":0.01717569,"coin_profitability":0.00013737237486249,"btc_profitability":2.3594653252019e-6,"timestamp":1515703803,"hashrate":1000000}],"livestat":true,"timestamp":1515703885}

This is what line 435 of util_model.php reads

Code:
if (isset($stats->stats[0]->STATS[0]) && ($stats->stats[0]->STATS[0]->Type == 'Antminer S9' || $stats->stats[0]->STATS[0]->Type == 'Antminer L3+' || $stats->stats[0]->STATS[0]->Type == 'Antminer D3')) $antNew = true;

and this is what is returned from the A4+ when I ask the API for stats

Code:
echo '{"command": "stats"}' | nc 192.168.1.41 4028
{"STATUS":[{"STATUS":"S","When":1515693143,"Code":70,"Msg":"CGMiner stats","Description":"cgminer 4.10.0"}],"STATS":[{"STATS":0,"ID":"BA10","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":1,"ID":"BA11","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":2,"ID":"BA12","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":3,"ID":"BA13","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":4,"ID":"POOL0","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000,"Pool Calls":0,"Pool Attempts":0,"Pool Wait":0.000000,"Pool Max":0.000000,"Pool Min":99999999.000000,"Pool Av":0.000000,"Work Had Roll Time":false,"Work Can Roll":false,"Work Had Expire":false,"Work Roll Time":0,"Work Diff":65536.00000000,"Min Diff":8192.00000000,"Max Diff":65536.00000000,"Min Diff Count":974,"Max Diff Count":230480,"Times Sent":488,"Bytes Sent":54470,"Times Recv":721,"Bytes Recv":240146,"Net Bytes Sent":54470,"Net Bytes Recv":240146}],"id":1}
newbie
Activity: 12
Merit: 1
This is the reply back

Code:
echo '{"command": "stats"}' | nc 192.168.1.41 4028
{"STATUS":[{"STATUS":"S","When":1515693143,"Code":70,"Msg":"CGMiner stats","Description":"cgminer 4.10.0"}],"STATS":[{"STATS":0,"ID":"BA10","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":1,"ID":"BA11","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":2,"ID":"BA12","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":3,"ID":"BA13","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000},{"STATS":4,"ID":"POOL0","Elapsed":3382,"Calls":0,"Wait":0.000000,"Max":0.000000,"Min":99999999.000000,"Pool Calls":0,"Pool Attempts":0,"Pool Wait":0.000000,"Pool Max":0.000000,"Pool Min":99999999.000000,"Pool Av":0.000000,"Work Had Roll Time":false,"Work Can Roll":false,"Work Had Expire":false,"Work Roll Time":0,"Work Diff":65536.00000000,"Min Diff":8192.00000000,"Max Diff":65536.00000000,"Min Diff Count":974,"Max Diff Count":230480,"Times Sent":488,"Bytes Sent":54470,"Times Recv":721,"Bytes Recv":240146,"Net Bytes Sent":54470,"Net Bytes Recv":240146}],"id":1}
legendary
Activity: 1015
Merit: 1000
That's a problem with the data output from the A4, it's not like the Antminers so I need to change something there.
To do this I need to know how the stats come from A4, please try to run this from the RPI:

Code:
echo '{"command": "stats"}' | nc 4028
newbie
Activity: 12
Merit: 1
Hey guys! I've been reading posts on here for a while and wanted to post my progress and get some help with Minera on the A4+ ASICs (and probably other Inno ASICs)

I'll get start some instructions on how to get as far as I've gotten and edit the post when I've figured out the last part.

So to start, you should already have your ASIC configured and good to go with your pools. From there,

Enable Telnet if you're using windows. If you're using another Telnet program, on linux, etx, you can skip this step.

You can enable Telnet by typing "Turn Windows Features On or Off" into your start menu and selecting the "Telnet Client" box.

Now open up a command prompt window and type

Code:
telnet

then

Code:
o "ASIC IP" 8100

it will ask you for a username and a password. Your username will be root, and the password for the December 22nd firmware is t1t2t3a5

Now you are logged into your ASIC, but we need to give ourselves write access to the system. To do this, type

Code:
mount / -o rw,remount

Now we're able to edit the config files. From here, I enabled API access to ccminer following the steps on the A4+ advanced setup post here https://bitcointalksearch.org/topic/innosilicon-a4-setup-tutorial-2549898

  • type "cd /home/inno_py/"
  • type "cp /home/inno_py/inno_config.py ./inno_config.py.bk" to take a backup of your file before editing
  • type "vi /home/inno_py/inno_config.py" to erdit your config file
  • scroll down until you see the value gInnoInitCmdStr
  • click the letter i on the keyboard to enable edit mode in vi
  • at the end of that line replace "--api-listen" with "--api-listen --api-network --api-allow W:0/0" this will enable network privileged access from API
  • Click  "ESC" on the keyboard to exit Edit Mode
  • click ":wq" and Enter to save the file
  • type reboot to reboot your miner and for changes to take effect

Now, you can install Minera on your linux system (such as a Raspberry Pi) and connect it to your network. Follow the steps on getminera.com and add a "Network Miner" by typing in your ASICs IP address with the port 4028

It appears as online in the Network Miner list in the settings, but Minera never finishes refreshing. If you check the raw JSON file, it has the proper hashrate and pool info, but a PHP error stops it from adding the stats to the dashboard. The PHP error according to the JSON is

Code:

A PHP Error was encountered



Severity: Notice


Message:  Undefined property: stdClass::$Type


Filename: models/util_model.php


Line Number: 435


Once that can be fixed, I don't see why Minera can't manage these ASICs
Jump to: