Table of Contents:
This is a general instruction for the use of Armbian base OS of Dragino devices. Current models include:
For advanced users to develop Driver/ Linux etc.
Requirements:
sudo apt install -y libsqlite3-dev
sudo apt install -y libftdi1-dev
Run command clone dragino-fwd package: git clone https://github.com/dragino/dragino_fwd_src.git
After cloning is complete, Run the command starts compiling:
Compile HP0C/HP0A fwd: ./hp0z-make-deb.sh c
The following example compilers HP0C fwd.
When the compilation is complete a draginofwd-*.deb package is generated.
Run command:
dpkg -i draginofwd-*.deb
Check the dragino_fwd log:
journalctl -u draginofwd -f
Start/stop dragino_fwd via systemctl:
systemctl start draginofwd
systemctl stop draginofwd
Since the gateway has a large system, you need to use the sd card to reflash the system for the gateway
2.3.1: Making an SD card with the new image
2.3.2: Instal the SD card to the gateway
2.3.3: Flash the image to the gateway's built memory from the SD card
2.3.4: Finished the process of flash and power cycle the gateway
2. Power the gateway with 5V2A, and access the gateway's Ethernet port to your PC
Note: The PWR LED on red
The LAN LED blink
The SYS LED on red
Access the gateway Linux CLI to flash the image to the gateway's built memory
Users can access the gateway CLI via the SSH protocol. Make sure your PC and the gateway are connected to the same network, then use a SSH tool (such as putty in Windows) to access it.
IP address: IP address of gateway or Fallback IP(172.31.255.254)
Port: 22
User Name: root
Password: dragino (default)
After logging in, you will be in the gateway CLI and can enter commands as shown below.
Run command:
nand-sata-install
Select the "Boot from eMMC - system on eMMC".
Select the "1 ext4"
It takes 4-5 minutes to burn from SD card to eMMC
Note: After the flash is complete, power off the device and then remove the SD card.
Users can use the SD card slot to expand the gateway memory size by following the steps below
After the mount is successful to check the file system disk usage on the Linux system again:
If the mount fails, you can format the file system and try the mount again
By default, the nodejs uses the pre-install version v12 which is due to Debian the ultra-stable via ultra-old.
If you want to upgrade the nodejs to the latest, please follow to use these commands on the gateway CIL.
#install n, which is an Interactively Manage Your Node.js Versions
#Install the latest LTS Node.js release (downloading if necessary)
#Remove all downloaded versions except the installed version
Check the current version
Check the running status:
configuration path:
Check the running status:
configuration path:
By default, LPS8v2 / MS20 series products have an auto-update feature for main packages. The device will connect to Dragino's auto-update server and check for updates.
When devices will check for updates?
What packages will be checked for updates?
dragino-httpd -- Main Web UI http configuration
dragino-sid -- SN write and read tool
dragino-ui -- Gateway Web UI package
draginofwd -- UDP packet forwarder, LoRa Base Station
draginoups -- Miscellaneous between different versions
Location and changelog for packages:
How to view auto-updated log
You can view the log on the page of System --> Package Management.
Can I disable package-auto-update?
You can check the checkbox and click the ‘SAVE’ button to enable or disable the auto-update.
You can click the ‘Manual Update’ to update the dragino's packages.
For the other packages, you have to access the device's CLI to do it via the apt command.
Customers can use their own package maintenance system instead of using the default one from Dragino. They need to set up a package maintenance system for Debian. Lots of instructions are available in Internet, below is a reference instruction.
apt install apache2
cd /var/www/html/
mkdir debian/release/dists/stable/main/binary-armhf/ -p
mkdir debian/release/pool/main/d/dragino/ -p
Tree Structure:
Note: If you are not familiar with updating servers, most directory names are not recommended to be changed.
└── debian
└── release
├── dists
│ └── stable
│ └── main
│ └── binary-armhf
└── pool
└── main
└── d
└── dragino --> This is the directory to store the packages. User can change it to other name.
The deb packages for auto-update can be placed in /var/www/html/debian/release/pool/main/d/dragino/
Below is an example package(testing-0808.deb) for test purpose:
wget http://repo.dragino.com/release/tool/unimportant/testing-0808.deb
cp ./testing-0808.deb /var/www/html/debian/release/pool/main/d/dragino/
cd /var/www/html/debian/release/
dpkg-scanpackages pool/ > dists/stable/main/binary-armhf/Packages
cat dists/stable/main/binary-armhf/Packages | gzip -9 > dists/stable/main/binary-armhf/Packages.gz
Note: Every time a package has been update, above comments need to be executed in the server to get the up-to-date package list.
cd /var/www/html/debian/release/dists/stable
wget http://repo.dragino.com/release/tool/unimportant/generate-release.sh
chmod + x ./generate-release.sh
./generate-release.sh > Release
apt install gnupg
gpg -gen-key
Note: Fill in the content as required and remember the name and email address.
gen -list-key
cd /var/www/html/debian/release/dists/stable
gpg --armor --detach-sign -o Release.gpg Release
gpg --clearsign -o InRelease Release
gpg --armor --output <name>.asc --export <email address>
example: gpg --armor --output xiao.asc --export xiaoye@dragino.cc
cp xiao.asc /etc/apt/trusted.gpg.d/
Note: First need to transfer the public key from auto-update server to device.
Add the apt source list url and name this as test_server.list
echo "deb http://<IP_address or hostname>/debian/release stable main" | tee /etc/apt/sources.list.d/test_server.list
Get and install the testing package (download testing-0808.deb and test)
apt update && apt install testing
Example output:
/etc/apt/sources.list
Path : /usr/lib/dragino/dragino-apt-updates
The device performs automatic updates from this script,
But it will now only look for dragino as a keyword, so you need to replace the keyword dragino with your own keyword.