Wireless Bridge WiFi_LoRa 例程用户手册

[English]

Preparation

Hardware

  1. LoRaWAN Gateway in normal operation on the LoRaWAN server.

  2. Wireless Bridge.

  3. Micro USB cable.

Software

小技巧

It also supports the official Arduino framework of Espressif.

Uploading code

  1. Connect Wireless Bridge to your computer with a USB cable and open the Arduino IDE.

  2. Click Tools, select Wireless Bridge . To Region option based on your needs, both hardware support and the ability to communicate with the gateway.

  1. Follow the path shown to open the example “LoRaWANWiFi”

  • 将程序上传到开发板后,打开串行端口以查看网页的IP地址. 其中,”View page IP address”是用于将LoRa信息转发到WiFi的查看网页,而”Write page IP address”是用于将WiFi信息转发到LoRa的发送网页. 打开网页的设备必须与Wireless_Bridge位于同一局域网中.

  • 通过LoRa发送信息,接收到的数据将通过WiFi显示在网页上. 默认的网页刷新时间为10S,可以根据特定需要在 “setTimeout”函数中修改网页刷新时间.

  • 网页发布的信息将转发到LoRa,并且可以在节点数据中查看. 转发到LoRa的信息需要相应地进行解码.

  • 该示例的相应解码如下:

function Decode(fPort, bytes) {
  var charValue1= String.fromCharCode(bytes[0]);
  var charValue2= String.fromCharCode(bytes[1]);
  var charValue3= String.fromCharCode(bytes[2]);
  var charValue4= String.fromCharCode(bytes[3]);
  var charValue= charValue1 + charValue2 + charValue3 + charValue4;
  var result={
    
                                                "char":{
                                                "charValue":charValue,
                                                       }
  }
  return result;
}