Pages:
Author

Topic: [DIY] - Reward $100 | Antminer S1/S3 Blade on Raspberry Pi - page 38. (Read 82179 times)

hero member
Activity: 840
Merit: 1000

this is an excerpt from bfgminer's driver-antminer.c:

i have an idea, if you are confortable following code manipulation. See below

Below is the modified block:
Code:
*info = (struct ICARUS_INFO){
.baud = ANTMINER_IO_SPEED,
.Hs = ANTMINER_HASH_TIME,
.timing_mode = MODE_DEFAULT,
.read_size = 5,
        .work_division = 1,
                .fpga_count = 32,
         };

adding these two lines ( work_division and fpga_count)  should tell bfgminer detection code that there are 32 FPGAs( in this case BM1380 ASIC) and the work division is 1, each chip gets its own work item.

since in vanilla main branch code, they are not specified and so bfgminer falls back to an autodetect routine which due to the speed of the asics results in fpga_count of 8.

add those, save and recompile bfgminer. Post them results once it fires up.

Thanks, I'll try it.
hero member
Activity: 658
Merit: 500
CCNA: There i fixed the internet.
Nice. Now i have one dead blade and one dead raspberry pi  Cry Don't know how it could happen.


define dead. wont start on or you see charring/magic smoke somewhere?
full member
Activity: 182
Merit: 100
May the source be with you.
Nice. Now i have one dead blade and one dead raspberry pi  Cry Don't know how it could happen.
hero member
Activity: 658
Merit: 500
CCNA: There i fixed the internet.
Try runing with -debug and post log here.


I was compiling bfgminer, and it's detected as AMU and hashing as 8 units. (hard limit in the code?)

[2014-09-14 05:02:50] Summary of per device statistics:

 [2014-09-14 05:02:50] AMU0       | 20s: 4.53 avg: 3.89 u: 4.62 Gh/s | A:18 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0a       | 20s:577.4 avg:486.1 u:471.6 Mh/s | A:2 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0b       | 20s:564.6 avg:489.0 u:632.6 Mh/s | A:4 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0c       | 20s:564.6 avg:489.0 u:553.5 Mh/s | A:2 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0d       | 20s:564.6 avg:489.0 u:474.4 Mh/s | A:3 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0e       | 20s:564.6 avg:489.0 u:731.4 Mh/s | A:0 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0f       | 20s:564.6 avg:489.0 u:691.9 Mh/s | A:4 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0g       | 20s:564.6 avg:489.0 u:474.4 Mh/s | A:2 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0h       | 20s:564.6 avg:489.0 u:612.8 Mh/s | A:1 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50]
Shutdown signal received.


And the good thing is that there are no hw errors.

I'll test cgminer again.

this is an excerpt from bfgminer's driver-antminer.c:

i have an idea, if you are confortable following code manipulation. See below

Code:
static bool antminer_detect_one(const char *devpath)
{
struct device_drv *drv = &antminer_drv;

struct ICARUS_INFO *info = calloc(1, sizeof(struct ICARUS_INFO));
if (unlikely(!info))
quit(1, "Failed to malloc ICARUS_INFO");

*info = (struct ICARUS_INFO){
.baud = ANTMINER_IO_SPEED,
.Hs = ANTMINER_HASH_TIME,
.timing_mode = MODE_DEFAULT,
.read_size = 5,
};

if (!icarus_detect_custom(devpath, drv, info))
{
free(info);
return false;
}

info->read_count = 15;

return true;
}


If you add 2 lines to the below block of code, i believe it may work.
Code:
 
*info = (struct ICARUS_INFO){
.baud = ANTMINER_IO_SPEED,
.Hs = ANTMINER_HASH_TIME,
.timing_mode = MODE_DEFAULT,
.read_size = 5,
};

Below is the modified block:
Code:
*info = (struct ICARUS_INFO){
.baud = ANTMINER_IO_SPEED,
.Hs = ANTMINER_HASH_TIME,
.timing_mode = MODE_DEFAULT,
.read_size = 5,
        .work_division = 1,
                .fpga_count = 32,
         };

adding these two lines ( work_division and fpga_count)  should tell bfgminer detection code that there are 32 FPGAs( in this case BM1380 ASIC) and the work division is 1, each chip gets its own work item.

since in vanilla main branch code, they are not specified and so bfgminer falls back to an autodetect routine which due to the speed of the asics results in fpga_count of 8.

add those, save and recompile bfgminer. Post them results once it fires up.
hero member
Activity: 840
Merit: 1000
could it be that they faked Vid/pid to send work to 4 different "8 chips" units on the board?
Bfgminer is only seing 8 sub units (chips?)
Maybe creating 1 device for each vid/pid instead of adding them all to ANTS1 could help, but I'm not sure.

But the schematics simply shows the chips chained, strange.
hero member
Activity: 840
Merit: 1000
[2014-09-14 07:03:29] USB res lock BitmainAntS1 1-3
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:3) lock ok=1
 [2014-09-14 07:03:29] USB unlock BitmainAntS1 1-3
 [2014-09-14 07:03:29] ANT looking for ANT 10c4:ea60 but found 0424:9512 instead
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:3) lock=0
 [2014-09-14 07:03:29] ANT looking for ANT 0424:ec00 but found 0424:9512 instead
 [2014-09-14 07:03:29] USB res unlock BitmainAntS1 1-3
 [2014-09-14 07:03:29] ANT looking for and found ANT 0424:9512
 [2014-09-14 07:03:29] USB lock BitmainAntS1 1-2
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:2) lock=1
 [2014-09-14 07:03:29] USB res lock BitmainAntS1 1-2
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:2) lock ok=1
 [2014-09-14 07:03:29] USB unlock BitmainAntS1 1-2
 [2014-09-14 07:03:29] ANT looking for ANT 10c4:ea60 but found 1d6b:0002 instead
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:2) lock=0
 [2014-09-14 07:03:29] ANT looking for ANT 0424:ec00 but found 1d6b:0002 instead
 [2014-09-14 07:03:29] USB res unlock BitmainAntS1 1-2
 [2014-09-14 07:03:29] ANT looking for ANT 0424:9512 but found 1d6b:0002 instead
 [2014-09-14 07:03:29] ANT looking for and found ANT 1d6b:0002
 [2014-09-14 07:03:29] USB lock BitmainAntS1 1-1
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:1) lock=1
 [2014-09-14 07:03:29] USB res lock BitmainAntS1 1-1
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:1) lock ok=1
 [2014-09-14 07:03:29] USB unlock BitmainAntS1 1-1
 [2014-09-14 07:03:29] RES: BitmainAntS1 (1:1) lock=0
 [2014-09-14 07:03:29] USB res unlock BitmainAntS1 1-1


looks like it's finding it, but still

Select an option or any other key to return
Bus 1 Device 4 ID: 10c4:ea60 Silicon Labs CP2102 USB to UART Bridge Controller inactive
Bus 1 Device 3 ID: 0424:ec00 Silicon Labs CP2102 USB to UART Bridge Controller inactive
Bus 1 Device 2 ID: 0424:9512 Silicon Labs CP2102 USB to UART Bridge Controller inactive
Bus 1 Device 1 ID: 1d6b:0002 Linux 3.12.28-1-ARCH dwc_otg_hcd DWC OTG Controller inactive
4 total known USB devices
Hotplug interval:5
0 USB devices, 0 enabled, 0 disabled, 0 zombie

hero member
Activity: 840
Merit: 1000
Looks like untouched usbutils.c. Untill i edit this i get same error.

I've just added all the vid/pid couples he was giving in the debug.
Currently compiling and will check when my daughters will wake up from the nap.
hero member
Activity: 840
Merit: 1000
Is this still going on? If so, I wouldn't mind giving 20$ for the pot. I don't mine and I never will be, but this is a great thing to do.
Of course it's still going on.
hardware side is ok, but a proper software is still lacking.
I'll design a cheap interface board that will allow 4 or 8 hashing board to be connected to any usb host that will be able to run the mining software (cgminer/bfgminer)

Cgminer and bfgminer for U1/U2 are able to make the boards hashing, but not at full specs right now.
full member
Activity: 182
Merit: 100
May the source be with you.
Looks like untouched usbutils.c. Untill i edit this i get same error.
hero member
Activity: 840
Merit: 1000
I'll try to edit the usbutil to add the numbers it found
hero member
Activity: 840
Merit: 1000
 [2014-09-14 05:24:14] Generated stratum work
 [2014-09-14 05:24:14] Pushing work from pool 0 to hash queue
 [2014-09-14 05:24:15] USB scan devices: checking for ANT devices
 [2014-09-14 05:24:15] ANT looking for and found ANT 10c4:ea60
 [2014-09-14 05:24:15] USB lock BitmainAntS1 1-4
 [2014-09-14 05:24:15] RES: BitmainAntS1 (1:4) lock=1
 [2014-09-14 05:24:15] USB res lock BitmainAntS1 1-4
 [2014-09-14 05:24:15] RES: BitmainAntS1 (1:4) lock ok=1
 [2014-09-14 05:24:15] USB unlock BitmainAntS1 1-4
 [2014-09-14 05:24:15] ANT looking for ANT 10c4:ea60 but found 0424:ec00 instead
 [2014-09-14 05:24:15] RES: BitmainAntS1 (1:4) lock=0
 [2014-09-14 05:24:15] USB res unlock BitmainAntS1 1-4
 [2014-09-14 05:24:15] ANT looking for ANT 10c4:ea60 but found 0424:9512 instead
 [2014-09-14 05:24:15] ANT looking for ANT 10c4:ea60 but found 1d6b:0002 instead
 [2014-09-14 05:24:16] Discarded work
 [2014-09-14 05:24:16] Selecting pool 0 for work
 [2014-09-14 05:24:16] Generated stratum merkle c20e3c18f19c64c4b73f2d8c5e8ffaca8e48b88
d21b39b69ada01e23885807d7


full member
Activity: 182
Merit: 100
May the source be with you.
Wow great news -)
hero member
Activity: 840
Merit: 1000
Try runing with -debug and post log here.


I was compiling bfgminer, and it's detected as AMU and hashing as 8 units. (hard limit in the code?)

[2014-09-14 05:02:50] Summary of per device statistics:

 [2014-09-14 05:02:50] AMU0       | 20s: 4.53 avg: 3.89 u: 4.62 Gh/s | A:18 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0a       | 20s:577.4 avg:486.1 u:471.6 Mh/s | A:2 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0b       | 20s:564.6 avg:489.0 u:632.6 Mh/s | A:4 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0c       | 20s:564.6 avg:489.0 u:553.5 Mh/s | A:2 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0d       | 20s:564.6 avg:489.0 u:474.4 Mh/s | A:3 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0e       | 20s:564.6 avg:489.0 u:731.4 Mh/s | A:0 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0f       | 20s:564.6 avg:489.0 u:691.9 Mh/s | A:4 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0g       | 20s:564.6 avg:489.0 u:474.4 Mh/s | A:2 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50] AMU0h       | 20s:564.6 avg:489.0 u:612.8 Mh/s | A:1 R:0+0(none) HW:0/none
 [2014-09-14 05:02:50]
Shutdown signal received.


And the good thing is that there are no hw errors.

I'll test cgminer again.
full member
Activity: 182
Merit: 100
May the source be with you.
Try runing with -debug and post log here.
hero member
Activity: 840
Merit: 1000
For some reasons, it's now detected but inactive

Quote
Select an option or any other key to return
Bus 1 Device 4 ID: 10c4:ea60 Silicon Labs CP2102 USB to UART Bridge Controller i
nactive
1 total known USB device
Hotplug interval:5
0 USB devices, 0 enabled, 0 disabled, 0 zombie

This is what i'm talking about. Enable debug option and you see that driver expect another device. Open usbutils.c find .drv = DRIVER_ants1 change vid pid and recompile.

They are already changed
#ifdef USE_ANT_S1
   {
      .drv = DRIVER_ants1,
      .name = "ANT",
      .ident = IDENT_ANT,
      .idVendor = 0x10C4,
      .idProduct = 0xEA60,
      .config = 1,
      .timeout = ANT_S1_TIMEOUT_MS,
      .latency = LATENCY_ANTS1,
      INTINFO(ants1_ints) },
#endif
full member
Activity: 182
Merit: 100
May the source be with you.
For some reasons, it's now detected but inactive

Quote
Select an option or any other key to return
Bus 1 Device 4 ID: 10c4:ea60 Silicon Labs CP2102 USB to UART Bridge Controller i
nactive
1 total known USB device
Hotplug interval:5
0 USB devices, 0 enabled, 0 disabled, 0 zombie

This is what i'm talking about. Enable debug option and you see that driver expect another device. Open usbutils.c find .drv = DRIVER_ants1 change vid pid and recompile.
hero member
Activity: 840
Merit: 1000
For some reasons, it's now detected but inactive

Quote
Select an option or any other key to return
Bus 1 Device 4 ID: 10c4:ea60 Silicon Labs CP2102 USB to UART Bridge Controller i
nactive
1 total known USB device
Hotplug interval:5
0 USB devices, 0 enabled, 0 disabled, 0 zombie
full member
Activity: 182
Merit: 100
May the source be with you.
Currently compiling the Kano fork of cgminer supporting the antS1 on a RPi with archlinux.
It takes hours, but should work since it works when compiled on the S1 control board.
Wrong. It won't work unless you change vid pid in usbutils.c. Driver waiting pic32 vid pid and ignore your usb2serial bridge. I tried that . PS Why rpi? Use virtualbox or vmware player would be much faster.
Ok, USB\VID_10C4&PID_EA60

I guess the U2 uses the same cp2102 with the same VID and PID, that's why it works with this particular buid.

I'll check tomorrow. Anyway, the PSU is too noisy to continue testing next to the bedroom.
As I said, I'm not really a software guy, more hardware side.
Rpi because I had one laying on my desk and it was faster than to unconnect the MR3020 from the hex boards.
I don't have virtualbox on this laptop, it was on my main work computer that died after many years of good services.
If you need VM i can create it for you for free on my server =)
PS If you succeed in creating bridge for blades i want to be first buyer -) I have 8 antminer s1 that soon to be upgraded
hero member
Activity: 840
Merit: 1000
Currently compiling the Kano fork of cgminer supporting the antS1 on a RPi with archlinux.
It takes hours, but should work since it works when compiled on the S1 control board.
Wrong. It won't work unless you change vid pid in usbutils.c. Driver waiting pic32 vid pid and ignore your usb2serial bridge. I tried that . PS Why rpi? Use virtualbox or vmware player would be much faster.
Ok, USB\VID_10C4&PID_EA60

I guess the U2 uses the same cp2102 with the same VID and PID, that's why it works with this particular buid.

I'll check tomorrow. Anyway, the PSU is too noisy to continue testing next to the bedroom.
As I said, I'm not really a software guy, more hardware side.
Rpi because I had one laying on my desk and it was faster than to unconnect the MR3020 from the hex boards.
I don't have virtualbox on this laptop, it was on my main work computer that died after many years of good services.
full member
Activity: 182
Merit: 100
May the source be with you.
Currently compiling the Kano fork of cgminer supporting the antS1 on a RPi with archlinux.
It takes hours, but should work since it works when compiled on the S1 control board.
Wrong. It won't work unless you change vid pid in usbutils.c. Driver waiting pic32 vid pid and ignore your usb2serial bridge. I tried that . PS Why rpi? Use virtualbox or vmware player would be much faster.
Pages:
Jump to: