Bitcoin Forum
November 06, 2024, 08:49:59 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Raspian & cgminer  (Read 1808 times)
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 05, 2016, 12:47:17 PM
Last edit: June 05, 2016, 09:24:59 PM by gt_addict
 #1

Hi guys,

Just wondering if there is any way to get a cgminer icon on the desktop of raspian or at least a .bat file so you can start cgminer without having to putty in.

Or can you have a terminal open on the pi desktop with it running so I can just switch the source input on my tv and see the stats?

Also if I close the putty session from my laptop, cgminer is still running on the pi. How do I get back to see the cgminer stats through putty as when I open it up again it goes back to the login page.

Thanks.

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
June 05, 2016, 10:02:06 PM
 #2

Depends on who's RPi setup you use.

But I'd guess that cgminer is running automatically in a screen and you'd open a terminal window and type "screen -rd" to 'watch' it.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Jake36
Sr. Member
****
Offline Offline

Activity: 331
Merit: 250


View Profile
June 06, 2016, 04:07:30 AM
 #3

Hi guys,

Just wondering if there is any way to get a cgminer icon on the desktop of raspian or at least a .bat file so you can start cgminer without having to putty in.

Or can you have a terminal open on the pi desktop with it running so I can just switch the source input on my tv and see the stats?

Also if I close the putty session from my laptop, cgminer is still running on the pi. How do I get back to see the cgminer stats through putty as when I open it up again it goes back to the login page.

Thanks.

First get screen, sudo apt-get install screen (I don't remember, but don't think screen is installed in raspbian).

Then edit the /etc/rc.local file and add before exit 0 line: (this will start cgminer whenever the pi boots/reboots.)
(going from the gekko support thread, you want to run gekko and rbox)
cd /home/pi/cgminer-gekko-rev2 (pi = what ever user-name you set up)
screen -dmS cgminer sudo ./cgminer -o yourpoolinfo -u userinfo --compac-freq XXX (and your rbox stuff (if both will run on 1 instance of cgminer)
(if both will not run on 1 cgminer add second instance)
screen -dmS cgminer sudo ./cgminer -o yourpoolinfo -u userinfo --(rbox comands)

Then in putty or a terminal window on desktop
sudo screen -x (if it's just one instance of cgminer, it will show).

If you have to do 2 instances of cgminer, with sudo cgminer -x, you'll get 2 lines like 324.cgminer, 435.cgminer. Then just sudo screen -r 324, control a, then d will disconnect from that screen, sudo screen -r 435 to open the other.

Better yet just open 2 terminal windows or 2 putty's and sudo screen -r 435 in 1, sudo screen 324 in 1, and look at both).

Like Kano said, it all depends on setup. There's probably dozens of ways to do it.
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 06, 2016, 06:33:25 PM
Last edit: June 06, 2016, 06:44:24 PM by gt_addict
 #4

I have used a combination of these two step by step guides:-

http://www.raspberrypirobot.com/how-to-install-and-run-cgminer-3-9-0-on-raspberrypi/

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046

As I couldn't do the "git clone" part from the second link for the gekko version of cgminer, so had to use the wget part of the first link to download it and then install it.

Its running now, but due to a connection problem the putty screen closed. when I go back into putty I cant view cgminer. I have tried the screen -rd and screen -x.

I haven't managed to attempt the screen -dms settings bit yet as ive just managed to get it running again after reinstalling raspbian for a fresh start at things.

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 06, 2016, 06:49:14 PM
 #5

Well it was working. Its just all stopped saying:-

[2016-06-06 18:46:44.199] Gekko detect (1:10) failed to initialise (incorrect d
evice?)
 [2016-06-06 18:46:44.249] USB init, open device failed, err -3, you don't have
privilege to access - GEK device 1:7
 [2016-06-06 18:46:44.250] See README file included for help
 [2016-06-06 18:46:44.250] Gekko detect (1:7) failed to initialise (incorrect de
vice?)
 [2016-06-06 18:46:44.250] No devices detected!
 [2016-06-06 18:46:44.250] Waiting for USB hotplug devices or press q to quit
 [2016-06-06 18:46:44.251] Need to specify at least one pool server.
Input server details.
URL:
Invalid input
 [2016-06-06 18:46:59.557] Pool setup failed


But it was running fine. Heres the details I used:-

sudo ./cgminer -o eu1.bitminter.com:3333  -u -p x -o stratum+tcp://de.ckpool.org:3333  -u 1KtSAhMTrkD5chmxWp8wWwuEJsAssQXZgK_gekko -p x --compac-freq 225 --rock-freq 220

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
Jake36
Sr. Member
****
Offline Offline

Activity: 331
Merit: 250


View Profile
June 06, 2016, 11:03:25 PM
 #6

Well it was working. Its just all stopped saying:-

[2016-06-06 18:46:44.199] Gekko detect (1:10) failed to initialise (incorrect d
evice?)
 [2016-06-06 18:46:44.249] USB init, open device failed, err -3, you don't have
privilege to access - GEK device 1:7
 [2016-06-06 18:46:44.250] See README file included for help
 [2016-06-06 18:46:44.250] Gekko detect (1:7) failed to initialise (incorrect de
vice?)
 [2016-06-06 18:46:44.250] No devices detected!
 [2016-06-06 18:46:44.250] Waiting for USB hotplug devices or press q to quit
 [2016-06-06 18:46:44.251] Need to specify at least one pool server.
Input server details.
URL:
Invalid input
 [2016-06-06 18:46:59.557] Pool setup failed


But it was running fine. Heres the details I used:-

sudo ./cgminer -o eu1.bitminter.com:3333  -u -p x -o stratum+tcp://de.ckpool.org:3333  -u 1KtSAhMTrkD5chmxWp8wWwuEJsAssQXZgK_gekko -p x --compac-freq 225 --rock-freq 220

Might be because of no user name on bitminter pool?

But then with the no privilege to access error, did you sudo cp 01-cgminer.rules /etc/udev/rules.d/ (from within the cgminer_gekko dir) and sudo usermod -G plugdev -a whoami (whoami = your user name you setup on the pi) after you built/made cgminer? Didn't see those steps from either of the 2 links above, unless I over looked them.
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 07, 2016, 05:26:47 AM
 #7

Sorry I did have a username I just took it out for a bit of security but now I see it was a bit pointless lol

So from what you have seen an I doing it right? Also I still can't get back to look at cgminer. Screen works on there as I typed "screen -list" and it gave me four. One attached and three detached but I could not look at the attached one, only the detached ones. Couldn't close any of them down either.

As you can tell I'm a bit out of my depth here. I just want cgminer to run my rboxs, not switch off and be able to check on it every so often  Embarrassed

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
Jake36
Sr. Member
****
Offline Offline

Activity: 331
Merit: 250


View Profile
June 07, 2016, 01:57:09 PM
 #8

Sorry I did have a username I just took it out for a bit of security but now I see it was a bit pointless lol

So from what you have seen an I doing it right? Also I still can't get back to look at cgminer. Screen works on there as I typed "screen -list" and it gave me four. One attached and three detached but I could not look at the attached one, only the detached ones. Couldn't close any of them down either.

As you can tell I'm a bit out of my depth here. I just want cgminer to run my rboxs, not switch off and be able to check on it every so often  Embarrassed

I'm still learning screen myself, so not to helpful.

Try screen -d -r <name> (what ever screen -list says is attached) should detach it and then reattach to it.

When your looking at/attached to a screen, hit "ctrl-a" then "d" to detach from that screen.

Lot's of other help http://aperiodic.net/screen/start
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 07, 2016, 06:48:20 PM
 #9

Right another little update.

I followed this link and its directions:-

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046

I omitted the bitmaintech cgminer for CK's real version (not the gecko version either). Also having thought about the fact that my tv went blank and it almost coincided with when cgminer was stopping I followed another raspi forum post about adding a screensaver "sudo apt-get install xscreensaver" from which it adds a menu option on the gui to change or disable the screensaver/blanking. So far after 30mins its still running *crosses fingers*.

All I need to know now is how to get back in and change the freq if I want to. Do I just go back into "sudo nano /etc/rc.local" and change the settings?

Thank you for the advice and support by the way. I would've lost my patience with it long before now if I hadn't been on this forum and been able to get help  Grin

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
Jake36
Sr. Member
****
Offline Offline

Activity: 331
Merit: 250


View Profile
June 07, 2016, 10:44:05 PM
 #10

Right another little update.

I followed this link and its directions:-

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046

I omitted the bitmaintech cgminer for CK's real version (not the gecko version either). Also having thought about the fact that my tv went blank and it almost coincided with when cgminer was stopping I followed another raspi forum post about adding a screensaver "sudo apt-get install xscreensaver" from which it adds a menu option on the gui to change or disable the screensaver/blanking. So far after 30mins its still running *crosses fingers*.

All I need to know now is how to get back in and change the freq if I want to. Do I just go back into "sudo nano /etc/rc.local" and change the settings?

Thank you for the advice and support by the way. I would've lost my patience with it long before now if I hadn't been on this forum and been able to get help  Grin

Yes, just edit the /etc/rc.local file, but the change would need a reboot to take affect.
toptek
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


View Profile
June 08, 2016, 01:36:44 AM
 #11

if you don't have it like thy said you for sure you need screen https://www.gnu.org/software/screen/, i didn't read the post fully this time but screen is a must have to do what you want to.  

For security, your account has been locked. Email acctcomp15@theymos.e4ward.com
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 08, 2016, 04:33:37 PM
 #12

Toptek, yea the raspi 3 already has it as I tried to add it and it said it was already there.

Jake36, cheers for that gem of info. This now means I can tinker with the settings to my hearts desire lol

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 11, 2016, 03:10:42 PM
 #13

Ok so things are running etc and all going well so now I'm wondering if I can get the screen with cgminer in to appear by itself and at a certain size. Does anyone know? I've been looking but unsure where to put the commands for the window size. As for the auto appearing after booting I have no idea.

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
toptek
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


View Profile
June 11, 2016, 05:51:58 PM
 #14

Ok so things are running etc and all going well so now I'm wondering if I can get the screen with cgminer in to appear by itself and at a certain size. Does anyone know? I've been looking but unsure where to put the commands for the window size. As for the auto appearing after booting I have no idea.

you can but i don't know how to  but i saw some place for screen were it says or tells you how to exactly

Misc
redraw window    C-a C-l
enter copy mode    C-a [ or C-a <esc> (also used for viewing scrollback buffer)
paste    C-a ]
monitor window for activity    C-a M
monitor window for silence    C-a _
enter digraph (for producing non-ASCII characters)    C-a C-v
lock (password protect) display    C-a x
enter screen command    C-a :
enable logging in the screen session    C-a H
getting out of the screen session    exit  



has something to do with redrawing  

start here again Smiley .

http://aperiodic.net/screen/start


For security, your account has been locked. Email acctcomp15@theymos.e4ward.com
gt_addict (OP)
Hero Member
*****
Offline Offline

Activity: 2534
Merit: 623


View Profile
June 11, 2016, 06:36:47 PM
 #15

Thanks toptek. I've read through most of that already and still can't get my head round it  Cheesy

I'm trying to find what I need to put in the etc/rc.local file along with "screen -dmS "

**SUPPORT SIDEHACK** Miner Development Donations to:  1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr

Donations/Tips to:-   1GTADDicTXD1uachKKgW24DZDxDGhSMdRa

Join Bitconnect: https://bitconnect.co/?ref=gtaddict
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!