Close

Firmware Update #1

A project log for 2021 HDP Dream Team: EJA

Learn more about Team EJA's intelligent buoy, and how their solution will help the global fight against ghost gear.

oluwatobi-oyinlolaOluwatobi Oyinlola 08/25/2020 at 12:250 Comments

The first firmware testing invoves setting up the LoRa environment by testing the communication between the two devices "Bouy and Onboard gateway", part of the programming parameters was to include SPI.h, and LoRa.h we shall use the includes details for the communciation and connection interface to the LoRa for both the onboard gateway and Bouy.

We also selected the frequency for the contry of deployment, for the testing we select 915Mhz during the testing purpose, but is eazyly adjustable from the code, or check out your country LoRaWAN frequency

For Bouy, it will print the details below if the connection was successful or failed.

// wait up to successfully LoRa initialization
  if (!LoRa.begin(frequency))
  {
    Serial.println("LoRa init failed. Check your connections.");
    // if failed, do nothing
    while (true);
  }

  Serial.println("LoRa init succeeded.");
  Serial.println();
  Serial.println("LoRa Simple Node");
  Serial.println("Only receive messages from Gateways");
  Serial.println("Tx: invertIQ disable");
  Serial.println("Rx: invertIQ enable");
  Serial.println();

 For Onboard Gateway, which is also similar with Bouy

  // wait up to successfully LoRa initialization
  if (!LoRa.begin(frequency))
  {
    Serial.println("LoRa init failed. Check your connections.");
    // if failed, do nothing
    while (true);
  }

  Serial.println("LoRa init succeeded.");
  Serial.println();
  Serial.println("LoRa Simple Gateway");
  Serial.println("Only receive messages from Nodes");
  Serial.println("Tx: invertIQ enable");
  Serial.println("Rx: invertIQ disable");
  Serial.println();

 And they both loop back a message that says "node is working" and "gateway is working" respectively

Discussions