fasmax
|
|
September 02, 2013, 11:26:06 PM Last edit: September 03, 2013, 01:02:01 AM by fasmax |
|
Hello, I want to run ktest on a RasPi. Can some one tell me how to do this ? Thanks! Edit: I used git to clone the Klondike directory so I should have all the files I think. There is a directory called utils in there excitable code called ktest. When I try to execute it I get the message below. File "./ktest:, line 22, in<module> import usb Import Error : No module name usb. Any help is approached. Edit2: Got this working by doing this git clone http://github.com/walac/pyusbcd pyusb sudo python setup.py install Now ktest runs. "I"command results in: Version:10, ProductID:K16, Serial#:deadbeef
|
|
|
|
|
kostagr33k
|
|
September 03, 2013, 05:44:39 AM |
|
Another problem I noticed, is that when I setup cgminer with the API options for K16, cgminer would have a Segmentation Fault when trying to access the API to get stats.
Has anyone else had SegFaults when trying to access the K16 API ?
kosta
|
|
|
|
terrahash
Member
Offline
Activity: 86
Merit: 10
|
|
September 03, 2013, 08:47:50 PM |
|
Hey Guys. Im trying to do some testing with ktest but don't seem to get any desirable results. At one point, I got the "W" command to work, but it resulted in a BAD response , which I would think should be accepted, if Im reading the code right using Below Var: Work = ["4375c3b7a27cc936f295a6140358e965319322e7cfd11e137df42ea60864a675", "218d522051d547d51a00c94e", "b2cc9f74", "accept"]
Now, I run W command (aftere restarting ktest) and I get no response at all! Trying to find out if theres a proper method to using ktest or if there could be something wrong with the K16. I added a small debug output in sendcmd under the dev.write line: dev.write(0x01, cmd + chr(addr) + data, 0, 500) print "tried %s %s %s" % (cmd,addr,data)
python ktest Klondike device opened tried I 0
Version:10, ProductID:K16, Serial#:deadbeef Cmds [WAISCE.Q]: S
State:R, ASICs:16, Slaves:0 WorkQ:0, WorkID:04, Temp:158, Fan:0, ErrCount:0, HashCount:2048, MaxCount:2048tried S 0
Cmds [WAISCE.Q]: w tried W 0 Cu÷?|?6?X?e1?"???}?.d?u!?R Q?G??N
State:W, ASICs:16, Slaves:0 WorkQ:0, WorkID:01, Temp:158, Fan:0, ErrCount:0, HashCount:0, MaxCount:2048 Cmds [WAISCE.Q]:
Is there something I am missing here, or something else I should be checking out? thanks It is most likely a hardware bug in the circuit. During our testing we realized that the Dual NOR gates used in the design are too fast, and there needs to be some propagation delay. Using a cheap NOR gate chip from Fry's did the trick. We are still trying to see if this can be fixed in the firmware.
|
|
|
|
hf_developer
Member
Offline
Activity: 66
Merit: 10
|
|
September 03, 2013, 09:01:55 PM |
|
It is most likely a hardware bug in the circuit. During our testing we realized that the Dual NOR gates used in the design are too fast, and there needs to be some propagation delay. Using a cheap NOR gate chip from Fry's did the trick. We are still trying to see if this can be fixed in the firmware.
Maybe you may also want to try to use a bigger capacitor for the phase shifter in front of the NOR gate. A circuit should not depend on the propagation delays or fabrication tolerances of logic gates. I also tried to use the internal comparator of the PIC as a NOR gate, which is even better since it has some clock synchronization register. But it has shown that the comparator is not fast enough...
|
|
|
|
ScaryHash
|
|
September 03, 2013, 11:52:16 PM |
|
Another problem I noticed, is that when I setup cgminer with the API options for K16, cgminer would have a Segmentation Fault when trying to access the API to get stats.
Has anyone else had SegFaults when trying to access the K16 API ?
kosta
Yes I just compiled and got a segmentation fault. I was assuming that it was due to a graphics driver issue, because my cgminer (with gpu) does the same thing, while my cgminer-nogpu does not do this when I compile it under Linux Mint 14. How do you get cgminer to compile with no gpu support, but with klondike support and icarus support? I wanna test Klondike compiled version actually runs, but I don't have a Klondike, so I want to compile it for icarus as well. I can't find the flags list anywhere (having a mental moment)...
|
|
|
|
|
zipiju
Member
Offline
Activity: 93
Merit: 10
|
|
September 04, 2013, 12:03:30 AM |
|
Another problem I noticed, is that when I setup cgminer with the API options for K16, cgminer would have a Segmentation Fault when trying to access the API to get stats.
Has anyone else had SegFaults when trying to access the K16 API ?
kosta
Yes I just compiled and got a segmentation fault. I was assuming that it was due to a graphics driver issue, because my cgminer (with gpu) does the same thing, while my cgminer-nogpu does not do this when I compile it under Linux Mint 14. How do you get cgminer to compile with no gpu support, but with klondike support and icarus support? I wanna test Klondike compiled version actually runs, but I don't have a Klondike, so I want to compile it for icarus as well. I can't find the flags list anywhere (having a mental moment)... Hi guys, I've got cgminer compiled and it's working quite good on x64 and RPi. API working as well. Things I've done: Cloned repo here https://github.com/bkkcoins/cgminer-klondikeThen in the folder: ./automake.sh ./configure --disable-opencl --disable-adl --enable-klondike make Just one problem - when I connect more than one K16, it wont start, just freezes where it says CGMiner version ... With one it's hashing OK. Anyone had success with this? Thanks.
|
|
|
|
kostagr33k
|
|
September 04, 2013, 01:20:53 AM |
|
Do you get any debug output or any error? How many K16 are you trying to connect and by which method are you connecting them?
kosta
|
|
|
|
ScaryHash
|
|
September 04, 2013, 03:39:42 AM |
|
Yes I just compiled and got a segmentation fault. I was assuming that it was due to a graphics driver issue, because my cgminer (with gpu) does the same thing, while my cgminer-nogpu does not do this when I compile it under Linux Mint 14. How do you get cgminer to compile with no gpu support, but with klondike support and icarus support? I wanna test Klondike compiled version actually runs, but I don't have a Klondike, so I want to compile it for icarus as well. Hi guys, I've got cgminer compiled and it's working quite good on x64 and RPi. API working as well. Things I've done: Cloned repo here https://github.com/bkkcoins/cgminer-klondikeThen in the folder: ./automake.sh ./configure --disable-opencl --disable-adl --enable-klondike make Just one problem - when I connect more than one K16, it wont start, just freezes where it says CGMiner version ... With one it's hashing OK. Anyone had success with this? Thanks. [/quote] Ok Zipiju thanks a lot !!! I used your suggestion (but without the ./automake.sh cuz it was not working) and added the following ./configure --disable-opencl --disable-adl --enable-klondike --enable-icarus make it compiles and runs just fine. I wanted icarus devices to test USB functionality, and I happen to have 3 USB block erupters handy...so... When no USB erupters are plugged in, it does nothing. When I plug in 1 usb erupter directly into the computer, it says "USB init open device failed, err -3, you dont have priviledge to access - AMU device 2:8" Then I plug in the second one, and it detects it and says "USB init open device failed, err -3, you dont have priviledge to access - AMU device 2:9" Then I plug in the 3rd one, and it detects it and says ""USB init open device failed, err -3, you dont have priviledge to access - AMU device 2:10" So, the USB detection is working, that's what I'm guessing anyway. Whatever version of the usb library is working, and it seems to be detecting, at least, it detects Icarus devices. I think that's good news. Weird, so I've created a strange Klondike, Icarus hybrid. My guess is since the usb detection is working, it should detect Klondike's as well.... I'm connected to my pool but I usually have configuration problems with USB Block erupters and CGminer (I use BFG miner under windows to run my USB block erupters)... Gonna work on getting them working Under linux just for kicks. If you have any USB erupters or can borrow one, try it. I am not a Unix expert by any stretch of the imagination...
|
|
|
|
kostagr33k
|
|
September 04, 2013, 03:48:32 AM |
|
Not sure which boards you have but are you running as Root? I thought I read some problem with certain boards that if you did not run as root, or apply their workaround, you could get that error.
IF your not running as root, Try doing so to see if it works. If it does, go search the forums here to find out what the workaround would be, as you should *never* run services like these with root access.
kosta
|
|
|
|
Dunkelheit667
Legendary
Offline
Activity: 1045
Merit: 1157
no degradation
|
|
September 04, 2013, 04:12:13 AM |
|
...If it does, go search the forums here to find out what the workaround would be,...
Here you go.
|
"And the machine keeps pushing time through the cogs, like paste into strings into paste again, and only the machine keeps using time to make time to make time. And when the machine stops, time is an illusion that we created free will." - an unnamed Hybrid
|
|
|
kostagr33k
|
|
September 04, 2013, 04:23:31 AM |
|
I guess I read that on the cgminer README.
Thanks for pointing that out Dunkelheit667
|
|
|
|
terrahash
Member
Offline
Activity: 86
Merit: 10
|
|
September 04, 2013, 04:38:40 AM |
|
It is most likely a hardware bug in the circuit. During our testing we realized that the Dual NOR gates used in the design are too fast, and there needs to be some propagation delay. Using a cheap NOR gate chip from Fry's did the trick. We are still trying to see if this can be fixed in the firmware.
Maybe you may also want to try to use a bigger capacitor for the phase shifter in front of the NOR gate. A circuit should not depend on the propagation delays or fabrication tolerances of logic gates. I also tried to use the internal comparator of the PIC as a NOR gate, which is even better since it has some clock synchronization register. But it has shown that the comparator is not fast enough... Already tried using bigger capacitor. Does not work. The only work around we have found is using a slower gate, so far.
|
|
|
|
ScaryHash
|
|
September 04, 2013, 04:42:02 AM |
|
I guess I read that on the cgminer README.
Thanks for pointing that out Dunkelheit667
You guys are godly ! At least, I think so. Ok so I did: sudo groupadd plugdev (wasn't necessary, plugdev was already installed). then sudo usermod -G plugdev -a `whoami` then sudo cp 01-cgminer.rules /etc/udev/rules.d/ Then rebooted. 3 block erupter USB detected, but it's hashing really slow, like 100 Mh/s each. Doesn't really matter at this point for the speed, I just wanted to see if the Klondike-Icarus hybrid compile would detect and hash using some kind of USB units. I'll try again later with a pure Icarus compile, and see if there is any difference. But, this may be some kind of progress, I hope. Did I mention you are godly? (I'm learning unix on the fly here....)
|
|
|
|
zipiju
Member
Offline
Activity: 93
Merit: 10
|
|
September 04, 2013, 09:16:44 AM |
|
Do you get any debug output or any error? How many K16 are you trying to connect and by which method are you connecting them?
kosta
Nope, even with -D option, no output at all. I'm connecting 2 K16. I just connect them to the usb, see them successfully enumerated in dmesg, then run CGM and it does nothing, just stays at the point where it says CGMiner version 3.3.1. With one it's OK. Also, each board have different serial number.
|
|
|
|
zipiju
Member
Offline
Activity: 93
Merit: 10
|
|
September 04, 2013, 09:24:53 AM Last edit: September 04, 2013, 10:18:51 AM by zipiju |
|
It is most likely a hardware bug in the circuit. During our testing we realized that the Dual NOR gates used in the design are too fast, and there needs to be some propagation delay. Using a cheap NOR gate chip from Fry's did the trick. We are still trying to see if this can be fixed in the firmware.
Maybe you may also want to try to use a bigger capacitor for the phase shifter in front of the NOR gate. A circuit should not depend on the propagation delays or fabrication tolerances of logic gates. I also tried to use the internal comparator of the PIC as a NOR gate, which is even better since it has some clock synchronization register. But it has shown that the comparator is not fast enough... Already tried using bigger capacitor. Does not work. The only work around we have found is using a slower gate, so far. I'm sorry to tell you, but you're wrong. I'm using v0.3.1 board with bigger cap (currently about 260pF) and it's hashing quite well. Without it, the clock signal is not delayed enough - just about 5ns and bad nonces are returned. BTW terrahash, what modifications did you made to the 4 chip firmware to hash with all 16 chips?
|
|
|
|
kano
Legendary
Offline
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
|
|
September 04, 2013, 01:43:04 PM |
|
... 3 block erupter USB detected, but it's hashing really slow, like 100 Mh/s each. ...
Sigh, I spent a reasonable amount of time over more than a month resolving this (and commenting about it in the cgminer thread) It's a libusb bug (ckolivas also recently found another one ... in libusb ... and change the usbutils.c to work around it) The 100MH/s simply means the libusb you are using is no good. It's timeouts don't work You really do need to use current cgminer ... not an old version of it. Or ... the explanation I put in the README before ckolivas finally added the working libusb source to the cgminer source rather than linking against a system installed version. The manual fix (that I also did on Steamboats system just to check that wasn't the cause of problems there) https://github.com/ckolivas/cgminer/commit/d470828fb3681c0ebadea0d7cb0fab1bf465df46#README
|
|
|
|
jml25
Newbie
Offline
Activity: 40
Merit: 0
|
|
September 04, 2013, 02:40:07 PM |
|
Does this mean support for the K16 will make it's way into the 'real' version of cgminer? Please say yes
|
|
|
|
kano
Legendary
Offline
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
|
|
September 04, 2013, 02:42:05 PM |
|
Does this mean support for the K16 will make it's way into the 'real' version of cgminer? Please say yes Pretty soon as long as the GitSyncom fiasco doesn't destroy Klondike
|
|
|
|
|