Skip to content

Commit 9f9dd71

Browse files
authored
Update README.md
1 parent d92b8e9 commit 9f9dd71

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,77 @@ This repository contains the MicroRNG Software Kit and utilities for using the M
1313
* `mcrng.cpp` - utility for downloading random bytes generated by MicroRNG device over SPI interface.
1414
* `sample.cpp` - sample C++ program that demonstrates how to use the API for communicating with the MicroRNG device over SPI interface.
1515

16+
## Getting Started
17+
18+
To build and run MicroRNG utilities you will need a sudo access permissions to your Linux instance and an Internet connection.
19+
20+
### Dependencies
21+
22+
The following dependencies are required to successfully build utilities:
23+
24+
* C++ compiler
25+
* git
26+
* make
27+
28+
C++ compiler can be installed on Ubuntu with the following command:
29+
```
30+
sudo apt-get install g++
31+
```
32+
33+
Git development dependency can be installed on Ubuntu with the following command:
34+
```
35+
sudo apt-get install git
36+
```
37+
38+
Make development dependency can be installed on Ubuntu with the following command:
39+
```
40+
sudo apt-get install make
41+
```
42+
43+
### Installing
44+
45+
* Download the project:
46+
```
47+
git clone https://github.com/tectrolabs/microrng.git
48+
```
49+
50+
* Build utilities:
51+
```
52+
cd microrng/mcrng
53+
make
54+
```
55+
* Install the necessary executables:
56+
```
57+
sudo make install
58+
```
59+
### Verify MicroRNG is working
60+
61+
* Connect MicroRNG device to the target board through provided SPI interface.
62+
* Verify device connectivity with the following command (you may need to use specific device path):
63+
```
64+
sudo mcdiag /dev/spidev0.0
65+
```
66+
* You may get an output similar to the following:
67+
68+
```
69+
~/microrng/mcrng$ sudo mcdiag /dev/spidev0.0
70+
-------------------------------------------------------------------
71+
--- TectroLabs - mcdiag - MicroRNG diagnostics utility Ver 1.0 ---
72+
--- Use with RPI 3+ or other Linux-based single-board computers ---
73+
-------------------------------------------------------------------
74+
Opening device /dev/spidev0.0 ----------------------------- Success
75+
Identifying device /dev/spidev0.0 -------------- MicroRNG detected
76+
Identifying maximum SPI clock frequency --------------- 31000000 Hz
77+
New SPI clock frequency ------------------------------- 31000000 Hz
78+
Retrieving 32000 random bytes ----------------------------- Success
79+
Retrieving 32000 RAW random bytes ------------------------- Success
80+
Retrieving 32000 random bytes ----------------------------- Success
81+
Shutting down RNG ----------------------------------------- Success
82+
Starting RNG up ------------------------------------------- Success
83+
Computing SPI transfer speed ---------------------------- 497 kbps
84+
Validating MicroRNG internal status ---------------------- Healthy
85+
```
86+
1687
## Authors
1788

1889
Andrian Belinski

0 commit comments

Comments
 (0)