Sep 09 2016 0

LKETC USB Scrypt Miner

Over a your ago I had bought an USB Scrypt miner via eBay. This miner is able to hash at about 144-270 kH/s, depending on the frequency the device is running at (it has a tiny switch on the end)

LKETC USB Scrypt Miner

This miner requires additional drivers (Silicon Labs CP210x USB to UART Bridge) and also has a customized version of cgminer (LKController.exe). Both are provided on the miner itself, since if also serves as a 8GB pen-drive. This USB miner is easy to use under Windows, but I had never been able to get it to work using a Raspberry Pi. As a result I really never used it since I don’t have a Windows machine running 24/7.

Quite recently I noticed this post on Stack Exchange: I’d like to connect an LKETC USB Scypt Miner to my Raspberry Pi. Help? and several people answered this question. Most notable for me was the answer by wareck’. He/she built a custom version of cgminer with support for this miner. Time to give it another try…

Initial setup and configuration

To try this customized version of cgminer I created a fresh microSD for one of my Raspberry Pi’s.

After the image has been written to the microSD card and the Raspberry Pi has booted up it is advisable to first update/upgrade all of the installed packages. You can do this by running the following commands from the command line

sudo apt-get update
sudo apt-get upgrade

The last command (upgrade) could take a while.

Change hostname ot the Raspberry Pi and the default password for the pi-user. These steps can be completed by using the Raspberry Pi Software Configuration Tool (raspi-config). You can start it by executing the following command

sudo raspi-config

Changing the hostname can be found under 9 Advanced Options’. Next install the ahavi-daemon (might already be installed) so you can connect to the Raspberry Pi via ssh using its hostname instead of its ip-address

sudo apt-get install avahi-daemon

Also install screen so we will be able to run processes via terminal tty instance’, meaning we can disconnect from our ssh session while still keeping processes running and reconnect to these screens from another session. More information can be found at Linux and Unix screen command’.

sudo apt-get install screen

Later we will need to get sources for cgminer from GitHub so the installation of git is required as well

sudo apt-get install git

Reboot the Raspberry Pi and log back in as pi using the new password.

Build the special version of cgminer

To build the special version of cgminer your can follow the instructions described in the document on the GitHub repository for cgminer-lketc’.

First your will have to clone the repository to your Raspberry Pi using the following command

git clone & cd cgminer-lketc.git

After the cloning has finished you can perform the following commands (as described in

sudo apt-get update
sudo apt-get install build-essential autoconf automake libtool pkg-config libcurl4-openssl-dev libudev-dev \
libjansson-dev libncurses5-dev  libudev-dev libjansson-dev
./configure --enable-scrypt --enable-lketc

Testing the miner

Time to hook up a power USB hub to the Raspberry Pi and insert the LKETC USB miner into the hub. As soon as the device is inserted

sudo ./cgminer --scrypt --lketc-clock 280

You will be asked to enter the URL for the pool, a username and a password. You can also directly provide these from the command line like so

sudo ./cgminer --scrypt --lketc-clock 280 -o stratum+tcp:// -u drexore.1 -p x

If all went well you will see something like the following output

 cgminer version 4.3.5-scrypt.2-mod - Started: [2016-08-23 12:12:26]
 (5s):205.6K (1m):205.7K (5m):204.6K (15m):172.9K (avg):203.1Kh/s
 A:5888  R:0  HW:1  WU:210.1/m
 Connected to diff 256 with stratum as user drexore.1
 Block: a1118e19...  Diff:53K  Started: [12:39:47]  Best share: 5.83K
 [U]SB management [P]ool management [S]ettings [D]isplay options [Q]uit
 0: LKE 1:9 : Dragon         280 MHz   | 205.6K / 203.1Kh/s WU:210.1/m
 [2016-08-23 12:12:25] Pool 0 difficulty changed to 16384
 [2016-08-23 12:12:25] Pool 0 difficulty changed to 256
 [2016-08-23 12:12:26] Network diff set to 53K
 [2016-08-23 12:12:26] Work available from pools, resuming.

Launch miner on boot

To start the miner at boot time I have added the following commands to /etc/rc.local

# Autostart cgminer
cd /home/pi/cgminer-lketc
screen -dmS cgminer ./cgminer --scrypt --lketc-clock 280 -o stratum+tcp:// -u drexore.1 -p x

This way the miner is running in a detached screen.

Using the following command you will get a list of detached screens

sudo screen -list

On my Raspberry Pi this gives me the following output

There is a screen on:
    495.cgminer (23/08/16 12:12:23) (Detached)
1 Socket in /var/run/screen/S-root.

To connect to the cgminer screen I can now issue the following command

sudo screen -r 495.cgminer

or shorter (since there is only one named cgminer)

sudo screen -r cgminer

resulting in something like to following (i.e. the standard output from cgminer)

 cgminer version 4.3.5-scrypt.2-mod - Started: [2016-08-23 13:16:52]
 (5s):205.7K (1m):203.5K (5m):202.4K (15m):177.7K (avg):203.1Kh/s
 A:7936  R:0  HW:0  WU:254.9/m
 Connected to diff 256 with stratum as user drexore.1
 Block: 9f7fad3a...  Diff:53K  Started: [13:43:12]  Best share: 15.3K
 [U]SB management [P]ool management [S]ettings [D]isplay options [Q]uit
 0: LKE 1:9 : Dragon         280 MHz   | 205.7K / 203.1Kh/s WU:254.9/m
 [2016-08-23 13:40:23] Accepted 0868f62e Diff 7.79K/256 LKE 0
 [2016-08-23 13:42:01] Accepted 672f61c9 Diff 635/256 LKE 0
 [2016-08-23 13:43:12] New block detected on network before pool notification
 [2016-08-23 13:43:31] Accepted de164438 Diff 295/256 LKE 0
 [2016-08-23 13:44:34] Accepted f276b73a Diff 270/256 LKE 0
 [2016-08-23 13:45:27] Accepted d3a9cf44 Diff 310/256 LKE 0
 [2016-08-23 13:45:39] Accepted 709da11c Diff 582/256 LKE 0
 [2016-08-23 13:46:32] Accepted 51bb47ef Diff 802/256 LKE 0
 [2016-08-23 13:46:58] Accepted d53bc46b Diff 307/256 LKE 0

To leave this screen, but leave the process itself running, you need to press Ctrl+A and then press D (for detach).

Happy mining

Previous post
Remote Desktop Server - Windows 10 Home Edition As mentioned in my article on the NEXXT PC Stick Windows 10 Home edition has no support for the Remote Desktop Server, only the client. So
Next post
Rikomagic troubles After roughly 3 weeks having the Rikomagic MK06 running it started to act ‘weird’ for lack of a better term. The device was experiencing a number of
This blog is powered by Blot