DSGW-200 AOA SDK Quick Start Guide V1.0发表时间:2022-08-20 11:22
Development Document Document Name: AOA locator development Model Name: DSGW-200
1. Introduction1.1 Purpose& DescriptionDSGW-200 is indoor Locator for Bluetooth AoA Positioning. It can reach a positioning accuracy of 0.3-1 meters in the 2D plane. At the same time, it has the characteristics of low power consumption, low delay, low radiation and strong anti-interference. A signal locator can achieve 2D positioning. DSGW-200 is suitable for personnel tracking and real-time positioning of assets in smart healthcare, smart factories, smart factories, smart offices, and smart education. This document is mainly about delivering a simple guide for developers for AOA customized programming.
1.2 Hardware specificationSOC: RK3328 Quad-core ARM Cortex-A53 Mali-450MP2 GPU Power Supply: DC-5V LTE module: EG91 (LET CAT-1) Wi-Fi module: 6221A (Wi-Fi chip: RTL8821CS) Zigbee: EFR32MG1B232F256GM32 Z-wave: ZGM130S037HGN Bluetooth: EFR32BG21A020F768IM32 eMMC: 8GB SDRAM: 2BG
1 3 Equipment requirementsDSGW-200 DSBC-061 PC
BLE AoA positioning locator BLE AOA tags PC
2. Development guide2.1 Default configurationWhile gateway is in default configuration, user can download the mqtt-explorer to acquire the nearby AOA tag information.
2.2 Customized development of AOA programFor users prefer to develop on their own, Dusun also provide the AOA demo program along with the SDK for assisting customized development. You could follow the steps below to develop your own AOA program Flash the correct AOA gateway firmware from Dusun, following document Flash firmware on RK3328 AOA board.pdf
Log in the gateway using ssh with the IP address, default user name: root, password: root ssh root@<ip address of the gateway>
Enter the correct directory with command cd /home/dusun/aoa_locator/src/
Three folders stored in this directory, which are aoa_locator, aoa_positioning and sdk_v4.0. The content for these three folders are shown below, aoa_locator Sample code for a single locator aoa_positioning Sample code for multiple locator sdk_v4.0 Complete SDK files for further development
Take the single locator demo as an example, user can enter this folder ‘cd aoa_locator’ and type in ‘make’ to build the executable file
The executable file is stored in the ./exe/ directory
User can test about the check the parameters could be used in aoa_locator program by ./exe/aoa_locator -h
Then user can test about the program we just compiled by running it. But remember to stop the aoa service first to get rid of usb port reuse with command service aoa stop. Then close the program that is running kill -9 $(pidof aoa_locator) Then user can test the program by ./exe/aoa_locator/bin/aoa_locator -u /dev/ttyS1 -c /home/dusun/aoa_locator/config/locator_config_dusun.json -m 127.0.0.1 1883
It can be seen the program is running normally.
h) For further development, please refer to the header file in sdk_v4.0 folder.
2.3 Configuration of other modules2.3.1 Test Wi-Fi as APThe "ds_conf_ap.sh" script is for setting up Wi-Fi AP, SSID is "dsap", password is "12345678".
2.3.2 Test BG96bg96_dial.sh is used for BG96 dial.
You need to configure APN, username/password for BG96, in quectel-chat-connect 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 # #
2.3.3 Test LEDdsled program can be used to handle the LED function.
2.3.4 Test I2CActually LED controlled is I2C interface.
声明:此篇为东胜物联原创文章,转载请标明出处链接:https://www.hzdusun.com/h-nd-50.html
|