构建

设置软件

关于树莓派的设置,请参见https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up


提示您可以通过插入显示器和键盘在本地访问树莓派,也可以通过SSH访问。

要通过SSH访问树莓派,您需要主机IP地址和高级网络扫描仪或Zenmap.要获取IP地址,请确保树莓派有以太网连接。使用网络扫描器或Zenmap扫描网络地址并找到Test Bench主机的IP地址。您也可以本地连接到树莓派,忽略ipconfig命令。

使用SSH/SFTP工具登录主机。可以使用WinSCP或MobaXterm工具。
常用的默认用户名和密码是:
用户名:π
密码:树莓

在树莓派上安装和测试的操作系统是Raspbian Buster Lite。最低版本要求如下:

图4:最小软件需求

为了满足使用测试台架的软件要求,请按照以下步骤操作。

注意:下面的设置说明是针对Linux环境的。

在命令行中依次输入以下命令:

sudo raspi-config——expand-rootfs

sudo apt-get更新

sudo apt-get升级

Sudo apt-get install libatas -base-dev libxslt1-dev screen python3-pip git autoconf libusb-1.0-0-dev python3-gpiozero

Sudo apt-get install python3-mpld3 python3-scipy

Sudo pip3安装numpy plotly matplotlib flask pycryptodome

上面的安装命令将在您的计算机上安装以下软件。所提到的版本是所需的最低版本。

表1:Linux环境的最低要求

安装所需的组件Pico网关,输入以下命令:

mkdir /home/pi/lora-net

cd /home/pi/lora-net

git克隆https://git.code.sf.net/p/dfu-util/dfu-util

git克隆https://github.com/Lora-net/picoGW_packet_forwarder.git

git克隆https://github.com/Lora-net/picoGW_mcu.git

git克隆https://github.com/Lora-net/picoGW_hal.git


cd /home/pi/lora-net/dfu-util

。/任务

. / configure

使

sudo make install

cd /home/pi/lora-net/picoGW_hal

使清洁所有

cd /home/pi/lora-net/picoGW_packet_forwarder

使清洁所有

的一个例子global_conf.json包货代,适用于US915频段。本例使用Semtech USB PicoCell网关连接到树莓派。为测试台架之目的gateway_ID字段必须配置,示例如下。

注意:如果您想使用EU868波段的测试台架,您将需要使用global_conf.json特定于该波段的文件。在下面的例子中要编辑的字段已突出显示。

Global_conf。json e

" SX1301_conf ": {

“lorawan_public”:没错,

“clksrc”:1、

“antenna_gain”:0,

" radio_0 ": {

“启用”:没错,

“类型”:“SX1257”,

“频率”:902700000,

“rssi_offset”:-164.0,

“tx_enable”:没错,

“tx_freq_min”:902000000,

“tx_freq_max”:928000000

},

" radio_1 ": {

“启用”:没错,

“类型”:“SX1257”,

“频率”:903400000,

“rssi_offset”:-164.0,

“tx_enable”:假的

},

" chan_multiSF_0 ": {

“启用”:没错,

“广播”:0,

“如果”:-400000

},

" chan_multiSF_1 ": {

“启用”:没错,

“广播”:0,

“如果”:-200000

},

" chan_multiSF_2 ": {

“启用”:没错,

“广播”:0,

“如果”:0

},

" chan_multiSF_3 ": {

“启用”:没错,

“广播”:0,

“如果”:200000

},

" chan_multiSF_4 ": {

“启用”:没错,

“广播”:1、

“如果”:-300000

},

" chan_multiSF_5 ": {

“启用”:没错,

“广播”:1、

“如果”:-100000

},

" chan_multiSF_6 ": {

“启用”:没错,

“广播”:1、

“如果”:100000

},

" chan_multiSF_7 ": {

“启用”:没错,

“广播”:1、

“如果”:300000

},

" chan_Lora_std ": {

“启用”:没错,

“广播”:0,

“如果”:300000年,

“带宽”:500000年,

“spread_factor”:8

},

" chan_FSK ": {

“启用”:假的,

“广播”:0,

“如果”:300000年,

“带宽”:250000年,

“datarate”:100000

},

" tx_lut_0 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:9,

“dig_gain”:3

},

" tx_lut_1 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:9,

“dig_gain”:3

},

" tx_lut_2 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:9,

“dig_gain”:3

},

" tx_lut_3 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:9,

“dig_gain”:3

},

" tx_lut_4 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:9,

“dig_gain”:3

},

" tx_lut_5 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:9,

“dig_gain”:3

},

" tx_lut_6 ": {

“pa_gain”:0,

“mix_gain”:6,

“rf_power”:11日

“dig_gain”:3

},

" tx_lut_7 ": {

“pa_gain”:0,

“mix_gain”:5

“rf_power”:13日

“dig_gain”:2

},

" tx_lut_8 ": {

“pa_gain”:0,

“mix_gain”:8

“rf_power”:14日

“dig_gain”:3

},

" tx_lut_9 ": {

“pa_gain”:0,

“mix_gain”:10

“rf_power”:15日

“dig_gain”:2

},

" tx_lut_10 ": {

“pa_gain”:0,

“mix_gain”:6,

“rf_power”:16日

“dig_gain”:1

},

" tx_lut_11 ": {

“pa_gain”:0,

“mix_gain”:9,

“rf_power”:17日

“dig_gain”:3

},

" tx_lut_12 ": {

“pa_gain”:0,

“mix_gain”:10

“rf_power”:18日

“dig_gain”:3

},

" tx_lut_13 ": {

“pa_gain”:0,

“mix_gain”:11日

“rf_power”:19日

“dig_gain”:3

},

" tx_lut_14 ": {

“pa_gain”:0,

“mix_gain”:12,

“rf_power”:20,

“dig_gain”:3

},

" tx_lut_15 ": {

“pa_gain”:0,

“mix_gain”:13日

“rf_power”:27岁

“dig_gain”:2

},

" gateway_conf ": {

“gateway_ID”:“0000000000000000, //在这里输入你想使用的GW ID。

“server_address”:“localhost”,

“serv_port_up”:1690年,

“serv_port_down”:1690年,

“keepalive_interval”:10

“stat_interval”:30,

“push_timeout_ms”:500年,

“forward_crc_valid”:没错,

“forward_crc_error”:假的,

“forward_crc_disabled”:假的

Baidu
map