Installation - tomyummmm/Gen2-UHF-RFID-Reader GitHub Wiki
This script has been modified and only supports Ubuntu 18.04 / 20.04 LTS. Ubuntu versions below 18.04 LTS and other linux distros are not supported due to deprecation of Python 2.7, qt4 when upgrading to GNU Radio 3.8.x.
The build-script will require approximately 16GB of disk space in order to download, build and install all packages. If only gr-rfid is required, follow Step 1 and 2a.
The whole process may take up to two hours to complete, depending on the capabilities of your system. A faster CPU with more cores and threads will be quicker to compile. AMD Ryzen 5 1600 -j11 took ~45 minutes to complete, Intel i5-8250U -j7 took ~1 hour 6 minutes to complete, Intel i5-3230m -j3 took ~1 hour 30 minutes to complete.
- Log4cpp is installed on Ubuntu 20.04 LTS, Ubuntu 18.04 requires manaual installation here (http://log4cpp.sourceforge.net/)
- Using build-script will automatically fetch, build and install the following:
| Package | Branch |
|---|---|
| GNU Radio | maint-3.8 |
| UHD | 3.15 LTS |
| rtl-sdr | master |
| gr-osmosdr | gr3.8 |
| gr-iqbal | gr3.8 |
| hackrf | master |
| bladeRF | master |
| airspyone_host | master |
| SoapySDR | master |
| LimeSuite | stable |
| gr-limesdr | gr-3.8 |
- Grant permissions
chmod a+x ./build-script- Execute with the following flags to install everything, refer to Usage below for more details.
./build-script -ja- 2a. Execute with the following flag and function to install only G2RFID, requires GNU Radio 3.8 installed.
./build-script -ja G2RFID- Restart PC for mod_groups to take effect
The function setenv does the following automatically:
- Add PYTHONPATH to ~/.bashrc and ~/.profile for terminal and graphical environments
- Ubuntu 20.04
echo 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages:$PYTHONPATH' >> ~/.bashrcecho 'export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages:$PYTHONPATH' >> ~/.profile- Ubuntu 18.04
echo 'export PYTHONPATH=/usr/local/lib/python3.6/dist-packages:/usr/local/lib/python3.6/site-packages:$PYTHONPATH' >> ~/.bashrcecho 'export PYTHONPATH=/usr/local/lib/python3.6/dist-packages:/usr/local/lib/python3.6/site-packages:$PYTHONPATH' >> ~/.profile- Add LD Library to ~/.bashrc and ~/.profile
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrcecho 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.profile- Source ~/.bashrc and ~/.profile
source ~/.bashrcsource ~/.profilebuild-script [--help|-h] [-v|--verbose] [-jN] [-ja] [-l|--logfile logfile ] [-u|--users ulist] funcs
| Flags | Description |
|---|---|
| -v/--verbose | Turn on verbose logging to stdout |
| -jN | Have make use N concurrent jobs |
| -ja | Have make use Max - 1 concurrent jobs with auto setting of N (based on number of cpu cores on build system) |
| -u/--users ul | Add comma-separated users to 'usrp' group in addition to calling user ( $USER ) |
| -n | Dry-run for uninstallation only |
| -l/--logfile lf | Log messages to 'lf' |
| -ut | Set tag for UHD checkout to |
| -ucf | Set UHD CMake flags to |
| -gt | Set tag for Gnu Radio checkout to |
| -gcf | Set Gnu Radio CMake flags to |
| -e/--extras | Add an item to "extras" to be built after Gnu Radio/UHD/gs-osmosdr |
| Available funcs | Description |
|---|---|
| all | Do all functions (default) |
| prereqs | Install prerequisites |
| gitfetch | Use GIT to fetch all packages |
| uhd_build | Build only UHD |
| firmware | Fetch firmware/FPGA |
| gnuradio_build | Build only GNU Radio |
| rtl_build | Build rtl-sdr + gr-osmosdr + gr-iqbal + hackrf + bladeRF + airspyone_host |
| SoapySDR | Build only SoapySDR |
| LimeSuite | Build only LimeSuite |
| gr-limesdr | Build only gr-limesdr |
| G2RFID | Build Gen2 UHF RFID Reader |
| mod_groups | Modify the /etc/groups and add user to group 'usrp' |
| mod_udev | Add UDEV rule for USRP1 |
| mod_sysctl | Modify SYSCTL for larger net buffers |
| pythonpath | Print out PYTHONPATH |
| python_packages | Install Python3 required packages |
| setenv | Set environment variables for terminal and graphical GNU Radio Companion |
| uninstall | Uninstall all packages, remove all downloaded packages and build files |
- Check PYTHONPATH and LD_LIBRARY_PATH
> echo $PYTHONPATH
/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages:/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages:
> echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/local/lib:- Check SoapySDRUtil
> SoapySDRUtil --info
######################################################
## Soapy SDR -- the SDR abstraction library ##
######################################################
Lib Version: v0.8.1-g1cf5a539
API Version: v0.8.0
ABI Version: v0.8
Install root: /usr/local
Search path: /usr/local/lib/SoapySDR/modules0.8
Module found: /usr/local/lib/SoapySDR/modules0.8/libLMS7Support.so (20.10.0-1480bfea)
Available factories... lime
Available converters...
- CF32 -> [CF32, CS16, CS8, CU16, CU8]
- CS16 -> [CF32, CS16, CS8, CU16, CU8]
- CS32 -> [CS32]
- CS8 -> [CF32, CS16, CS8, CU16, CU8]
- CU16 -> [CF32, CS16, CS8]
- CU8 -> [CF32, CS16, CS8]
- CU8 -> [CF32, CS16, CS8]
- F32 -> [F32, S16, S8, U16, U8]
- S16 -> [F32, S16, S8, U16, U8]
- S32 -> [S32]
- S8 -> [F32, S16, S8, U16, U8]
- U16 -> [F32, S16, S8]
- U8 -> [F32, S16, S8]- Connect LimeSDR and probe
> SoapySDRUtil --probe
######################################################
## Soapy SDR -- the SDR abstraction library ##
######################################################
Probe device
[INFO] Make connection: 'LimeSDR-USB [USB3.0] 9072C00Dxxxxx'
[INFO] Reference clock 30.72 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz
[INFO] LMS70002M register cache: Disabled
---------------------------------------------------
-- Device identification
---------------------------------------------------
driver=FX3
hardware=LimeSDR-USB
boardSerialNumber=0x9072C00Dxxxxx
firmwareVersion=4
gatewareVersion=2.23
hardwareVersion=4
protocolVersion=1Execute with the following function to uninstall all packages, remove all downloaded packages and build files. Use -n and -v flags for dry-run and verbose output.
./build-script -ja uninstall./build-script -n -v -ja uninstall