Using an XU4 as a NavCoin Stakebox

Moderators: mdrjr, odroid

Using an XU4 as a NavCoin Stakebox

Unread postby BuckoNZ » Tue Aug 07, 2018 7:52 am

Using An Odroid XU4 For A NavCoin Stakebox – NavPi Replacement.

The Odroid XU4 SBC from HardKernel packs quite a punch compared with many other SBC’s on the market. And as HardKernel has committed to continue making the XU4 until 2020 (probably longer) it’s going to be around for a while.
While the NavCoin NavPi stakebox – built on the Raspberry Pi 3B platform – is a great concept, many users are struggling to get the device to remain stable over time, due to the lack of native resources.
I am not a developer. I am not a linux guru. In fact, I have no idea what I’m doing, so take that into consideration when you are following these steps.

We used the XU4Q (with the heatsink instead of the fan) to minimise power use (and cost) and noise.


1) Install a fresh full XU4 Ubuntu MATE image onto your eMMC storage card, using the USB connector. The image used here was the one dated 20180501 – this will install Ubuntu 18.04 LTS.

2) When first logging in, configure the usual look and feel, network settings and date/time, etc..

3) There are a number of build prerequisites that are required, so we need to install those:
$ sudo apt-get install build-essential libcurl3-dev libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libqrencode-dev

4) We also need all the Boost development packages:
$ sudo apt-get install libboost-all-dev

5) Some of the processing we will need to do is quite resource intensive, so we should grab ‘Zram’ as well:
$ sudo apt install zram-config

6) Let’s grab the ‘Synaptic Package Manager’ as well:
$ sudo apt-get install synaptic

7) We will also install ‘Git’ as well:
$ sudo apt install git

8) Lets reboot the system so ‘Zram’ takes effect:
$ sudo reboot

9) On restart, we can check to see is ‘Zram’ applied by using:
$ free -m
You should see both a Mem: and a Swap: display.

10) BerkeleyDB is also required for wallet functionality, so we need to grab that:
$ sudo add-apt-repository ppa:bitcoin/bitcoin
$ sudo apt-get update
$ sudo apt-get install libdb4.8-dev libdb4.8++-dev

11) And we need to grab ‘NavCoin’ itself:
$ git clone

12) Installing ‘miniupnpc’ is also a good idea from a networking perspective:
$ sudo apt-get install miniupnpc

13) Lets make sure everything to this point is up to date:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo reboot

14) Move to the new ‘navcoin-core’ folder that is now on your XU4:
cd ~/navcoin-core

15) Lets now install NavCoin:
$ sudo ./
$ sudo ./configure CFLAGS="-O2 -mtune=cortex-a15.cortex-a7 -mfpu=neon" CXXFLAGS="-O2 -mtune=cortex-a15.cortex-a7 -mfpu=neon" --enable-hardening --without-gui
$ sudo make
$ sudo make install

16) The above process will take some time to complete. Once complete, lets reboot the XU4:
$ sudo reboot

17) Once the reboot is complete, open a new Terminal window, move to the NavCoin folder and start the NavCoin daemon
$ cd ~/navcoin-core
$ sudo navcoind -staking

18) Please wait a good 15 minutes before doing anything else. After about 15 minutes, open a second Terminal window, move to the NavCoin folder and utilize the NavCoin CLI tool – the command provided below will give you a list of commands you can use in conjunction with ‘navcoin-cli’.:
$ cd ~/navcoin-core
$ sudo navcoin-cli help

19) Using the web browser, go to the following URL to check what block the NavCoin blockchain is currently up too – take note of the block number at the very top of the web page:

20) Go back to the second Terminal window and use the following command to see how many blocks the XU4 has currently downloaded:
$ sudo navcoin-cli getblockcount

21) As at the time of writing, depending on your internet connection, you are looking at around 12 hours, for your instance of NavCoin to catchup with the blockchain. And until it has, you should not try and do anything with your NavCoin wallet.
Last edited by BuckoNZ on Mon Aug 13, 2018 7:17 am, edited 1 time in total.
Posts: 8
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english

Re: Using an XU4 as a NavCoin Stakebox

Unread postby BuckoNZ » Tue Aug 07, 2018 10:30 am

** Hoping to provide more instructions soon, to provide GUI functionality to the above. **
Posts: 8
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english

Re: Using an XU4 as a NavCoin Stakebox

Unread postby BuckoNZ » Wed Aug 08, 2018 8:28 am

Some Additional Information

Importing Wallet
Assuming you already have a NavCoin wallet - I tried using the importwallet CLI command and this didn't work for me. I had too:
- Reboot the XU4
- Move into the /home/odroid/.navcoin4 folder.
- Using the MV command, change the name of wallet.dat to something else - I think I used wallet_old.dat .
- Using the CP command, I copied my wallet.dat file from my previous wallet into the .navcoin4 folder.
- Started the navcoind process.

Checking Your Wallet & Balance
Once I started the navcoind process, again I waited the 15 minutes for it to settle in and used the listaddressgroupings CLI command, which returned my NavCoin wallet address and my balance.

Starting To Stake
Using the -staking flag when starting the navcoind process, starts the NavCoin core with an intent to stake your coins. However just like you need to do on your Windows or NavPi wallet, you need to "unlock" your wallet, before staking commences.
- Using the getstakinginfo CLI command, you will see that Enabled returns TRUE and Staking returns FALSE. So as mentioned above, the NavCoin core is expecting you to stake and is ready to do so, but it's not currently staking.
- To unlock your encrypted wallet to begin staking, you need to use the following CLI command: walletpassphrase "password" 9999999 true
- However if your password contains special characters (like ! etc., as it should), you need to use single quotes (') around your password instead of double quotes ("). So the command would look like: walletpassphrase 'password' 9999999 true
- If you run the getstakinginfo CLI command again, you will then see that both Enabled and Staking now return TRUE. You are staking!
The value of 9999999 (that is seven 9's) should keep your XU4 staking for approx. 110 days, so if you factor in a restart every quarter (3 months) and repeat of the above process, it will ensure you keep staking.

Backing Up Your Wallet
Unlike the importwallet CLI command that didn't work for me, the backupwallet CLI command appeared to work fine.
The full command is: backupwallet "destination".
For my test, I sent the backup dat file to the Desktop, so the syntax I used was: backupwallet "/home/odroid/Desktop/wallet_YYYYMMDD.dat" .

Sending Nav
In order to send Nav from your wallet on the XU4, you first need to unlock it for the purposes of a transaction. The command is very similar to the one used to unlock your wallet for Staking except (a) you don't want a significant timeout value associated with it and (b) you do not use the true flag at the end.
The CLI command to use is: walletpassphrase "password" 300.
The timeout value of 300 will give you 5 minutes in order to perform the command to send Nav to another wallet.
The CLI command to send Nav is: sendtoaddress "walletaddress" value
Once you're done, remember to use the wallet unlock command specifically for Staking to ensure you start Staking again.
Posts: 8
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english

Re: Using an XU4 as a NavCoin Stakebox

Unread postby BuckoNZ » Sat Aug 11, 2018 3:09 pm

Confirming the stability of NavCoin on the XU4

Before I completely abdanoned my NavPi permanetly, I wanted to ensure my instance of NavCoin that I built on the XU4 was "working as intended". As a result, I wanted to complete the following key tests to ensure that was the case

Test 1 - Receicing Nav from an External Party
- I purcahsed NZ$100 worth of Nav from an exchange and configured the order, so that the coins went directly into my wallet on the XU4.
- I eventually received an email from the exchange confirming that the order had been completed.
- On checking the balance of the wallet on the XU4, it had increased by the order amount. Checked by using the getwalletinfo CLI command.
[Test 1 Passed]

Test 2 - Sending Nav from wallet on XU4 to an External Party
- Using the sendtoaddress CLI command, I sent 25 Nav to a wallet address on an external platform.
- Checking the balance of the wallet on the external platform, approximnately 15 minutes later, it's balance had increase by 25 Nav. And the balance of the wallet on the XU4 had decreased by 25 Nav.
- As a double check, I then sent 24.5 Nav from the external platform to the wallet on the XU4.
- About 15 miniutes later, using the getwalletinfo CLI command, I confirmed the balance of the wallet on the XU4 has increased by the 24.5 Nav .
[Test 2 Passed]

Test 3 - Receiving Stake Reward to the wallet on XU4
- Using the getstakingreport CLI command, it was determined that a Staking Reward of about 3.2 Nav had been received a couple of days prior.
- I confirmed that the balance of the wallet on the XU4 had increased by the same amount, sing the getwalletinfo CLI command.
[Test 3 Passed]

Test 4 - Restoring wallet on XU4 onto External Platform
- After revecing the Stake Reward, mentioned above, the wallet on the XU4 was backed up, used the backupwallet CLI command.
- The resulting file was captured and moved to an external platform.
- The existing wallet.dat file on the external platform was deleted and replaced with the wallet.dat from the wallet on the XU4.
- The external platform was rebooted and the XU4 was shutdown.
- On reboot, the wallet information on the external platform was checked and it was showed a wallet address and wallet balance associated with the wallet on the XU4. This would indicate the restoration was successful.
[Test 4 Passed]

With all four of these tests completing successfully, I am happy the the NavCoin Wallet and Core is working on the Odroid XU4 as expected. And I will be permanently abandoning the NavPi as my staking wallet solution.
Posts: 8
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english

Re: Using an XU4 as a NavCoin Stakebox

Unread postby rooted » Sat Aug 11, 2018 3:57 pm

Thanks for taking us along for the ride and providing documentation.
User avatar
Posts: 5317
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
HiFi Shield 2
Smart Power (original)

Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest