First I want to say thank you to miaviator for the awesome guide!!!
Secondly... Please help! I'm about out of options with this gridseed miner, and I'm hoping that someone else has seen this problem and can help me out...
Background: I have a single 5 chip miner that I'm trying get working in dual mode (and yes I realize that most people don't use it in dual mode, but I want it to do both because it's supposed to do BOTH). I've been using Linux since the 90's, so I know what I'm doing there, and that's what I've got.
I've followed the steps from this guide multiple times on multiple different workstations running Ubuntu 13 & 12, with about 50% success (50% meaning I can get it to mine scrypt only). I have no issues running cpuminer, or bfgminer, or even cgminer for scrypt mining; but the SHA mining functionality with cgminer just won't work. So after beating my head against the wall for about 4 hours yesterday, I decided to start playing with the gridseed specific arguments. Specifically, I changed the hotplug=0 to hotplug=1, and was then able to start cgminer in SHA mode, plug in the usb to the miner, and cgminer recognized the device and loaded it. Mind you it wouldn't submit shares, even while it was sitting there hashing, then I realized I forgot the 12v power, so I turned it on, and it gave me an error. So I played around with that for a while trying to figure out a way to start it, and after another hour or so I managed to get it mining in dual mode by connecting the miner while the power was off (go figure), then turned the power on, and it started submitting shares (steps I had already done multiple times). At any rate, once it was running I left it alone for about 12 hours while it hashed SHA/scrypt until it just stopped. After it stopped, I rebooted my system, and attempted the same process to get it working again. Apparently though, that was just some kind of fluke, because there is NO getting this thing to work properly. It will hash, but it won't submit shares for SHA or scrypt while trying to mine in dual mode. When I try to hotplug the miner while the power is connected, cgminer just croaks and gives me the following errors:
[2014-03-13 18:18:04] Pool 0 difficulty changed to 16
[2014-03-13 18:19:35] GSD 1 GetResults usb read err:(-4) LIBUSB_ERROR_NO_DEVICE
[2014-03-13 18:19:35] Device 1 is going to shutdown
[2014-03-13 18:19:40] GridSeed options: 'baud=115200,freq=800,chips=5,modules=1
,usefifo=0,btc=16'
[2014-03-13 18:19:40] System reseting
[2014-03-13 18:19:40] GSD 0 SendWork usb write err:(-1) LIBUSB_ERROR_IO
[2014-03-13 18:19:43] GSD 0 attempted reset got err:(-5) LIBUSB_ERROR_NOT_FOUND
[2014-03-13 18:19:43] FAIL: USB get_lock not found (2:108)
[2014-03-13 18:19:43] FAIL: USB remove not already in use (2:108)
If I start cgminer, and then plug in the usb without the power on to the miner, it appears to connect, loads the driver properly, and even starts to hash, but it will never submit shares.
It seems to me that it should work when I plug it in with the power turned on, but from the errors it's giving, I'm thinking there is something wrong with the driver or firmware (especially since it's happening on 3 different computers the exact same way)... It's also quite possible that I didn't compile something correctly, but I even built cgminer on a fresh vanilla install of Ubuntu 13 (following the steps from the guide exactly). The only part of the guide that's off is that there is no autogen.sh file for cgminer when you clone the gridseed/usb-miner tree from git, so maybe there's something there? Just the fact that it ran for 12 hours with no problems makes me think there's something else though (since it obviously functions on some level).
Ideally, I shouldn't have to hotplug this thing to get it working, and I should be able to mine both SHA and scrypt if that's what it's built for. And while I've seen this question asked multiple times on multiple threads, there's never an answer, but here goes anyway... Is there any new firmware we could be flashing?
Oh yeah, and if anyone has any ideas about the errors I'm getting with this thing, I would REALLY appreciate the assistance!
Edit: Sorry to make this longer, but I wanted to add the errors that pop up while running "make" for cgminer. I'll include a few of them, but there's too many to add them all here.. They are all related to gridseed, so maybe someone could let me know if it's normal?
driver-gridseed.c: In function ‘gc3355_write_data’:
driver-gridseed.c:323:2: warning: pointer targets in passing argument 4 of ‘_usb_write’ differ in signedness [-Wpointer-sign]
err = usb_write(gridseed, data, size, &wrote, C_SENDWORK);
^
In file included from miner.h:123:0,
from driver-gridseed.c:23:
usbutils.h:400:5: note: expected ‘char *’ but argument is of type ‘unsigned char *’
int _usb_write(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t bufsiz, int *processed, int timeout, enum usb_cmds);
^
driver-gridseed.c: In function ‘gc3355_get_data’:
driver-gridseed.c:338:3: warning: pointer targets in passing argument 4 of ‘_usb_read’ differ in signedness [-Wpointer-sign]
err = usb_read_once(gridseed, p, readcount, &amount, C_GETRESULTS);
^
In file included from miner.h:123:0,
from driver-gridseed.c:23:
usbutils.h:399:5: note: expected ‘char *’ but argument is of type ‘unsigned char *’
int _usb_read(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t bufsiz, int *processed, int timeout, const char *end, enum usb_cmds cmd, bool readonce, bool cancellable);
^
driver-gridseed.c: In function ‘gc3355_send_cmds_bin’:
driver-gridseed.c:387:3: warning: pointer targets in passing argument 2 of ‘gc3355_write_data’ differ in signedness [-Wpointer-sign]
gc3355_write_data(gridseed, (char *)cmds
, size);
^
driver-gridseed.c:301:12: note: expected ‘unsigned char *’ but argument is of type ‘char *’
static int gc3355_write_data(struct cgpu_info *gridseed, unsigned char *data, int size)
^
driver-gridseed.c: In function ‘gc3355_set_core_freq’:
driver-gridseed.c:412:8: warning: unused variable ‘p’ [-Wunused-variable]
char *p;
^
driver-gridseed.c: In function ‘gc3355_set_init_nonce’:
driver-gridseed.c:455:12: warning: unused variable ‘chips’ [-Wunused-variable]
int i, chips;
^
driver-gridseed.c: In function ‘gc3355_init’:
driver-gridseed.c:493:2: warning: pointer targets in passing argument 4 of ‘_usb_read’ differ in signedness [-Wpointer-sign]
usb_read_timeout(gridseed, buf, sizeof(buf), &amount, 10, C_GETRESULTS);
^
In file included from miner.h:123:0,
from driver-gridseed.c:23:
usbutils.h:399:5: note: expected ‘char *’ but argument is of type ‘unsigned char *’
int _usb_read(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t bufsiz, int *processed, int timeout, const char *end, enum usb_cmds cmd, bool readonce, bool cancellable);
^
driver-gridseed.c: In function ‘get_options’:
driver-gridseed.c:518:5: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
ss = strdup(options);
^
driver-gridseed.c:520:2: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
end = p + strlen(p);
^
driver-gridseed.c: In function ‘gridseed_pl2303_init’:
driver-gridseed.c:681:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
driver-gridseed.c:689:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
driver-gridseed.c:695:2: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
driver-gridseed.c: In function ‘gridseed_detect_one’:
driver-gridseed.c:813:4: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
p = bin2hex(rbuf+GRIDSEED_READ_SIZE-4, 4);
^
driver-gridseed.c:741:7: warning: variable ‘configured’ set but not used [-Wunused-but-set-variable]
bool configured;
^
driver-gridseed.c:740:11: warning: unused variable ‘wrote’ [-Wunused-variable]
int err, wrote;
^