DusunIoT DSGW-290 IoT Edge Computer Gateway User Guide
- June 12, 2024
- DusunIoT
Table of Contents
- DusunIoT DSGW-290 IoT Edge Computer Gateway
- Product Information
- Product Usage Instructions
- Introduction
- Gateway Information
- Target Setup
- Compile the Environment to Build
- SDK Acquisition and Preparation
- Code Compilation
- Wireless development
- Hardware interface development
- Image Upgrade
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
- wget -4 –no-check-certificate https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-1310.80.1.tar.gz#tarxvfmDNSResponder-1310.80.1.tar.gz-C/tmp
- cd /tmp/mDNSResponder-1310.80.1/Clients
- sed -i ‘/#include <ctype.h>/a #include <stdarg.h>’ dns-sd.c
- sed -i ‘/#include <ctype.h>/a #include <sys/param.h>’ dns-sd.c
- cd /tmp/mDNSResponder-1310.80.1/mDNSPosix
- make os=linux
- sudo make install os=linux
- cp mdnsd.sh /etc/init.d/mdns
- chmod ugo+x /etc/init.d/mdns
- ln -s -f /etc/init.d/mdns /etc/rc2.d/S52mdns
- ln -s -f /etc/init.d/mdns /etc/rc3.d/S52mdns
- ln -s -f /etc/init.d/mdns /etc/rc4.d/S52mdns
- ln -s -f /etc/init.d/mdns /etc/rc5.d/S52mdns
- ln -s -f /etc/init.d/mdns /etc/rc0.d/K16mdns
- ln -s -f /etc/init.d/mdns /etc/rc6.d/K16mdns
- cp build/prod/mdnsd /usr/sbin/mdnsd
- cp ../Clients/build/dns-sd /usr/bin/dns-sd
- cd you_thread_path/ot-br-posix
- git init
- git clone https://github.com/openthread/ot-br-posix
- cd you_thread_pathot-br-posix
- WEB_GUI=1 ./script/bootstrap
- INFRA_IF_NAME=eth0 WEB_GUI=1 ./script/setup
DusunIoT DSGW-290 IoT Edge Computer Gateway
Product Information
Manufacturer | Hangzhou Roombanker Technology Co., Ltd. |
---|---|
Model Name | DSGW-290 |
Revision History | |
Rev Date | Sect. |
1.0 | 2022-08-06 |
1.1 | 2023-02-06 |
Approvals | |
Organization | Name |
Hangzhou Roombanker Technology Co., Ltd. | A DUSUN company |
Product Usage Instructions
To use the IoT Edge Computer Gateway (Model Name: DSGW-290), please follow the instructions below:
- Ensure that the gateway is connected to a power source.
- Connect the gateway to your local network using either the Wi-Fi or SUB-G interface.
- If using Wi-Fi, refer to section 8.6 for further instructions.
- If using SUB-G, refer to section 8.7 for further instructions.
- If LTE connectivity is required, refer to section 8.8 for further instructions.
- For hardware interface development, refer to section 9 for information on HDMI, headphone, SATA, and beeper interfaces.
- To perform an image upgrade, follow the steps in section 10.1 using the provided Upgrade Tool.
For more detailed information and specifications, please refer to the user manual provided by Hangzhou Roombanker Technology Co., Ltd.
Product Name: IoT Edge Computer Gateway
Model Name: DSGW-290
Revision History
Specification| __
Sect.
| __
Update Description
| __
By
---|---|---|---
Rev| Date
1.0| 2022-08-06| | New version release|
1.1| 2023-02-06| | Add serial connection|
| | | |
| | | |
| | | |
| | | |
| | | |
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-290 gateway.
- Base on the 4.19.232 Linux kernel, and leveraging existing open source software, the SDK simplifies the process of adding custom applications. Device drivers, GNU toolchain, Pre-defined configuration profiles, and sample applications are all in included.
Gateway Information
Basic information
- SOC: RK3568
- Quad-core ARM Cortex-A53
- Mali-450MP2 GPU
- Power Supply: DC-12V
- LTE module: EG95 (LET CAT-4)
- Wi-Fi module: 6221A (Wi-Fi chip: RTL8821CS)
- Zigbee: EFR32MG1B232F256GM32
- Z-wave: ZGM130S037HGN
- Bluetooth: EFR32BG21A020F768IM32
- Lora:SX1302
- SUB-G:EFR32FG23A020F256IM32-C
- eMMC: 64GB
- SDRAM: 8BG
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 12V/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 – Network interface
- Connect one end of the network cable to the network port on the laptop or desktop
- Connect the other end of network cable to the network port on the gateway.
- SSH login gateway ip address,username is root passwd is root.
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
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.
Ubuntu PC Compile the Environment to Build
The use of physical machine compilation users can use a ubuntu PC.
SDK Acquisition and Preparation
Download the source code from the Dusun FTP
The source package name will be rk356x_linux-*.tar.gz, get it from Dusun FTP.
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.
The Source Compression Package is Unzipped
Copy the source code to the corresponding directory and unzip the source
code compression package.
Code Compilation
Getting started, global Compilation
Prepare the Root File System base
This section is for building ubuntu or debian file system. If you want to
build the buildroot file system, skip this section.
Compile Ubuntu
Download the root file system compression package ubuntu.tar.gz
The Root file system compresses the package directory:
Unzip the compression package
Copy the root file system to the specified path
Change the build config
Compile Debian
Download the root file system compression package debian.tar.gz Unzip the
compression package
Copy the root file system to the specified path
Change the bulidconfig
Start Compiling
Build a complete directory of firmware files: rockdev/pack/AIO-
3568J_Rk356x.img and other separate images, AIO-3568J_Rk356x.img includes
all firmware for full upgrade.
- $ ./build.sh
The build will take a long time, please wait patiently.
After AIO-3568J_Rk356x*.img is built, burn it to the board according to
chapter 7.
Run The Image on the board
Connect the RK3568 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.
Compiled Each Image Part Separately
The build system and the image structure
- The AIO-3568J_Rk356x*.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.
Build Uboot only
- $ ./build.sh uboot
Build Linux Kernel Only
- $ ./build.sh kernel
Build Recovery File System Only
- $ ./build.sh recovery
Build File System Only
- $ ./build.sh rootfs
Final Image Packaging
- $ ./build.sh updateimg
This command making rockdev/*.img scatter firmware packaging builds in the directory update.img
Wireless development
(Zigbee, Z-Wave, BLE, LoRaWAN, WIFI,Thread,SUB-G,LTE)
Please build a debian system to do the following steps. The code will be
compiled on the board, not on host.
Zigbee
Zigbee interface is /dev/ttyS3.
Exec command: AmberGwZ3 -n1 -p /dev/ttyS3 -b115200 -d
Z-Wave
Z-Wave interface is /dev/ttyS4 .
Exec command: zwdevd -b115200 -d/dev/ttyS4
Z-Wave region
If for default Dusun built, Z-Wave frequency can be configured in vi
/etc/config/dusun/zwdev/region
Default is 0x00: EU
- 0x01 – US
- 0x05 – India
- 0x20 – Japan
- 0x02 – ANZ
- 0x06 – Israel
- 0x21 – Korea
- 0x03 – HK
- 0x07 – Russia
- 0x04 – Malaysia
- 0x08 – China
BLE
BLE interface is /dev/ttyS7.
Exec command: bul -d /dev/ttyS7 -b115200
LoRaWAN
Choose the correct interface for LoRaWAN, for example /dev/spidev1.0. The
configuration file for it is in
/root/sx1302_hal/packet_forwarder/global_conf.json.
Thread
Note:
- Please build a debian system to do the following steps. The code will be compiled on the board, not on host.
- The thread here is based on the OpenThread .
What you need to prepare
If you want to run with thread-network correctly, the following steps should
be care:
- a thread module on the board which has been flashed the OT-RCP firmware;
- build OTBR and its operating environment; 8.5.2 Build OT-RCP
The OT-RCP is a application running on the thread module, which may contain
bootloader.
How to build OT-RCP based on the module brand and model you choose, please
refer to their documents.
Burning the OT-RCP and ensure that it can run normally.
Build OTBR
Install dependence:
Install mDNSResponder:
-
wget -4 –no-check-certificate https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-1310.80.1.tar.gz#tarxvfmDNSResponder-1310.80.1.tar.gz-C/tmp
-
cd /tmp/mDNSResponder-1310.80.1/Clients
-
sed -i ‘/#include <ctype.h>/a #include <stdarg.h>’ dns-sd.c
-
sed -i ‘/#include <ctype.h>/a #include <sys/param.h>’ dns-sd.c
-
cd /tmp/mDNSResponder-1310.80.1/mDNSPosix
-
make os=linux
-
sudo make install os=linux
-
cp mdnsd.sh /etc/init.d/mdns
-
chmod ugo+x /etc/init.d/mdns
-
ln -s -f /etc/init.d/mdns /etc/rc2.d/S52mdns
-
ln -s -f /etc/init.d/mdns /etc/rc3.d/S52mdns
-
ln -s -f /etc/init.d/mdns /etc/rc4.d/S52mdns
-
ln -s -f /etc/init.d/mdns /etc/rc5.d/S52mdns
-
ln -s -f /etc/init.d/mdns /etc/rc0.d/K16mdns
-
ln -s -f /etc/init.d/mdns /etc/rc6.d/K16mdns
-
cp build/prod/mdnsd /usr/sbin/mdnsd
-
cp ../Clients/build/dns-sd /usr/bin/dns-sd
Clone source code :
-
cd you_thread_path/ot-br-posix
-
git init
-
git clone https://github.com/openthread/ot-br-posix
If need support web:
-
cd you_thread_pathot-br-posix
-
WEB_GUI=1 ./script/bootstrap
Build (INFRA_IF_NAME is based on your Ethernet network on your system, it may
be eth1 or other;
and if you are using wifi-network, INFRA_IF_NAME may be wlan0 or other; set
WEB_GUI value to 1 if you need web, or 0):
-
INFRA_IF_NAME=eth0 WEB_GUI=1 ./script/setup
Building success:
You will find Executable program:
- otbr-agent : you_thread_path/ot-br-posix/build/otbr/src/agent/
- otbr-web(If you have enabled web): you_thread_path/ot-br-posix/build/otbr/src/web/
- ot-ctl: you_thread_path/ot-br-posix/build/otbr/third_party/openthread/repo/src/posix/
Configure otbr
The default path of configure file : /etc/default/otbr-agent
The content is like:
- OTBR_AGENT_OPTS=”-I wpan0 -B eth0 spinel+hdlc+uart:///dev/ttyACM0 trel://OTBR_INFRA_IF_NAME” OTBR_NO_AUTO_ATTACH=0
The eth0 is same to before.
The /dev/ttyACM0 is the device name of your thread module which has burned OT-
RCP firmware. So you have to change to the device name of your own equipment.
Note: After modifying, reboot your gateway !!!
The otbr-agent will connect OT-RCP automatically after rebooting.
Start/Stop/Status otbr
Log
Debug thread-network with ot-ctl
Other command about ot-ctl, you can input help to learn.
WIFI
WIFI is used by desktop system.
SUB-G
SUB-G interface is /dev/ttyS9.
Exec command: microcom -s 115200 -p /dev/ttyS9
LTE
LTE used by ModemManager.
- Print general mmcli help message: mmcli –help
- ModemManager normally listen, probes and detects cellular devices automatically when operating correctly but a forced scan can be triggered with command: mmcli –scan-modems << successfully requested to scan devices
- To list detected cellular devices use command: mmcli –list-modems << /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless, Incorporated]
- Here ModemManager have detected a Sierra Wireless cellular device and it has here been given the the identifier number 0 by ModemManager.
- To acquire more device information and status use the –modem command and identifier value. mmcli –modem=0
Hardware interface development
HDMI
Access to HDMI can display the desktop system.
Headphone
Codec can be show by command: arecord -l
Sound can be recording and play
Sata
If you use a SSD,the following operations are required
Beeper
Beeper can be open and close.
Open beeper: echo 0 > /sys/class/leds/firefly\:beeper/brightness Close beeper:
echo 1 > /sys/class/leds/firefly\:beeper/brightness
Image Upgrade
Upgrade Tool
Upgrade tool:AndroidTool_Release_v2.84.
Go into Upgrade Mode
- Connect the OTG port to the burning computer USB port, it’s also act as 12V power supply
- Press “reboot loader” when ssh login:
- system reboot the board into LOADER mode, for a complete “update.img” upgrade.
*The Entire Package of Firmware “XXX.img” Upgrade**
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
- GitHub - openthread/ot-br-posix: OpenThread Border Router, a Thread border router for POSIX-based platforms.
- opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-1310.80.1.tar.gz
- Dusun IoT: Embedded Hardware Vendor | IoT Gateway Sepcialist
- Dusun IoT: Embedded Hardware Vendor | IoT Gateway Sepcialist
- Dusunremotes | Custom Intelligent Remote Control Manufacturer
- GitHub - openthread/ot-br-posix: OpenThread Border Router, a Thread border router for POSIX-based platforms.
- opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-1310.80.1.tar.gz
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>