网站地图Dusun Pi工业网关蓝牙网关Zigbee网关LoRaWAN网关ThingsBoard边缘计算网关Home Assistant网关4G/5G网关OpenHAB网关Z-wave 网关BLE信标网关Sub-GHz 网关Modbus网关Matter网关智能网关室外防水网关Wi-Fi双频段网关智能Zigbee网关智能蓝牙网关智能Z-Wave网关LTE网关直插式网关AoA定位基站智能触控面板网关可编程网关智能模组核心板智能门锁智能传感器说明&安装智能开关智慧零售智能语音模组嵌入式物联网网关设计和开发SOM核心板开发ODM智慧安防OEM物联网网关开发人员物联网解决方案供应商智能家居终端用户按人群分类解决方案智能公寓智慧养老AOA室内定位健康监护智慧能源空气质量检测调节智能工位探测管理IoT行业套件解决方案蓝牙MESH灯控解决方案智能传感器解决方案智能灯控解决方案智能烟感解决方案智能插座解决方案智能开关解决方案智能恒温器解决方案植物生长灯解决方案智能硬件解决方案ATV遥控器解决方案AWS遥控器解决方案iOS遥控器解决方案通用型遥控器解决方案智能遥控器解决方案智能白电方案麦克风阵列方案远场遥控器方案智能厨卫方案远场语音解决方案可编程物联网网关入门指南无线模组SDK&原理图Dusun Pi网关安装应用程序指南物联网资源库技术简介视频中心DSGW-210规格书  物联网边缘计算网关产品规格书关于东胜研发实力平台认证合作伙伴加入我们东胜新闻行业科普
使物联网网关开发人员能够快速将新应用程序推向市场,从而缩短上市时间、开发成本和设计风险。
通过将标准计算组件集成到单个单元中来简化产品开发。
专为长期使用而设计,为嵌入式和 IPC 系统提供可靠性,适用于各种应用。
新闻详情

DSGW-210 SDK Quick Start Guide  V1.2

发表时间:2022-08-20 11:23

SDK Quick Start Guide

Product Name: IoT Edge Computer Gateway

                                                   Model Name: DSGW-210

Revision History


Specification
Sect.
Update Description
By

Rev
Date



1.0
2021-08-06

New version release

1.1
2022-04-05

Add Power management

1.2
2022-06-06

Add serial connection





































Approvals


Organization
Name
Title
Date














1 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-210 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.  

2 Gateway Information

2.1 Basic information  

SOC: RK3328

         Quad-core ARM Cortex-A53

         Mali-450MP2 GPU

Power Supply: DC-5V

LTE module: BG96 (LET CAT-1)

Wi-Fi module: 6221A (Wi-Fi chip: RTL8821CS)

Zigbee: EFR32MG1B232F256GM32

Z-wave: ZGM130S037HGN

Bluetooth: EFR32BG21A020F768IM32 eMMC: 8GB SDRAM: 2BG

2.2 Interface  

3 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  

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.  

                                          Figure3-1. Connecting a gateway via USB port   

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.  

PIN in board for serial connection: TP1100: RX TP1101: TX

                                         Figure3-1. Connecting a PCBA via Serial-USB tool

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

5 SDK Acquisition and Preparation

5.1 Download the source code from the Dusun FTP

The source package name will be 3328-linux-*.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 rk3328-linux-*.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.

    $ sudo -i      

    $ mkdir workdir    

    $ cd workdir    

    $ tar -zxvf   /path/to/rk3328-linux-*.tar.gz    

    $ cd rk3328-linux    


6 Code Compilation

6.1 Getting started, global Compilation

6.1.1Initialize Compilation Environment Variables (select file system)

You can build buildroot, ubuntu or debian rootfs image. Select it in "./build.sh init".


$ ./build.sh init processing option: init
============You're building on Linux=========== Please choose BoardConfig
BoardConfig_rp3328_buildroot
BoardConfig_rp3328_ubuntu
BoardConfig_rp3328_debian Please input num:


We strongly recommend you to build and run the system with buildroot rootfs to get familiar with the hardware and build environment, when you get started.

After you tried buildroot system, you can try ubuntu and debian system.

6.1.2Prepare 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

$ tar -zxvf ubuntu.tar.gz         // you get ubuntu.img

Copy the root file system to the specified path

$ cd workdir/rk3328-linux $ mkdir ubuntu $ cp /path/to/ubuntu.img ./ubuntu/

Compile Debian

Download the root file system compression package debian.tar.gz

Unzip the compression package

$ tar -zxvf debian.tar.gz       // you get linaro-rootfs.img

杭州市大关路     189

Tel:86     -571-86769027/8

Copy the root file system to the specified path

$ cd workdir/rk3328-linux $ mkdir debian $ cp ./linaro-rootfs.img ./debian/

6.1.3 Start Compiling

$ ./build.sh

Build a complete directory of firmware files: rockdev/update.img and other separate images, update.img includes all firmware for full upgrade.

The build will take a long time, please wait patiently.  

After update.img is built, burn it to the board according to chapter 7.

6.1.4 Run The Image on the board

Connect the RK3328 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

$ ./build.sh uboot

6.2.3 Build Linux Kernel Only

$ ./build.sh kernel

6.2.4 Build Recovery File System Only

$ ./build.sh recovery

6.2.5 Build File System Only

$ ./build.sh rootfs

6.2.6 Final Image Packaging

$ ./build.sh updateimg

This command making rockdev/*.img scatter firmware packaging builds in the directory update.img


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


# ds_conf_ap.sh   192.168.10.1 start hostapd
Configuration file: /etc/hostapd.conf wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE start dnsmasq
Stopping dnsmasq: OK
Starting dnsmasq: OK Done!!!!!!
#  
#  
# iwconfig   lo        no wireless extensions.
wlan0     IEEE 802.11an   ESSID:"dsap"   Nickname:"<WIFI@REALTEK>"           Mode:Master   Frequency:5.745 GHz   Access Point: 20:57:9E:8B:70:F5   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0   
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=1/100   Signal level=1/100   Noise level=0/100
          Rx invalid nwid:0   Rx invalid crypt:0   Rx invalid frag:0
          Tx excessive retries:0   Invalid misc:0   Missed beacon:0
eth0      no wireless extensions.
#  
# ifconfig   eth0      Link encap:Ethernet   HWaddr 0A:11:D3:88:1E:B5   
          inet addr:192.168.1.4   Bcast:192.168.1.255   Mask:255.255.255.0           inet6 addr: fe80::811:d3ff:fe88:1eb5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1
          RX packets:73386 errors:0 dropped:0 overruns:0 frame:0           TX packets:52722 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000  
          RX bytes:64535523 (61.5 MiB)   TX bytes:4975499 (4.7 MiB)           Interrupt:40  
lo        Link encap:Local Loopback             inet addr:127.0.0.1   Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING   MTU:65536   Metric:1


7.1.2 Test BG96

bg96_dial.sh is used for BG96 dial.


# ifconfig eth0 down
#  
# bg96_dial.sh  
AT+CPIN?
+CPIN: READY
OK
AT+CSQ
+CSQ: 31,99
OK
...
sent [IPCP ConfAck id=0x1] rcvd [IPCP ConfNak id=0x3 <addr 172.28.36.150> <ms-dns1 221.131.143.69> <ms-dns2 112.4.0.55>] sent [IPCP ConfReq id=0x4 <addr 172.28.36.150> <ms-dns1 221.131.143.69> <ms-dns2 112.4.0.55>] rcvd [IPCP ConfAck id=0x4 <addr 172.28.36.150> <ms-dns1 221.131.143.69> <ms-dns2 112.4.0.55>] Could not determine remote IP address: defaulting to 10.64.64.64 local   IP address 172.28.36.150 remote IP address 10.64.64.64 primary   DNS address 221.131.143.69 secondary DNS address 112.4.0.55                 <===== after connected, type Ctrl+Z
^Z[1]+   Stopped                    bg96_dial.sh
#  
# ifconfig   lo        Link encap:Local Loopback             inet addr:127.0.0.1   Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING   MTU:65536   Metric:1
          RX packets:131 errors:0 dropped:0 overruns:0 frame:0           TX packets:131 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1  
          RX bytes:12350 (12.0 KiB)   TX bytes:12350 (12.0 KiB)
ppp0      Link encap:Point-to-Point Protocol   
          inet addr:172.28.36.150   P-t-P:10.64.64.64   Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST   MTU:1500   Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0           TX packets:6 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:3  
          RX bytes:96 (96.0 B)   TX bytes:114 (114.0 B)
wlan0     Link encap:Ethernet   HWaddr 20:57:9E:8B:70:F5             inet addr:192.168.10.1   Bcast:0.0.0.0   Mask:255.255.255.0           inet6 addr: fe80::2257:9eff:fe8b:70f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1
          RX packets:33387 errors:0 dropped:0 overruns:0 frame:0           TX packets:56331 errors:0 dropped:636 overruns:0 carrier:0           collisions:0 txqueuelen:1000  
          RX bytes:5077398 (4.8 MiB)   TX bytes:78164665 (74.5 MiB) #
# ping www.baidu.com
PING www.baidu.com (36.152.44.96): 56 data bytes


64 bytes from 36.152.44.96: seq=0 ttl=56 time=317.025 ms

You need to configure APN, username/password for BG96, in quectel-chatconnect and quectel-ppp file. Before you run the test. # cat /etc/ppp/peers/quectel-chat-connect

ABORT "BUSY"

ABORT "NO CARRIER"

ABORT "NO DIALTONE"

ABORT "ERROR"

ABORT "NO ANSWER"

TIMEOUT 5

"" AT OK ATE0 OK AT+CPIN?

READY AT

OK AT+CSQ

OK AT+QCFG="nwscanmode"

OK AT+QCFG="nwscanseq"

OK AT+QCFG="iotopmode" OK AT+QCFG="band"

OK AT+CREG?

OK ATI;+CSUB;+CSQ;+CPIN?;+COPS?;+CGREG?;&D2

# Insert the APN provided by your network operator, default apn is 3gnet      <================ OK AT+CGDCONT=1,"IP","3gnet",,0,0

OK ATD*99#

CONNECT

#

#

# cat /etc/ppp/peers/quectel-ppp

# cat /etc/ppp/peers/quectel-ppp

# /etc/ppp/peers/quectel-pppd

# Usage:root>pppd call quectel-pppd

#Modem path, like /dev/ttyUSB3,/dev/ttyACM0, depend on your module, default path is /dev/ttyUSB3

/dev/ttyUSB5 115200

#Insert the Username and Password for authentication, default User and Password are test user "test" password "test"                                <==========================

# The chat script, customize your APN in this file connect 'chat -s -v -f /etc/ppp/peers/quectel-chat-connect'

# The close script

disconnect 'chat -s -v -f /etc/ppp/peers/quectel-chat-disconnect'

# Hide password in debug messages hide-password

# The phone is not required to authenticate noauth

# Debug info from pppd debug

# If you want to use the HSDPA link as your gateway defaultroute

# pppd must not propose any IP address to the peer noipdefault # No ppp compression novj novjccomp noccp ipcp-accept-local ipcp-accept-remote local

# For sanity, keep a lock on the serial line lock modem dump nodetach

# Hardware flow control nocrtscts remotename 3gppp ipparam 3gppp ipcp-max-failure 30

# Ask the peer for up to 2 DNS server addresses usepeerdns

#   #

7.1.3 Test LED

# dsled  

Usage: dsled [r|g|b] [on/off]        dsled [r|g|b] [blink_slow|blink_fast]        dsled [r|g|b] breathe

#  

# dsled r on # dsled b blink_fast

7.1.4 Test I2C

# i2cdetect -y 0

     0   1   2   3   4   5   6   7   8   9   a   b   c   d   e   f 00:          -- -- -- -- -- -- -- -- -- -- -- -- --   10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --  

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   50: -- -- -- -- -- 55 -- -- -- -- -- -- -- -- -- --  

60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- --  

70: -- -- -- -- -- -- -- --                         

#

Actually LED controlled is I2C interface.

7.2 How to make menuconfig in buildroot

Normal mode buildroot rootfs config file: buildroot/configs/rockchip_rk3328_defconfig Recovery mode buildroot rootfs config file:

buildroot/configs/rockchip_rk3328_recovery_defconfig

#cd buildroot

#make rockchip_rk3328_defconfig

#make menuconfig

#mv .config ./configs/rockchip_rk3328_defconfig      <==== after config change, overwrite the old one

If you want to change buildroot configure, here are the steps:


Figure3-1.buildroot make menuconfig

7.3 How to add an application in buildroot source tree

Make directory buildroot/dusun_package/<your_app>

Put APP source code files and Makefile to buildroot/dusun_package/< your_app > your_app.h your_app.c   Makefile

Make directory buildroot/package/< your_app >

Config.in your_app.mk

Add Config.in sourcing in buildroot/package/Config.in

menu "Dusun software"

    source "package/dsled/Config.in" +     source "package/<your_app>/Config.in" endmenu

Make menuconfig to select your APP, and save the configure file as 5.2.

"./build.sh rootfs" to rebuild rootfs

Please refer to buildroot/dusun_package/dsled/, it's a useful example.

7.4 Switch to ubuntu or debian system

If you have built a buildroot system image, and want to switch to ubuntu or debian image. You don't need to clean the make and do a clean rebuild. Just do the following steps:


"./build.sh init" to select ubuntu or debian

"./build.sh rootfs" to rebuild ubuntu or debian rootfs

"./build.sh" to build a the final update.img

Be careful, the dusun tools and scripts are default copied to buildroot rootfs, not to ubuntu or debian rootfs.

If you want to copy them to ubuntu or debian rootfs, you can modify the buildroot/dusun_rootfs/add_ds_rootfs.sh. For the APPs, you can copy the code to the board and build it on the target board ubuntu or debian system, since it has gcc and other toolchains.

8 Wireless development (Zigbee, Z-Wave, BLE, LoRaWAN)

Please build a debian system to do the following steps. The code will be compiled 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

Prepare some library on the board

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:~#

Power on wireless modules on board.

8.1 Zigbee

Zigbee interface is /dev/ttyUSB0.

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

杭州市大关路 189

Tel:86-571-86769027/8


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.

8.2 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' to quit.

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



0x01 – US      
0x02 – ANZ  
0x03 – HK      
0x04 – Malaysia
0x05 – India  
0x06 – Israel  
0x07 – Russia  
0x08 – China  
0x20 – Japan  
0x21 - Korea



8.3 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

8.4 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 for more 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


9 Image Upgrade

9.1 Upgrade Tool

Upgrade toolAndroidTool_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

10 Power management configuration  

The battery management chip Dusun used is BQ25895 Methods to optimize CPU power consumption is listed,

Adjust cpufreq parameter.


/* the default frequency scaling strategy used is interactive, relative parameters are as follows: */ ls -l /sys/devices/system/cpu/cpu0/cpufreq/interactive
go_hispeed_load       /* when the loading is larger than go_hispeed_load and the frequency is smaller than hispeed_freq, directly jump to hispeed_freq */
hispeed_freq            /* when jumping from low frequency to high frequency, need to jump to hispedd_freq first */
above_hispeed_delay       /* when the frequency is larger than hispeed_freq, the time duration before each frequency increase */
min_sample_time       /* after each frequency increase, if it is to reduce the frequency next time , the time duration before frequency reduce */
target_loads            /* the target loading of the frequency scaling */ timer_rate            /* the loading sampling timeunit:us */
timer_slack   /* the loading sampling time after cpu entering idle */ boost    /* when the frequency is smaller than hispeed_freq, keep boost to hispeed_freq */
boostpulse            /* when the frequency is smaller than hispeed_freq, boost to hispeed_freq, keep a while */
boostpulse_duration       /* time duration of boostpulse, unit:us */ io_is_busy            /* whether to compute io wait to cpu loading */
We mainly adjust three parameters: hispeed_freqtarget_loadstimer_rate:
1. hispeed_freq: select an appropriate transition frequency, to make cpu stable in the medium frequency, with the best power consumption, too large or too small will cause cpu jump to high frequency easily and increase the power consumption. 2. target_loads:easier to run with low frequency after this value is increased, both the power consumption and the performance will be reduced.
3. timer_rate: easier to run with low frequency after this value is increased, both the power consumption and the performance will be reduced.


Close some cpu, limit the highest frequency of cpu


/* close cpu2cpu3 */
echo 0 > /sys/devices/system/cpu/cpu2/online echo 0 > /sys/devices/system/cpu/cpu3/online
/* List all the available frequency */
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies output: 408000 600000 816000 1008000 1200000 1296000
/* set the max frequency of cpu0 to 1200MHz */
echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq



SoC with ARM Big-Little architecture can bind the tasks with high loading to little cores through CPUSET since the energy efficiency of the little core is better.

/* Note: SoC with SMP architecture can also bind the tasks to some cpu so that other cpus can enter low power consumption mode, but maybe it will make cpu easy to run with high frequency, which will increase the power consumption. */


/* create group of litte core*/ mkdir /dev/cpuset/little
/* set cpu used by group of little core */ echo 0-3 > /dev/cpuset/little/cpus
/* add pid=1111 task into the group of little core */ echo 1111 > /dev/cpuset/little/tasks
/* Android system creates several groups by default, the framework layer puts the tasks into differenct groups, you can adjust cpus of each group, analyze the power consumption */
ls /dev/cpuset background foreground system-background top-app


Limit the cpu bandwidth of the tasks with high loading through CPUCTL (need to enable the macro CONFIG_CFS_BANDWIDTH).


/* create the group of bandwidth limitation */ mkdir /dev/cpuctl/mygroup
/* set the cycle of bandwidth limitation as 10ms */ echo 10000 > /dev/cpuctl/mygroup/cpu.cfs_quota_us
/* within each cycle, total running time of the tasks in the group cannot exceed 5ms, this value can be larger than cfs_quota_us, because it is the total running time of multiple cpus */ echo 5000 > /dev/cpuctl/mygroup/cpu.cfs_period_us
/* add relative tasks into the group */ echo 1111 > /dev/cpuctl/mygroup/tasks echo 1112 > /dev/cpuctl/mygroup/tasks
/* cpu.shares means to limit the bandwidth of the task through weight, used for performance optimization, without affecting the power consumption */
/dev/cpuctl/mygroup/cpu.shares




文章推荐

文章推荐

副标题

在发达国家,老龄化进程加速,老年人常需医疗、行动辅助、安全保障及个人卫生护理,费用高昂。传统老人监护依赖护士或助理现场照料,而物联网远程监控方案能有效改进此模式。它通过运用传感器等技术,实现全天候低成本实时监控,达到双赢效果。本文将为您介绍物联网设备如何赋能远程老人监护需求。
物联网在远程老人监护中是如何运作的

物联网在远程老人监护中有广泛的应用,它通过网络连接物理设备,如可穿戴医疗设备...
工业防爆网关作为工业物联网(IIoT)和自动化控制系统中的重要组成部分,在具有爆炸性危险的环境中发挥着关键作用。它们不仅实现了数据的可靠传输,还通过集成多种安全功能,如集成公钥体系,确保了数据传输的机密性、完整性和不可否认性。2024年亚太防爆设备市场规模预计为27.6亿美元,预计到2029年将达到42.5亿美元,在预测期内(2024-2029年)复合年增长率为9.06%。

机器视觉产业链全景回顾
视觉引导机器人生态系统或产业链分为三个层次。
上游(供应商)该机器人视觉系统的上游包括使其得以运行的硬件和软件提供商。硬件提供商提供工业相机、图像采集卡、图像处理器、光源设备(LED)、镜头、光学附件、配件等。
另一方面,软件提供商则提供机器视觉软件和算法,这其中包括视觉处理软件、算法平台及其库、图像处理软件等。
中游(机器人设备制造与系统集成)
...
正如人类依赖眼睛和大脑来解读世界,机器人也需要自己的视觉系统来有效运作。没有视觉,机器人就如同蒙上双眼的人类,仅能执行预编程的命令,容易碰撞障碍物,并犯下代价高昂的错误。这正是机器人视觉发挥作用的地方,它赋予机器“看”并解释周围环境的能力。通过使用相机作为“眼睛”和高级AI作为“大脑”,机器人视觉为机器人提供了感知环境、智能移动、实时反应和执行复杂任务所需的能力。在本文中,我们将深入探讨构...
随着全球经济的不断发展和智能制造的深入推进,机器人AI控制盒作为机器人系统的核心部件,其市场地位日益凸显。近年来,人工智能、云计算、大数据等技术的深度融合,为机器人AI控制盒的技术创新提供了强大动力。这些技术的应用不仅提升了机器人控制盒的智能化水平,还拓展了其应用场景,使其能够更好地适应复杂多变的工作环境。
随着5G技术的浪潮席卷全球,工业领域正经历着一场前所未有的变革。5G工业网关,作为连接工业设备与云端的桥梁,以其高速、低延迟的数据传输能力和强大的边缘计算能力,成为推动工业数字化转型的关键力量。那么,在众多5G工业网关厂家中,哪些品牌脱颖而出?哪个品牌又最适合您的企业需求呢?
本文将带您深入探索如何选择最适合的5G网关品牌,并特别聚焦于东胜物联在5G网关领域的卓越表现。
KNX产品作为符合全球公认的家庭和楼宇自动化开放标准的设备和组件,其核心在于实现智能家居及建筑内部不同设备和系统间的无缝互操作和高效通信。KNX(Konnex)技术的广泛应用,推动了照明、供暖、通风、安全及能源管理等多领域的智能化与自动化进程,为用户提供了更为便捷、节能和舒适的生活与工作环境。
在安防行业,视频监控已经非常广泛,是无可替代的基础信息化设施。早期的视频监控只是简单的通过摄像机对画面进行记录,然后通过记录的画面服务入侵探测和震慑burglars。随着近年来人工智能技术的兴起,人们越来越希望利用AI计算机的运算能力和算法对视频监控画面进行分析,然后分析拍摄结果并自主反馈,以提高视频监控的功能和利用效率。比如我们目前可以使用AI的技术进行人脸识别、物体识别、火焰识别,安全帽...
在积极响应党的二十大及二十届二中、三中全会精神,深入实施《数字中国建设整体布局规划》的战略背景下,工业和信息化部正式发布了《关于推进移动物联网“万物智联”发展的通知》,标志着我国移动物联网发展迈入新阶段。《通知》的发布,强调了5G技术作为核心驱动力之一,将携手4G网络,共同构建一个更加高效、泛在、智能且安全的移动物联网生态体系,为各行业的数字化转型和社会治理的智能化升级提供坚实支撑。政策解读...
随着科技的飞速发展,无人机(UAV)作为现代科技的重要成果,已经从最初的军事领域逐步渗透到民用市场的各个角落。从热门的电子消费品到影视拍摄的得力助手,再到灾害救援、环保检测、电力巡检及农业生产等多领域的关键工具,无人机的应用领域日益广泛,市场需求也持续攀升。特别是在追求智能化、小型化、系统化的趋势下,无人机技术正经历着前所未有的变革。
蓝牙技术联盟 (SIG) 刚刚发布了其同名无线技术最新版本的核心规范。据该组织称,蓝牙核心规范版本 6.0引入了新功能并增强了现有功能。蓝牙技术作为无线连接的重要标准之一,不断推动着物联网、智能家居、可穿戴设备等领域的快速发展。为了进一步提升蓝牙技术的性能与功能,蓝牙技术联盟(SIG)近期发布了蓝牙6.0核心规范。这是自2016年蓝牙5标准推出以来,蓝牙技术迎来的又一次重大飞跃。蓝牙6.0...
KNX 网关广泛应用于家庭和楼宇自动化。KNX 网关可与家庭和楼宇自动化系统连接,实现集中控制和监控。双向通信使管理和接收来自 KNX 设备的状态更新变得简单,包括 KNX 执行器(例如灯开关)、控制器(例如恒温器)、传感器(例如湿度)。
RK3568与RK3588作为Rockchip的高性能芯片,在NVR开发领域展现出显著优势。RK3568凭借其低功耗下的高性能CPU、强大的GPU及NPU,有效支持视频处理与智能分析,同时丰富的接口和优化的能耗控制技术确保了系统稳定运行。而RK3588则在性能上更进一步,其增强的CPU与GPU能力,配合高效的AI加速器,为复杂多任务的NVR应用提供了更强大的算力支持。两款芯片均具备高度定制...
在本文中,我们将探讨不同类型的蓝牙网关及其分类,并提供一份指南,帮助您筛选出最适合您的物联网网关。
前言
建筑机器人中的全自动测量机器人市场正处于快速发展阶段,这得益于科技的不断进步以及测绘和建筑行业对高精度、高效率测量解决方案的迫切需求。随着国家政策的支持和市场需求的增长,以及建筑工人老龄化严重。测量机器人以其独特的优势,如高精度、智能化、自动化等,正逐步替代传统的人工测量方式,成为推动行业转型升级的重要力量。
蓝牙网关类型
我们将系统性地概述当前最为网关领域内最为常见与典型的几种类型的蓝牙网关,旨在为读者呈现一个全面而深入的理解框架。通过阅读后续章节,您不仅能够掌握多种蓝牙网关种类及其独特功能特性,为您的技术选型或应用实践提供坚实的理论基础与丰富的实践参考。
蓝牙网关是什么?如何才能提升您的物联网生态系统?本文对蓝牙网关的定义、功能以及不同功能特性进行了深入探讨,包括针对特定物联网应用的蓝牙版本、属性,以及无线和有线蓝牙网关的列表。本文旨在为寻找最佳蓝牙网关解决方案以满足各自需求和用例的人们提供全面指南。
蓝牙网关是什么?
AGV/AMR机器人在物流、汽车、3C及半导体、电商零售、新能源等多个行业展现出广阔的应用前景。嵌入式主板作为AGV移动充电机器人的智慧中枢,承载着整个系统的运行与管理重任。东胜物联凭借在嵌入式主板领域的深厚积累与创新能力,为AGV机器人产业提供嵌入式主板定制服务,为AGV产业提供了从硬件设计到BSP开发到软件应用及测试用例的全面支持。
本文深入剖析了AGV/AMR机器人的全产业链结构,从上游核心控制板厂商,到中游AI算法,再到下游丰富应用场景,旨在使读者能够全方位、多角度地了解AGV/AMR机器人,为企业的战略决策与技术创新提供有力支持
智能机器人控制板是智能机器人的核心大脑,驱动机器人高效运转并展现惊人的能力。本文讲述了智能机器人控制板的特点,以及为什么RK3588嵌入式主板是理想的机器人控制板解决方案。
在新能源汽车行业蓬勃发展的今天,充电问题成为了制约其普及与发展的重要瓶颈之一。传统充电桩的局限性,如分布不均、充电速度慢、用户体验差等痛点,让新能源车主在享受绿色出行的同时,也面临着诸多不便。与此同时,随着新能源汽车数量的快速增长,对充电设施的需求也日益迫切,如何提升充电效率、优化充电体验成为了行业亟待解决的问题。
公司
*
姓名
*
手机号
*
合作需求
*
邮箱
*
需求量
*
提交合作意向,免费获取开发文档
定制您的智能化需求
物联网网关开发人员

想要从硬件底层开发自己的 IoT 网关。点击下方了解有关 IoT 网关开发的更多信息。
物联网解决方案供应商

希望使用成熟的公有云平台构建自己的 IoT 应用程序。点击下方了解有关 IoT 应用程序开发的更多信息
智能家居终端用户

直接使用已开发成品网关+网络设备。点击下方查找更多产品。
全站搜索