DUSUN DSGW-010C IoT Edge Computer Gateway User Guide

October 31, 2023
Dusun

DUSUN logo

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

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 1

Target Setup

This section describes how to connect the gateway into your host computer and network.

Connecting a gateway – Power

  1. Make sure that the power adapter is 5V/3A.
  2. 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.
  3. Connect the output plug of the power supply to the gateway

Connecting a gateway – USB port

  1. Connect one end of the USB cable to the USB port on the laptop or desktop
  2. 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

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 2

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.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 3

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”.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 4

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

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 5

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

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 6

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:

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 7

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

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 8

6.2.3 Build Linux Kernel Only

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 9

6.2.4 Build Recovery File System Only

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 10

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

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 12

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.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 13

  1. Prepare some library on the board
  2. scp SDK

8.1 BLE

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 14

BLE interface is /dev/ttyUSB1.
Download “rk3328_ble_test.tar.gz” from Dusun FTP, and copy it to board, under /root.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 15

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.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 16

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.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 17

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.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 18

8.3 GPS
Acquire the GPS data from gps program, the default serial port is ttyS3, baud rate 9600

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 19

Image Upgrade

9.1 Upgrade Tool
Upgrade tool:AndroidTool_Release_v2.69

9.2 Go into Upgrade Mode

  1. Connect the OTG port to the burning computer USB port, it’s also act as 5V power supply

  2. Press “Ctrl+C” when uboot is booting up, to enter uboot:
    DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 20

  3. uboot “rbrom” comand to reboot the board into maskrom mode, for a complete “update.img” upgrade.
    DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 21

  4. “rockusb 0 mmc 0” command to reboot board to loader mode, for a partial firmware upgrade or a complete “update. img” upgrade.

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 22

9.3 The Entire Package of Firmware “update.img” Upgrade

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 23

9.4 Upgrade the Firmware Separately

DUSUN DSGW-010C IoT Edge Computer Gateway - Fig 24

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

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals