DUSUN DSGW-010C IoT Edge Computer Gateway User Guide
- June 12, 2024
- Dusun
Table of Contents
- DSGW-010C IoT Edge Computer Gateway
- Introduction
- Gateway Information
- Target Setup
- Compile the Environment to Build
- SDK Acquisition and Preparation
- Code Compilation
- More about buildroot system
- Wireless development (Zigbee, Z-Wave, BLE, LoRaWAN)
- Image Upgrade
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
A DUSUN company
SDK Quick Start Guide
Product Name: IoT Edge Computer Gateway
Model Name: DSGW-010C
DSGW-010C IoT Edge Computer Gateway
Revision History
Specification | Sect. | Update Description | By |
---|---|---|---|
Rev | Date | ||
1.0 | 2022-07-07 | New version release | |
Approvals
Organization | Name | Title | Date |
---|---|---|---|
Introduction
This Quick Start Guide explains the basics: how to connect and set up your
target on the network; how to install the SDK; and how to build the firmware
images.
The Linux Software Developer’s Kit (SDK) is an embedded hardware and software
suite that enables Linux developers to create applications on Dusun’s DSGW-
010C gateway.
Base on the 4.4 Linux kernel, and leveraging existing open source software,
the SDK simplifies the process of adding custom applications. Device drivers,
GNU toolchain, Predefined configuration profiles, and sample applications are
all in included.
Gateway Information
2.1 Basic information
SOC: PX30 Quad-core ARM Cortex-A53
2GB on-board RAM
32GB eMMC
Base on the LoRa Concentrator Engine: Semtech SX1302
TX power up to 27dBm, RX sensitivity down to -139dBm @SF12, BW125kHz
LoRa Frequency band support: RU864, IN865, EU868, US915, AU915, KR920, AS923.
Support Wi-Fi 2.4G/5G IEEE 802.11b/g/n/ac
Support BLE5.0
Support GPS,GLONASS,Galileo and QZSS
Support IP66 waterproof housing
2.2 Interface
Target Setup
This section describes how to connect the gateway into your host computer and network.
Connecting a gateway – Power
- Make sure that the power adapter is 5V/3A.
- Select the appropriate power plug adaptor for your geographical location. Insert it into the slot on the Universal Power Supply; then plug the power supply into an outlet.
- Connect the output plug of the power supply to the gateway
Connecting a gateway – USB port
- Connect one end of the USB cable to the USB port on the laptop or desktop
- Connect the other end of USB cable to the USB port on the gateway.
Connecting a PCBA board – Serial Port
If you want to debug the gateway, you can open the shell, Connect the PC to
the PCBA board via Serial to USB tool.
Green: GND
Blue: RX
Brown: TX
Compile the Environment to Build
Please use ubuntu 18.04 .iso image to setup your build environment. You can use a virtual machine or a physical PC to install ubuntu 18.04.
4.1 Virtual Machine
It is recommended that novice users use virtual machines, install ubuntu 18.04
to the virtual machine, and leave enough disk space (at least 100G) for the
virtual machine.
4.2 Ubuntu PC Compile the Environment to Build
The use of physical machine compilation users can use a ubuntu PC.
SDK Acquisition and Preparation
5.1 Download the source code from the Dusun FTP
The source package name will be px30_sdk.tar.gz, get it from Dusun FTP.
5.2 Code Compression Package Check
The next step can be taken only after generating the MD5 value of the source
compression package and comparing the MD5 value of the MD5 .txt text to
confirm that the MD5 value is the same, and if the MD5 value is not the same,
the energy code pack is damaged, please download it again.
$ md5sum px30_sdk.tar.gz
5.3 The Source Compression Package is Unzipped
Copy the source code to the corresponding directory and unzip the source code
compression package.
Code Compilation
6.1 Getting started, global Compilation
6.1.1 Initialize Compilation Environment Variables (select file system)
You can build buildroot, ubuntu or debian rootfs image. Select it in
“./mk.sh”.
6.1.2 Prepare the Root File System base
This section is for building ubuntu or debian file system.
Compile Ubuntu
Download the root file system image rootfs-ubuntu16_xubuntu_v1.1.img Copy the
root file system to the specified path, then run command ./mk.sh
The build will take a long time, please wait patiently.
Then the image would be placed in ./output/update-ubuntu.img
The update-ubuntu.img can be used to update firmware in gateway
Compile buildroot
Compile the buildroot image by command mk.sh -b
The build will take a long time, please wait patiently.
Then the image would be placed in ./output/update. img
The update. img can be used to update firmware in gateway
6.1.3 Run The Image on the board
Connect the PX30 board serial port to the PC via a USB to UART Bridge.
Use Putty or other Terminal software as your console tool,
SERIAL CONSOLE SETTINGS:
- 115200/8N1
- Baud: 115200
- Data Bits: 8
- Parity Bit: No
- Stop Bit: 1
Power UP the board, you can see the boot log on console:
There is no default password for system login.
6.2 Compiled Each Image Part Separately
6.2.1 The build system and the image structure
The update.img is composed of several parts. Main parts are uboot. img,
boot.img, recovery.img, rootfs.img. uboot.img contains bootloader uboot
boot.img contains the device tree .dtb image, Linux kernel image recovery.img:
The system can boot up to recovery mode, recovery.img is the rootfs used in
recovery mode. rootfs.img: The normal rootfs image. In normal mode, system
boot and mount this rootfs image.
You may need to build the images separately, especially when you focus on
single module (e.g. uboot or kernel driver) development. Then you can build
only that part of image and update that partition in flash.
6.2.2 Build Uboot only
6.2.3 Build Linux Kernel Only
6.2.4 Build Recovery File System Only
More about buildroot system
If you use buildroot rootfs, some Dusun test scripts/tools are already installed in the final buildroot rootfs. You can refer to buildroot/dusun_rootfs/add_ds_rootfs.sh
7.1 Test hardware components
The following testing are done under the buildroot system.
7.1.1 Test Wi-Fi as AP
The “ds_conf_ap.sh” script is for setting up Wi-Fi AP, SSID is “dsap”,
password is “12345678”.
7.1.2 Test I2C
Test of i2c function in gateway
Wireless development (Zigbee, Z-Wave, BLE, LoRaWAN)
Please use the ubuntu system to do the following steps. The code will be compiled on the board, not on host.
- Prepare some library on the board
- scp SDK
8.1 BLE
BLE interface is /dev/ttyUSB1.
Download “rk3328_ble_test.tar.gz” from Dusun FTP, and copy it to board, under
/root.
Unzip it and you can get ./bletest build ble test tool and run:
More information about the BLE test tool, please visit
https://docs.silabs.com/ for more information.
8.2 LoRaWAN
Choose the correct interface for LoRaWAN, for example /dev/spidev32766.0.
The configuration file for it is in
./sx1302_hal/packet_forwarder/global_conf.json.
Download “sx1302_hal_0210.tar.gz” from Dusun FTP, and copy it to board, under
/root.
Untar it and you can get ./sx1302_hal build LoRaWAN sample code sx1302_hal and
run:
More information about the LoRaWAN code, please visit
https://www.semtech.com/products/wireless-rf/lora-core/sx1302 for more
information.
8.3 GPS
Acquire the GPS data from gps program, the default serial port is ttyS3, baud
rate 9600
Image Upgrade
9.1 Upgrade Tool
Upgrade tool:AndroidTool_Release_v2.69
9.2 Go into Upgrade Mode
-
Connect the OTG port to the burning computer USB port, it’s also act as 5V power supply
-
Press “Ctrl+C” when uboot is booting up, to enter uboot:
-
uboot “rbrom” comand to reboot the board into maskrom mode, for a complete “update.img” upgrade.
-
“rockusb 0 mmc 0” command to reboot board to loader mode, for a partial firmware upgrade or a complete “update. img” upgrade.
9.3 The Entire Package of Firmware “update.img” Upgrade
9.4 Upgrade the Firmware Separately
Tel:86-571-86769027/8 8810480
Website: www.dusuniot.com
www.dusunremotes.com
Floor 8, building A, Wantong center,
Hangzhou 310004, china
www.dusunlock.com
References
- Dusun IoT: Embedded Hardware Vendor | IoT Gateway Sepcialist
- SX1302 LoRa Core Digital Baseband Chip | Semtech
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>