Pages:
Author

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

hero member
Activity: 840
Merit: 1000
As for the Vid/Pid, I've used the same values that are used for ant U1/U2 since it's the same CP2102 chip, so I shouldn't be wrong.
I changed them in both files too, bitmain and usbutils.
If I were in your position, my next HACK would be to remove ALL OS and HW (e.g for S2 etc) conditional code in both the usbutils.c and driver-bitmain.c, that way you'll only have S1 code, then compile and run with your updated vendor and product ids. It is a tedious hack, but made easy for me via the Microsoft Visual C++ code highlighter, and more importantly, it is only after this hack that I was able to get the both the USB chip and the S1 chips identified.
I have since gone off on a tangent and now hacking a sketch for the MSP430 (and use its UART) to interface with the S1 board (and get the addresses of individual chips). Out of interest, is your board implementing UART communication or simply via serial tx/rx?

Looks like you will be of real help on this one.
I'll only be using the tx-rx, I don't really care about the fan and temp thing.
In fact, this is a part of an homemade miner to use chips from a few defective boards, and maybe with new chips if they are cheap enough.
I was already working on some parts of the board, and focused on the communication protocol when I noticed this thread.
hero member
Activity: 658
Merit: 500
CCNA: There i fixed the internet.
I figured since this race is mighty well and over, I'd post my lil pet up for the world to see and maybe gain inspiration.

same size as a nanofury and to make 3: each is about $13

...IMAGE OF AWESOME...

Nice, using the original pic is easier  Wink
If they opensourced the firmware, you would be able to handle 4 boards, since the PIC32MX250F128D is supposed to have 4 Tx/Rx lines, even if they used only 2.

Unless they are using the pic to actually create the multiple chains, software hack can be done almost easily for someone who knows what he is looking for.



im not so sure about it handling 4 blades; mainly due to its tiny 32Kb of ram. seems like it would be hard to manage 64 chips + temp data with that, let alone 128 chips. but im sure some clever reverse engineering/gdb step through could with some effort yield source code ( atleast pic bytecode breakdown.
hero member
Activity: 518
Merit: 500
As for the Vid/Pid, I've used the same values that are used for ant U1/U2 since it's the same CP2102 chip, so I shouldn't be wrong.
I changed them in both files too, bitmain and usbutils.
If I were in your position, my next HACK would be to remove ALL OS and HW (e.g for S2 etc) conditional code in both the usbutils.c and driver-bitmain.c, that way you'll only have S1 code, then compile and run with your updated vendor and product ids. It is a tedious hack, but made easy for me via the Microsoft Visual C++ code highlighter, and more importantly, it is only after this hack that I was able to get the both the USB chip and the S1 chips identified.
I have since gone off on a tangent and now hacking a sketch for the MSP430 (and use its UART) to interface with the S1 board (and get the addresses of individual chips). Out of interest, is your board implementing UART communication or simply via serial tx/rx?
hero member
Activity: 840
Merit: 1000
Still looking for some help on the software side.
I'll have a few spare prototypes of control boards next week if needed.

What might work is adding to icarus U1/U2 driver the multichain mode from here:
https://github.com/bitmaintech/cgminer

Second way it could be solved is understanding why the CP2102 isn't detected when using the bitmaintech driver even if I changed the vendor and product id.
Are there other places with such id check or other things checked?

Edit:

Looking at bitmaintech github, antminer U3 is on it's way

1. Would be interested in the prototypes  - would you pls PM me with (BTC ?!) cost to UK?
2. I looked over the icarus driver and it is too generic, catering for many devices so may be a bit harder to hack for me (and someone not accustomed to this driver).
3. What bitmaintech driver are you refering to as not detecting the CP2102 ? Is that from the same repository above (aka driver-bitmain.c) ? Most drivers in that repository ONLY support linux.

I actually un-commented out all non S1 code plus OS conditionality in bothe the bitmain driver  AND USB utils to compile for Windows .... and USB utils DOES detect the USB chip I have after changing the vendor and product id. If you are still using  the USB-TTL dongle, note that the id you are populating could be the Antecedent (as windows calls it) rather than the  Dependent, which is the one you need.

Antecedent -> \\MY-PC\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086&DEV_2934&SUBSYS_9033104D&REV_03\\3&11583659&0&E8"
Dependent -> \\MY-PC\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_067B&PID_2303\\5&6B69FA&0&1"

I used the latter bolded values and the chips on the S1 were detected (though I got the formaer bolded values from Windows CP ... also detected by USB utils in the cgminer log!).
1. No problem, I'll send 1 free prototype to you and CHAOSiTEC when they are ready. Cheap shipping to Europe should be something like 5€, maybe less if I can send it as a letter.
3. yes, bitmain driver from https://github.com/bitmaintech/cgminer, but even the main branch of cgminer doesn't work except with icarus, detected as ANU.
I compiled them on the raspberry, so no windows trouble there.

The CP2102 is detected as a known device by cgminer, but it's not active for hashing. It needs something else, and I don't know what.
Forcing it might be a temporary option, but I don't know how.

They have just updated bitmaintech branch 1 hour ago for S4 and U3 support. I'll try to compile this new one, just in case it works because of the changes they did.
The files they changed will point where we need to work to have the cp2102 hacked S1 hashing correctly.

As for the Vid/Pid, I've used the same values that are used for ant U1/U2 since it's the same CP2102 chip, so I shouldn't be wrong.
I changed them in both files too, bitmain and usbutils.
hero member
Activity: 518
Merit: 500
Still looking for some help on the software side.
I'll have a few spare prototypes of control boards next week if needed.

What might work is adding to icarus U1/U2 driver the multichain mode from here:
https://github.com/bitmaintech/cgminer

Second way it could be solved is understanding why the CP2102 isn't detected when using the bitmaintech driver even if I changed the vendor and product id.
Are there other places with such id check or other things checked?

Edit:

Looking at bitmaintech github, antminer U3 is on it's way

1. Would be interested in the prototypes  - would you pls PM me with (BTC ?!) cost to UK?
2. I looked over the icarus driver and it is too generic, catering for many devices so may be a bit harder to hack for me (and someone not accustomed to this driver).
3. What bitmaintech driver are you refering to as not detecting the CP2102 ? Is that from the same repository above (aka driver-bitmain.c) ? Most drivers in that repository ONLY support linux.

I actually un-commented out all non S1 code plus OS conditionality in bothe the bitmain driver  AND USB utils to compile for Windows .... and USB utils DOES detect the USB chip I have after changing the vendor and product id. If you are still using  the USB-TTL dongle, note that the id you are populating could be the Antecedent (as windows calls it) rather than the  Dependent, which is the one you need.

Antecedent -> \\MY-PC\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086&DEV_2934&SUBSYS_9033104D&REV_03\\3&11583659&0&E8"
Dependent -> \\MY-PC\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_067B&PID_2303\\5&6B69FA&0&1"

I used the latter bolded values and the chips on the S1 were detected (though I got the formaer bolded values from Windows CP ... also detected by USB utils in the cgminer log!).
hero member
Activity: 840
Merit: 1000
I figured since this race is mighty well and over, I'd post my lil pet up for the world to see and maybe gain inspiration.

same size as a nanofury and to make 3: each is about $13



Nice, using the original pic is easier  Wink
If they opensourced the firmware, you would be able to handle 4 boards, since the PIC32MX250F128D is supposed to have 4 Tx/Rx lines, even if they used only 2.

Unless they are using the pic to actually create the multiple chains, software hack can be done almost easily for someone who knows what he is looking for.

legendary
Activity: 1358
Merit: 1002
Still looking for some help on the software side.
I'll have a few spare prototypes of control boards next week if needed.

What might work is adding to icarus U1/U2 driver the multichain mode from here:
https://github.com/bitmaintech/cgminer

Second way it could be solved is understanding why the CP2102 isn't detected when using the bitmaintech driver even if I changed the vendor and product id.
Are there other places with such id check or other things checked?

Edit:

Looking at bitmaintech github, antminer U3 is on it's way


pm me with a price in btc (including posting to sweden) and ill take 1 or 2 off your hands :-p

then ill take a look at the software (im no wiz mind you)...
hero member
Activity: 658
Merit: 500
CCNA: There i fixed the internet.
I figured since this race is mighty well and over, I'd post my lil pet up for the world to see and maybe gain inspiration.

same size as a nanofury and to make 3: each is about $13

hero member
Activity: 840
Merit: 1000
Still looking for some help on the software side.
I'll have a few spare prototypes of control boards next week if needed.

What might work is adding to icarus U1/U2 driver the multichain mode from here:
https://github.com/bitmaintech/cgminer

Second way it could be solved is understanding why the CP2102 isn't detected when using the bitmaintech driver even if I changed the vendor and product id.
Are there other places with such id check or other things checked?

Edit:

Looking at bitmaintech github, antminer U3 is on it's way
newbie
Activity: 27
Merit: 0
So my 3 x upgrades are on the way.. Very keen for this work out.. keep up the good work J4bba!

If these boards go to production I am in..

Cheers
legendary
Activity: 1358
Merit: 1002
Configuration Options Summary:

  libcurl(GBT+getwork).: Enabled: -lcurl
  curses.TUI...........: FOUND: -lncurses

  Bitmain.SingleChain..: Enabled
  Bitmain.MultiChain...: Enabled


Compiling  Roll Eyes

single chain is as expected for U1/U2
multiple chain hopefully will recognize the S1 after I changed the Vid/Pid

Edit:

Still no luck, for some reasons, only icarus ANU works for hashing, but it's single chain mode.

Icarus multichain mode would solve this.
Do we have any coder here that can do it?

Worst case, I'll do the soldermod on the chips to put them in single chain mode and use icarus ANU driver.
According to Bitmain, single chain is limited to 120Gh, but each S1 blade is 100Gh max, and even 70Gh undervolted, so it shouldn't be an issue.

if you guys get this working i will definatly buy a couple of J4bberwocks controller boards to power my soon to be upgraded S1s...
hero member
Activity: 840
Merit: 1000
Configuration Options Summary:

  libcurl(GBT+getwork).: Enabled: -lcurl
  curses.TUI...........: FOUND: -lncurses

  Bitmain.SingleChain..: Enabled
  Bitmain.MultiChain...: Enabled


Compiling  Roll Eyes

single chain is as expected for U1/U2
multiple chain hopefully will recognize the S1 after I changed the Vid/Pid

Edit:

Still no luck, for some reasons, only icarus ANU works for hashing, but it's single chain mode.

Icarus multichain mode would solve this.
Do we have any coder here that can do it?

Worst case, I'll do the soldermod on the chips to put them in single chain mode and use icarus ANU driver.
According to Bitmain, single chain is limited to 120Gh, but each S1 blade is 100Gh max, and even 70Gh undervolted, so it shouldn't be an issue.
hero member
Activity: 840
Merit: 1000
For some reason, it seems that it's only working on 1/4 of the chips, but they are all equally hot 60-70°C depending on frequency settings.
changing fpga count didn't help in cgminer.
I have a nice and stable 20-24Gh.
hero member
Activity: 840
Merit: 1000
Just received a few parts that will go in the "hub" board. Still waiting for a few ones from ST micro.
No update on the software side for now  Embarrassed

but investigating the icarus (ANT USB) driver in cgminer since at the moment, it's the one giving the best results.
hero member
Activity: 840
Merit: 1000
Someone posted this in the BFG Miner thread:

https://bitcointalksearch.org/topic/m.8835886


The USB chipset I do believe you are looking for is http://am.renesas.com/products/soc/usb_assp/product/upd720114/index.jsp I sure hope this helps you out as I am dying to get rid of the POS bitmain version of cgminer on my S1's....

Linux® USB 2.0 Driver

Linux USB 2.0 driver is supported from kernel 2.4.19 or later. Kernel is updated regularly, and the problems in older version may be solved in the latest kernel. So it is desirable to use the latest one. The following URL is for your reference.

http://www.linux-usb.org

For Kernel 2.4.26 patch, refer to this page.

Hi, unless I'm mistaken, this part is simply a usb hub that allow them to plug more than 1 board to the AR9331.
The part that is acting as a USB>UART converter should be the pic32.
sr. member
Activity: 361
Merit: 267
Someone posted this in the BFG Miner thread:

https://bitcointalksearch.org/topic/m.8835886


The USB chipset I do believe you are looking for is http://am.renesas.com/products/soc/usb_assp/product/upd720114/index.jsp I sure hope this helps you out as I am dying to get rid of the POS bitmain version of cgminer on my S1's....

Linux® USB 2.0 Driver

Linux USB 2.0 driver is supported from kernel 2.4.19 or later. Kernel is updated regularly, and the problems in older version may be solved in the latest kernel. So it is desirable to use the latest one. The following URL is for your reference.

http://www.linux-usb.org

For Kernel 2.4.26 patch, refer to this page.
hero member
Activity: 518
Merit: 500
I believe I've found something.
It appears that the S1 chips are supporting single chain and multiple chain mode.
And it's set to multiple chain on my boards by floating pin 44.

Is this the reason why my cgminer was seeing a few different units?

From my initial run earlier today with cgminer, the "different units" that you refer to were actually (on a windows system) the installed USB devices on the system (hubs et al).
I looked through them (via control panel -> system devices ) and identified the one that I had my Prolific dongle attached to, and looking through the cgminer debug log, it was easy to pick out the settings (to plug into the software). Basically you just have to prepend with 0x (thats a zero and a lower case x) then the respective number aka idVendor & idProduct.

EDIT: So, at least for a windows system, those other units that appear in the cgminer debug log are a dead end!

Grounding it (bridge with pin 45) would set it as single chain.
Maybe it will help and avoid any change in the software.
I'll check later if grounding is as easy as it seems.

EDIT: Maybe not for everyone, but it can be physically done on the board.

This is good news. The more options that can be got the better.
That link I suggested earlier has not been forthcoming because I did not get any positive outcome from running the binary myself, and having based the binary on hardcoding the USB device, I thought it would only be of use if you had the exact USB-TTL dongle that I have (which may be a remote possiblity).

I thought I had the afternoon off! Its all gone and I can not think of any progress I have made .... well well, time flies when your'e having fun hacking!
hero member
Activity: 840
Merit: 1000
I believe I've found something.
It appears that the S1 chips are supporting single chain and multiple chain mode.
And it's set to multiple chain on my boards by floating pin 44.

Is this the reason why my cgminer was seeing a few different units?

Grounding it (bridge with pin 45) would set it as single chain.
Maybe it will help and avoid any change in the software.
I'll check later if grounding is as easy as it seems.

EDIT: Maybe not for everyone, but it can be physically done on the board.
hero member
Activity: 840
Merit: 1000
RX is pin #3 TX is pin #5.
Pin 1 is the closest to the 4 pins fan header
hero member
Activity: 518
Merit: 500
I dug out my ageing S1 from the garden and decided to give it a go seeing I have the rest of this afternoon to my leisure.
I'll look back through the thread to get the setting you had and will have to get mine as well then compile. Will drop a line when I am done.
I know I read this in the thread but can't remember where, you managed to work out the tx/rx lines on the ribbon cable, do you mind jogging my memory?
Pages:
Jump to: