GPS tracker, won’t update ever?

Hi guys ,

Got the gps tracker set up with the new code for gps tracking.

Once the device gets a valid gps signal it shoots it to my gateway and into my server , but after that it goes to sleep forever like sleeping beauty.

I’ll have to share the code when I come in, but the idea was every 30 minutes sending the gps data, unless it is new.

It is almost like if the position doesn’t change then it never sends another gps coord.

To add the cords are accurate, just only happens when I say “restart”.

Here is the Code:

**
 * @file GPS_Tracker.ino
 * @author rakwireless.com
 * @brief This sketch demonstrate a GPS tracker that collect location from a uBlox M7 GNSS sensor
 *    and send the data to lora gateway.
 *    It uses a 3-axis acceleration sensor to detect movement of the tracker
 * @version 0.2
 * @date 2021-04-30
 * 
 * @copyright Copyright (c) 2020
 * 
 * @note RAK4631 GPIO mapping to nRF52840 GPIO ports
   RAK4631    <->  nRF52840
   WB_IO1     <->  P0.17 (GPIO 17)
   WB_IO2     <->  P1.02 (GPIO 34)
   WB_IO3     <->  P0.21 (GPIO 21)
   WB_IO4     <->  P0.04 (GPIO 4)
   WB_IO5     <->  P0.09 (GPIO 9)
   WB_IO6     <->  P0.10 (GPIO 10)
   WB_SW1     <->  P0.01 (GPIO 1)
   WB_A0      <->  P0.04/AIN2 (AnalogIn A2)
   WB_A1      <->  P0.31/AIN7 (AnalogIn A7)
 */

#include <Arduino.h>
#include <LoRaWan-RAK4630.h> //http://librarymanager/All#SX126x
#include <SPI.h>
#include "SparkFunLIS3DH.h" //http://librarymanager/All#SparkFun-LIS3DH
#include "Wire.h"
#include <TinyGPS.h>        //http://librarymanager/All#TinyGPS

LIS3DH SensorTwo(I2C_MODE, 0x18);

TinyGPS gps;

String tmp_data = "";
int direction_S_N = 0;  //0--S, 1--N
int direction_E_W = 0;  //0--E, 1--W

// RAK4630 supply two LED
#ifndef LED_BUILTIN
#define LED_BUILTIN 35
#endif

#ifndef LED_BUILTIN2
#define LED_BUILTIN2 36
#endif

bool doOTAA = true;   // OTAA is used by default.
#define SCHED_MAX_EVENT_DATA_SIZE APP_TIMER_SCHED_EVENT_DATA_SIZE /**< Maximum size of scheduler events. */
#define SCHED_QUEUE_SIZE 60                     /**< Maximum number of events in the scheduler queue. */
#define LORAWAN_DATERATE DR_0                   /*LoRaMac datarates definition, from DR_0 to DR_5*/
#define LORAWAN_TX_POWER TX_POWER_5             /*LoRaMac tx power definition, from TX_POWER_0 to TX_POWER_15*/
#define JOINREQ_NBTRIALS 3                      /**< Number of trials for the join request. */
DeviceClass_t gCurrentClass = CLASS_A;          /* class definition*/
LoRaMacRegion_t gCurrentRegion = LORAMAC_REGION_US915;    /* Region:EU868*/
lmh_confirm gCurrentConfirm = LMH_UNCONFIRMED_MSG;          /* confirm/unconfirm packet definition*/
uint8_t gAppPort = LORAWAN_APP_PORT;                      /* data port*/

/**@brief Structure containing LoRaWan parameters, needed for lmh_init()
 */
static lmh_param_t lora_param_init = {LORAWAN_ADR_ON, LORAWAN_DATERATE, LORAWAN_PUBLIC_NETWORK, JOINREQ_NBTRIALS, LORAWAN_TX_POWER, LORAWAN_DUTYCYCLE_OFF};

// Foward declaration
static void lorawan_has_joined_handler(void);
static void lorawan_join_failed_handler(void);
static void lorawan_rx_handler(lmh_app_data_t *app_data);
static void lorawan_confirm_class_handler(DeviceClass_t Class);
static void send_lora_frame(void);

/**@brief Structure containing LoRaWan callback functions, needed for lmh_init()
*/
static lmh_callback_t lora_callbacks = {BoardGetBatteryLevel, BoardGetUniqueId, BoardGetRandomSeed,
                                        lorawan_rx_handler, lorawan_has_joined_handler, lorawan_confirm_class_handler, lorawan_join_failed_handler
                                       };
                                       
//OTAA keys !!!! KEYS ARE MSB !!!!
uint8_t nodeDeviceEUI[8] = {0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x33, 0x33};
uint8_t nodeAppEUI[8] = {0xB8, 0x27, 0xEB, 0xFF, 0xFE, 0x39, 0x00, 0x00};
uint8_t nodeAppKey[16] = {0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88};

// ABP keys
uint32_t nodeDevAddr = 0x260116F8;
uint8_t nodeNwsKey[16] = {0x7E, 0xAC, 0xE2, 0x55, 0xB8, 0xA5, 0xE2, 0x69, 0x91, 0x51, 0x96, 0x06, 0x47, 0x56, 0x9D, 0x23};
uint8_t nodeAppsKey[16] = {0xFB, 0xAC, 0xB6, 0x47, 0xF3, 0x58, 0x45, 0xC7, 0x50, 0x7D, 0xBF, 0x16, 0x8B, 0xA8, 0xC1, 0x7C};

// Private defination
#define LORAWAN_APP_DATA_BUFF_SIZE 64                     /**< buffer size of the data to be transmitted. */
#define LORAWAN_APP_INTERVAL 10000                        /**< Defines for user timer, the application data transmission interval. 10s, value in [ms]. */
static uint8_t m_lora_app_data_buffer[LORAWAN_APP_DATA_BUFF_SIZE];        //< Lora user application data buffer.
static lmh_app_data_t m_lora_app_data = {m_lora_app_data_buffer, 0, 0, 0, 0}; //< Lora user application data structure.

TimerEvent_t appTimer;
static uint32_t timers_init(void);
static uint32_t count = 0;
static uint32_t count_fail = 0;

void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);

  // Initialize Serial for debug output
  time_t timeout = millis();
  Serial.begin(115200);
  while (!Serial)
  {
    if ((millis() - timeout) < 5000)
    {
      delay(100);
    }
    else
    {
      break;
    }
  }

  // Initialize LoRa chip.
  lora_rak4630_init();

  Serial.println("=====================================");
  Serial.println("Welcome to RAK4630 LoRaWan!!!");
  if (doOTAA)
  {
    Serial.println("Type: OTAA");
  }
  else
  {
    Serial.println("Type: ABP");
  }

  switch (gCurrentRegion)
  {
    case LORAMAC_REGION_AS923:
      Serial.println("Region: AS923");
      break;
    case LORAMAC_REGION_AU915:
      Serial.println("Region: AU915");
      break;
    case LORAMAC_REGION_CN470:
      Serial.println("Region: CN470");
      break;
  case LORAMAC_REGION_CN779:
    Serial.println("Region: CN779");
    break;
    case LORAMAC_REGION_EU433:
      Serial.println("Region: EU433");
      break;
    case LORAMAC_REGION_IN865:
      Serial.println("Region: IN865");
      break;
    case LORAMAC_REGION_EU868:
      Serial.println("Region: EU868");
      break;
    case LORAMAC_REGION_KR920:
      Serial.println("Region: KR920");
      break;
    case LORAMAC_REGION_US915:
      Serial.println("Region: US915");
    break;
  case LORAMAC_REGION_RU864:
    Serial.println("Region: RU864");
    break;
  case LORAMAC_REGION_AS923_2:
    Serial.println("Region: AS923-2");
    break;
  case LORAMAC_REGION_AS923_3:
    Serial.println("Region: AS923-3");
    break;
  case LORAMAC_REGION_AS923_4:
    Serial.println("Region: AS923-4");
      break;
  }
  Serial.println("=====================================");

  //lis3dh init
  if (SensorTwo.begin() != 0)
  {
    Serial.println("Problem starting the sensor at 0x18.");
  }
  else
  {
    Serial.println("Sensor at 0x18 started.");
  // Set low power mode
  uint8_t data_to_write = 0;
  SensorTwo.readRegister(&data_to_write, LIS3DH_CTRL_REG1);
  data_to_write |= 0x08;
  SensorTwo.writeRegister(LIS3DH_CTRL_REG1, data_to_write);
  delay(100);

  data_to_write = 0;
  SensorTwo.readRegister(&data_to_write, 0x1E);
  data_to_write |= 0x90;
  SensorTwo.writeRegister(0x1E, data_to_write);
  delay(100);
  }
  //gps init

  pinMode(WB_IO2, OUTPUT);
  digitalWrite(WB_IO2, 0);
  delay(1000);
  digitalWrite(WB_IO2, 1);
  delay(1000);
  
  Serial1.begin(9600);
  while (!Serial1);
  Serial.println("gps uart init ok!");
  
  //creat a user timer to send data to server period
  uint32_t err_code;

  err_code = timers_init();
  if (err_code != 0)
  {
    Serial.printf("timers_init failed - %d\n", err_code);
    return;
  }

  // Setup the EUIs and Keys
  if (doOTAA)
  {
    lmh_setDevEui(nodeDeviceEUI);
    lmh_setAppEui(nodeAppEUI);
    lmh_setAppKey(nodeAppKey);
  }
  else
  {
    lmh_setNwkSKey(nodeNwsKey);
    lmh_setAppSKey(nodeAppsKey);
    lmh_setDevAddr(nodeDevAddr);
  }

  // Initialize LoRaWan
  err_code = lmh_init(&lora_callbacks, lora_param_init, doOTAA, gCurrentClass, gCurrentRegion);
  if (err_code != 0)
  {
    Serial.printf("lmh_init failed - %d\n", err_code);
    return;
  }

  // Start Join procedure
  lmh_join();
}

void loop()
{
  // Put your application tasks here, like reading of sensors,
  // Controlling actuators and/or other functions. 
}

/**@brief LoRa function for handling HasJoined event.
 */
void lorawan_has_joined_handler(void)
{
  if(doOTAA == true)
  {
  Serial.println("OTAA Mode, Network Joined!");
  }
  else
  {
    Serial.println("ABP Mode");
  }

  lmh_error_status ret = lmh_class_request(gCurrentClass);
  if (ret == LMH_SUCCESS)
  {
    delay(1000);
    TimerSetValue(&appTimer, LORAWAN_APP_INTERVAL);
    TimerStart(&appTimer);
  }
}
/**@brief LoRa function for handling OTAA join failed
*/
static void lorawan_join_failed_handler(void)
{
  Serial.println("OTAA join failed!");
  Serial.println("Check your EUI's and Keys's!");
  Serial.println("Check if a Gateway is in range!");
}
/**@brief Function for handling LoRaWan received data from Gateway
 *
 * @param[in] app_data  Pointer to rx data
 */
void lorawan_rx_handler(lmh_app_data_t *app_data)
{
  Serial.printf("LoRa Packet received on port %d, size:%d, rssi:%d, snr:%d, data:%s\n",
          app_data->port, app_data->buffsize, app_data->rssi, app_data->snr, app_data->buffer);
}

void lorawan_confirm_class_handler(DeviceClass_t Class)
{
  Serial.printf("switch to class %c done\n", "ABC"[Class]);
  // Informs the server that switch has occurred ASAP
  m_lora_app_data.buffsize = 0;
  m_lora_app_data.port = gAppPort;
  lmh_send(&m_lora_app_data, gCurrentConfirm);
}

void send_lora_frame(void)
{
  if (lmh_join_status_get() != LMH_SET)
  {
    //Not joined, try again later
    return;
  }

  lmh_error_status error = lmh_send(&m_lora_app_data, gCurrentConfirm);
  if (error == LMH_SUCCESS)
  {
    count++;
    Serial.printf("lmh_send ok count %d\n", count);
  }
  else
  {
    count_fail++;
    Serial.printf("lmh_send fail count %d\n", count_fail);
  }
  TimerSetValue(&appTimer, LORAWAN_APP_INTERVAL);
  TimerStart(&appTimer);
}

/**@brief Function for analytical direction.
 */
void direction_parse(String tmp)
{
    if (tmp.indexOf(",E,") != -1)
    {
        direction_E_W = 0;
    }
    else
    {
        direction_E_W = 1;
    }
    
    if (tmp.indexOf(",S,") != -1)
    {
        direction_S_N = 0;
    }
    else
    {
        direction_S_N = 1;
    }
}

/**@brief Function for handling a LoRa tx timer timeout event.
 */
String data = "";
void tx_lora_periodic_handler(void)
{ 
  float x = 0;
  float y = 0;
  float z = 0;

  bool newData = false;
  
  Serial.println("check acc!");
  x = SensorTwo.readFloatAccelX() * 1000;
  y = SensorTwo.readFloatAccelY() * 1000;
  z = SensorTwo.readFloatAccelZ() * 1000;
  data = "X = " + String(x) + "mg" + " Y = " + String(y) + "mg" + " Z =" + String(z) + "mg";
  Serial.println(data);
  data = "";
  if( abs(x-z) < 400)
  {
    // For one second we parse GPS data and report some key values
    for (unsigned long start = millis(); millis() - start < 1000;)
    {
      while (Serial1.available())
      {
        char c = Serial1.read();
        //Serial.write(c); // uncomment this line if you want to see the GPS data flowing
        tmp_data += c;
        if (gps.encode(c))// Did a new valid sentence come in?
          newData = true;
      }
    }
    direction_parse(tmp_data);
    tmp_data = "";
    float flat, flon;
    int32_t ilat, ilon;
    if (newData)
    {
      unsigned long age;  
      gps.f_get_position(&flat, &flon, &age);
      flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat;
      ilat = flat * 100000;
      flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon;//
      ilon = flon * 100000;
      memset(m_lora_app_data.buffer, 0, LORAWAN_APP_DATA_BUFF_SIZE);
      m_lora_app_data.port = gAppPort;
      m_lora_app_data.buffer[0] = 0x09;//09
      //lat data
      m_lora_app_data.buffer[1] = (ilat & 0xFF000000) >> 24;
      m_lora_app_data.buffer[2] = (ilat & 0x00FF0000) >> 16;
      m_lora_app_data.buffer[3] = (ilat & 0x0000FF00) >> 8;
      m_lora_app_data.buffer[4] =  ilat & 0x000000FF;
      if(direction_S_N == 0)
      {
        m_lora_app_data.buffer[5] = 'S';    
      }
      else
      {
        m_lora_app_data.buffer[5] = 'N';    
      }
      //lon data
      m_lora_app_data.buffer[6] = (ilon & 0xFF000000) >> 24;
      m_lora_app_data.buffer[7] = (ilon & 0x00FF0000) >> 16;
      m_lora_app_data.buffer[8] = (ilon & 0x0000FF00) >> 8;
      m_lora_app_data.buffer[9] =  ilon & 0x000000FF;
      if(direction_E_W == 0)
      {
        m_lora_app_data.buffer[10] = 'E';
      }
      else
      {
        m_lora_app_data.buffer[10] = 'W';
      }
      m_lora_app_data.buffsize = 11;
      send_lora_frame();
    }
    else
    {
      Serial.println("No Location Found");
      TimerSetValue(&appTimer, LORAWAN_APP_INTERVAL);
      TimerStart(&appTimer);
    }
  }
  else
  {
    Serial.println("Turn WisBlock with USB pointing up to start location search");
    TimerSetValue(&appTimer, LORAWAN_APP_INTERVAL);
    TimerStart(&appTimer);
  }
}

/**@brief Function for the Timer initialization.
 *
 * @details Initializes the timer module. This creates and starts application timers.
 */
uint32_t timers_init(void)
{
  TimerInit(&appTimer, tx_lora_periodic_handler);
  return 0;
}

Welcome to RAK forum @Wiseon3 ,

The code you use requires you to position the module to an specific orientation to start sending GPS signal. If it is lying flat on the table, it won’t transmit.

The part of the code doing that is this.

image

It checks the accelerometer values of x and z.

Hey there Carlrowan.

I do have it oriented in the upright position.

It receives a valad set of coords outside on my bird feeder pole ONCE, then never updates or resends the coords again.

The gateway is inside my house and about 10 feet from my front porch. The code runs once, the gets ‘accurate and new sentence’ once then theoretically every 30 seconds it should try to post the data. The second set of coords never comes through, its like the device just stops trying or goes to sleep like sleeping beauty.

Is it that it is waiting to receive a downlink towards it?

There is no special downlink needed on the board if you use that example code. Will there be a possibility that you can get back the board then we can check serial logs? Also, possibly output more data so we can troubleshoot better?

Uh, yeah, I can do that tonight.

But this is legit you guys code and it only spits out the gps cords once then never does it again.

This is all of the code. What else is there to troubleshoot other than it never sends another gps coord?

Compared to the older gps which did attempt to do it multiple times. Even though it was spitting out bad data most the time.

What other data do you want? please be clear.

Hi @Wiseon3 ,

I am not sure with your capabilities but when things like this doesn’t work as expected, there are factors that can cause it. Having UART/serial logs will let us know which part of the code is being executed and which is not. That’s why our first step is to check first what are the logs in the serial monitor. From checking those, I can be more specific and clear on what probably causing it :wink:

So I bought a 3.7V 1800mAh battery to plug into this thing, and i came home to find it impossible to get this thing to come back to life (no green blinky blinky).

So i disassembled it unplugged the solar cell, unplugged the battery…plugged it into my serial port. Vuala we have life!

Now its doing its thing inside my house, so prob take a while to get a accurate berrings.

What could cause a proper rated battery to make the device not function? Current sink too high?

1st gets recieved but never confirmed so it keeps getting lmh failure.

19:42:42.771 -> check acc!
19:42:42.771 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:42:42.771 -> lmh_send fail count 3
19:42:53.768 -> check acc!
19:42:53.768 -> X = 48.04mg Y = 960.78mg Z =-32.03mg
19:42:53.768 -> lmh_send fail count 4
19:43:04.769 -> check acc!
19:43:04.769 -> X = 48.04mg Y = 976.79mg Z =-16.01mg
19:43:04.769 -> lmh_send fail count 5
19:43:15.809 -> check acc!
19:43:15.809 -> X = 64.05mg Y = 976.79mg Z =-16.01mg
19:43:15.809 -> No Location Found
19:43:26.779 -> check acc!
19:43:26.779 -> X = 48.04mg Y = 960.78mg Z =-16.01mg
19:43:26.779 -> No Location Found
19:43:37.789 -> check acc!
19:43:37.789 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:43:37.789 -> No Location Found
19:43:48.779 -> check acc!
19:43:48.779 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:43:48.779 -> lmh_send fail count 6
19:43:59.819 -> check acc!
19:43:59.819 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:43:59.819 -> lmh_send fail count 7
19:44:10.809 -> check acc!
19:44:10.809 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:44:10.809 -> lmh_send fail count 8
19:44:21.794 -> check acc!
19:44:21.794 -> X = 48.04mg Y = 976.79mg Z =0.00mg
19:44:21.794 -> lmh_send fail count 9
19:44:32.829 -> check acc!
19:44:32.829 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:44:32.829 -> lmh_send fail count 10
19:44:43.815 -> check acc!
19:44:43.815 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:44:43.815 -> lmh_send fail count 11
19:44:54.819 -> check acc!
19:44:54.819 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:44:54.819 -> No Location Found
19:45:05.809 -> check acc!
19:45:05.809 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:45:05.809 -> lmh_send fail count 12
19:45:16.816 -> check acc!
19:45:16.816 -> X = 48.04mg Y = 960.78mg Z =0.00mg
19:45:16.816 -> lmh_send fail count 13
19:45:27.829 -> check acc!
19:45:27.829 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:45:27.829 -> lmh_send fail count 14
19:45:38.839 -> check acc!
19:45:38.839 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:45:38.839 -> lmh_send fail count 15
19:45:49.819 -> check acc!
19:45:49.819 -> X = 64.05mg Y = 976.79mg Z =-32.03mg
19:45:49.819 -> lmh_send fail count 16
19:46:00.846 -> check acc!
19:46:00.846 -> X = 48.04mg Y = 960.78mg Z =0.00mg
19:46:00.846 -> lmh_send fail count 17
19:46:11.840 -> check acc!
19:46:11.840 -> X = 64.05mg Y = 976.79mg Z =-16.01mg
19:46:11.840 -> lmh_send fail count 18
19:46:22.849 -> check acc!
19:46:22.849 -> X = 64.05mg Y = 944.77mg Z =-16.01mg
19:46:22.849 -> lmh_send fail count 19
19:46:33.835 -> check acc!
19:46:33.835 -> X = 48.04mg Y = 960.78mg Z =0.00mg
19:46:33.835 -> lmh_send fail count 20
19:46:44.852 -> check acc!
19:46:44.852 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:46:44.852 -> lmh_send fail count 21
19:46:55.839 -> check acc!
19:46:55.839 -> X = 48.04mg Y = 960.78mg Z =-16.01mg
19:46:55.839 -> lmh_send fail count 22
19:47:06.861 -> check acc!
19:47:06.861 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:47:06.861 -> lmh_send fail count 23
19:47:17.859 -> check acc!
19:47:17.859 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:47:17.859 -> lmh_send fail count 24
19:47:28.873 -> check acc!
19:47:28.873 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:47:28.873 -> lmh_send fail count 25
19:47:39.887 -> check acc!
19:47:39.887 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:47:39.887 -> lmh_send fail count 26
19:47:50.879 -> check acc!
19:47:50.879 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:47:50.879 -> lmh_send fail count 27
19:48:01.869 -> check acc!
19:48:01.869 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:48:01.869 -> lmh_send fail count 28
19:48:12.859 -> check acc!
19:48:12.859 -> X = 48.04mg Y = 960.78mg Z =-32.03mg
19:48:12.859 -> lmh_send fail count 29
19:48:23.869 -> check acc!
19:48:23.869 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:48:23.869 -> lmh_send fail count 30
19:48:34.899 -> check acc!
19:48:34.899 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:48:34.899 -> lmh_send fail count 31
19:48:45.873 -> check acc!
19:48:45.873 -> X = 48.04mg Y = 960.78mg Z =0.00mg
19:48:45.873 -> lmh_send fail count 32
19:48:56.869 -> check acc!
19:48:56.869 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:48:56.869 -> lmh_send fail count 33
19:49:07.913 -> check acc!
19:49:07.913 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:49:07.913 -> lmh_send fail count 34
19:49:18.908 -> check acc!
19:49:18.908 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:49:18.908 -> lmh_send fail count 35
19:49:29.899 -> check acc!
19:49:29.899 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:49:29.899 -> lmh_send fail count 36
19:49:40.909 -> check acc!
19:49:40.909 -> X = 64.05mg Y = 976.79mg Z =-16.01mg
19:49:40.909 -> lmh_send fail count 37
19:49:51.912 -> check acc!
19:49:51.912 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:49:51.912 -> lmh_send fail count 38
19:50:02.890 -> check acc!
19:50:02.890 -> X = 48.04mg Y = 960.78mg Z =-16.01mg
19:50:02.890 -> lmh_send fail count 39
19:50:13.899 -> check acc!
19:50:13.899 -> X = 64.05mg Y = 976.79mg Z =-16.01mg
19:50:13.899 -> lmh_send fail count 40
19:50:24.895 -> check acc!
19:50:24.895 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:50:24.895 -> lmh_send fail count 41
19:50:35.929 -> check acc!
19:50:35.929 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:50:35.929 -> lmh_send fail count 42
19:50:46.919 -> check acc!
19:50:46.919 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:50:46.919 -> lmh_send fail count 43
19:50:57.929 -> check acc!
19:50:57.929 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:50:57.929 -> lmh_send fail count 44
19:51:08.919 -> check acc!
19:51:08.919 -> X = 64.05mg Y = 976.79mg Z =0.00mg
19:51:08.919 -> lmh_send fail count 45
19:51:19.934 -> check acc!
19:51:19.934 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:51:19.934 -> lmh_send fail count 46
19:51:30.920 -> check acc!
19:51:30.920 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:51:30.920 -> lmh_send fail count 47
19:51:41.919 -> check acc!
19:51:41.919 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:51:41.919 -> lmh_send fail count 48
19:51:52.929 -> check acc!
19:51:52.929 -> X = 64.05mg Y = 960.78mg Z =0.00mg
19:51:52.929 -> lmh_send fail count 49
19:52:03.945 -> check acc!
19:52:03.945 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:52:03.945 -> lmh_send fail count 50
19:52:14.949 -> check acc!
19:52:14.949 -> X = 48.04mg Y = 960.78mg Z =-16.01mg
19:52:14.949 -> lmh_send fail count 51
19:52:25.969 -> check acc!
19:52:25.969 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:52:25.969 -> lmh_send fail count 52
19:52:36.960 -> check acc!
19:52:36.960 -> X = 64.05mg Y = 976.79mg Z =-32.03mg
19:52:36.960 -> lmh_send fail count 53
19:52:47.960 -> check acc!
19:52:47.960 -> X = 48.04mg Y = 976.79mg Z =-16.01mg
19:52:47.960 -> lmh_send fail count 54
19:52:58.959 -> check acc!
19:52:58.959 -> X = 48.04mg Y = 960.78mg Z =-16.01mg
19:52:58.959 -> lmh_send fail count 55
19:53:09.950 -> check acc!
19:53:09.950 -> X = 48.04mg Y = 960.78mg Z =-16.01mg
19:53:09.950 -> lmh_send fail count 56
19:53:20.955 -> check acc!
19:53:20.955 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:53:20.955 -> lmh_send fail count 57
19:53:31.979 -> check acc!
19:53:31.979 -> X = 48.04mg Y = 976.79mg Z =0.00mg
19:53:31.979 -> lmh_send fail count 58
19:53:42.952 -> check acc!
19:53:42.952 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:53:42.952 -> lmh_send fail count 59
19:53:53.989 -> check acc!
19:53:53.989 -> X = 64.05mg Y = 960.78mg Z =-16.01mg
19:53:53.989 -> lmh_send fail count 60
19:54:04.989 -> check acc!
19:54:04.989 -> X = 64.05mg Y = 976.79mg Z =-16.01mg
19:54:04.989 -> lmh_send fail count 61

Okay, I set ADR to off and set DR_1 instead of DR_0

I have established a variable that defines the app delay. This will start off as 10 seconds until a proper value is recieved and transmitted then get updated to 60 minutes, or 1 hour.

The only thing i need help with now is the fact that the battery seems to overload it.

Hi @Wiseon3 ,

Does the DR_1 helped and let you pass uplinks? Are you operating in US915?

Regarding the battery, if it is a standard LiPo 3.7 whose maximum voltage is 4.2v, it won’t be able to overload it. The regulator will maintain its supply to the board at 3.3v.

With the solar panel, the size wont overload it as well as long as the maximum output voltage wont exceed 6v. The charger IC will regulate the current going to the battery.

Yes, the DR_1 helped and let me pass the remaining uplinks. I am operating in US915.

Oh, well that is good. Seems it was just in need of a hard reset perhaps. I’ll get it reinstalled and up and running tomorrow!

Thanks.

1 Like

That is a current issue with US915. When the unit operates at DR0, there are some issues within the size of the packet. As you know, DR0 will limit the payload you can send.

I hope the new setup will work perfectly now :white_check_mark: