Skip to content

Hardware tests

Eugeny Shlyagin edited this page Jan 17, 2024 · 2 revisions

After assembling the device, you can easily check the connection is correct.

Test sketches are located in folder https://github.com/Udj13/AGLoRa/tree/main/hardware-tests

GPS test

https://github.com/Udj13/AGLoRa/blob/main/hardware-tests/aglora-gps-test/aglora-gps-test.ino

If the connection is correct you will see information about your location.

LoRa test

https://github.com/Udj13/AGLoRa/blob/main/hardware-tests/aglora-lora-test/aglora-lora-test.ino

The sketch tries to set default values:

void setLoRaParameters(struct Configuration *configuration) {
  configuration->ADDL = 0x00;
  configuration->ADDH = 0x00;

  configuration->CHAN = 0x17;

  configuration->SPED.uartBaudRate = UART_BPS_9600;
  configuration->SPED.airDataRate = AIR_DATA_RATE_010_24;
  configuration->SPED.uartParity = MODE_00_8N1;

  configuration->OPTION.subPacketSetting = SPS_200_00;
  configuration->OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED;
  configuration->OPTION.transmissionPower = POWER_22;


  configuration->TRANSMISSION_MODE.enableRSSI = RSSI_DISABLED;
  configuration->TRANSMISSION_MODE.fixedTransmission = FT_TRANSPARENT_TRANSMISSION;
  configuration->TRANSMISSION_MODE.enableLBT = LBT_DISABLED;  // monitoring before data transmitted
  configuration->TRANSMISSION_MODE.WORPeriod = WOR_2000_011;
}

and then displays the set values. If they differ from the default ones, the LoRa module is not connected correctly.

Screenshot 2024-01-17 at 16 40 57

After settings it tries to send string "Test data" every 10 seconds, and receive data from other LoRa devices.

Clone this wiki locally