How to Develop Wireless Connectivity on DSGW-210 IoT Gateway

by Dusun IoT in Circuits > Wireless

8 Views, 0 Favorites, 0 Comments

How to Develop Wireless Connectivity on DSGW-210 IoT Gateway

DSGW-210-product-image-1.jpg

The DSGW-210 IoT Edge Computer Gateway is a programmable IoT Gateway designed for the IoT Gateway Developer. It provides reliable connectivity for a wide range of wireless IoT devices, including Wi-Fi 2.4G/5G,Zigbee3.0, Bluetooth5.2 and Z-Wave, LoRa, LTECatM1, LTECat1, LTECAT4, Matter&Thread, ECC,GPS. Here are instructions on how to Start Wireless Development on DSGW-210.

Please build a debian system to do the following steps. The code will becompiled on the board, not on host.

root@linaro-alip:~# apt-get update
root@linaro-alip:~# apt-get install libncurses5-dev
root@linaro-alip:~# apt-get install libreadline-dev
root@linaro-alip:~# apt-get install libssl-dev
root@linaro-alip:~# apt-get install libjson-c-dev

Supplies

1. Prepare some library on the board

2. scp SDK "buildroot/dusun_rootfs/target_scripts/export_zigbee_zwave_ble_gpio.sh"

from host to board, under /root

root@linaro-alip:~# ./export_zigbee_zwave_ble_gpio.sh
root@linaro-alip:~#

Zigbee

Zigbee interface is /dev/ttyUSB0.

Download "Z3GatewayHost_EFR32MG12P433F1024GM48.tar.gz" from DusunFTP,

root@linaro-alip:~# tar xvzf Z3GatewayHost_EFR32MG12P433F1024GM48.tar.gz
root@linaro-alip:~# cd Z3GatewayHost_EFR32MG12P433F1024GM48
root@linaro-alip:~/Z3GatewayHost_EFR32MG12P433F1024GM48# make
<=============== wait for app build OK
root@linaro-alip:~/Z3GatewayHost_EFR32MG12P433F1024GM48# cd build/exe/
root@linaro-alip:~/Z3GatewayHost_EFR32MG12P433F1024GM48/build/exe#
root@linaro-alip:~/Z3GatewayHost_EFR32MG12P433F1024GM48/build/exe# ls
Z3GatewayHost_EFR32MG12P433F1024GM48 ota-files
root@linaro-alip:~/Z3GatewayHost_EFR32MG12P433F1024GM48/build/exe#./ Z3GatewayHost_EFR32MG12P433F1024GM48 -n1 -p
/dev/ttyUSB0 -b115200
Reset info: 11 (SOFTWARE)
ezsp ver 0x07 stack type 0x02 stack ver. [6.6.5 GA build 204] Ezsp
Config: set source route table size to 0x0064:Error: set: 0x35 Ezsp
Config: set security level to 0x0005:Success: set
Ezsp Config: set address table size to 0x0002:Success: set
Ezsp Config: set TC addr cache to 0x0002:Success: set
Ezsp Config: set stack profile to 0x0002:Success: set
Ezsp Config: set MAC indirect TX timeout to 0x1E00:Success: set
Ezsp Config: set max hops to 0x001E:Success: set
...
Z3GatewayHost_EFR3

Then build Z3Gateway and run.

For more information about Z3Gateway, please visit https://docs.silabs.com/ for more information.

Z-Wave

Z-Wave interface is /dev/ttyS1.

Download " rk3328_zwave_test.tar.gz " from Dusun FTP, and copy it to board, under /root.

root@linaro-alip:~# tar xvzf rk3328_zwave_test.tar.gz
root@linaro-alip:~# ls
Z3GatewayHost_EFR32MG12P433F1024GM48 export_zigbee_zwave_ble_gpio.sh
Z3GatewayHost_EFR32MG12P433F1024GM48.tar.gz rk3328_zwave_test.tar.gz
zipgateway
root@linaro-alip:~#

Unzip it and you can get ./zipgateway

root@linaro-alip:~# cd zipgateway/zipgateway-7.13.01-Source/usr/local/src/serialapi
root@linaro-alip:~/zipgateway/zipgateway-7.13.01-Source/usr/local/src/serialapi# make clean
root@linaro-alip:~/zipgateway/zipgateway-7.13.01-Source/usr/local/src/serialapi# make
<============= wait for build OK, you get "my_serialapi_test" in ./serialapi
root@linaro-alip:~/# ./my_serialapi_test /dev/ttyS1 0 // set region: 0 is EU, 1 is US
root@linaro-alip:~/# ./my_serialapi_test /dev/ttyS1
...
dump: <===
pwj: 10 01 15 5a 2d 57 61 76 65 20 37 2e 31 31 00 07
Vesion: Z-Wave 7.11
dump: ===>
pwj: 01 03 00 08 f4
dump: <==
i
Get init data
dump: ===>
pwj: 01 03 00 02 fe
dump: <===
pwj: 25 01 02 08 08 1d 01 00 00 00 00 00 00 00 00 00
pwj: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
pwj: 00 00 00 07 00
dump: nlist
pwj: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
pwj: 00 00 00 00 00 00 00 00 00 00 00 00 00
Node [1] GW

Now build a zwave simple test tool and run:

In "my_serialapi_test", press 'a' to include zwave device, 'r' to exclude device, 'd'to reset to default, 'i' to get devices list and 'q' toquit.

The Zipgateway is siliabs software, "my_serialapi_test" is just a very simple tool. For more information about Zipgateway, please visit https://docs.silabs.com/ for more information.

 Z-Wave region

If for default Dusun built, Z-Wave frequency can be configured in

/etc/config/dusun/zwave/region

Default is 0x00: EU

0x01 – US 0x02 – ANZ 0x03 – HK 0x04 – Malaysia

0x05 – India 0x06 – Israel 0x07 – Russia 0x08 – China

0x20 – Japan 0x21 - Korea


BLE

BLE interface is /dev/ttyUSB1.

Download "rk3328_ble_test.tar.gz" from Dusun FTP, and copy it to board, under /root.

root@linaro-alip:~# tar xvzf rk3328_ble_test.tar.gz
root@linaro-alip:~# cd bletest/test/
root@linaro-alip:~/bletest/test#

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.

root@linaro-alip:~/bletest/test# make
<========== wait for build OK, and you get ./build/test
root@linaro-alip:~/bletest/test# ./build/test /dev/ttyUSB1 115200 -C

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.

root@linaro-alip:~# tar xvzf sx1302_hal_0210.tar.gz
root@linaro-alip:~# cd sx1302_hal/

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 formore information.

root@linaro-alip:~/sx1302_hal# make all
<========== wait for build OK, and you get ./packet_forwarder/
root@linaro-alip:~/sx1302_hal/packet_forwarder# ./lora_pkt_fwd


Conlusion

DSGW-210 is an off-the-shelf hardware solution with developer preferred ARM-based processor (RK3328) running pre-built Linux Debian 11. With customizable memory storage (RAM up to 2GB and eMMC up to 32GB), it provides powerful edge computing capabilities for local operation (cloud & cloud free).


Rich built-in wireless connectivity (BLE/Zigbee/Z-Wave/LoRaWAN/Wi-Fi/Matter/Thread/GPS/M-Bus/Sub-GHz) and sufficient WAN and LAN ports are ideal choices for IoT hardware developers to customize based on diversified IoT applications such as smart home, building automation, energy management and more.