Git Product home page Git Product logo

a76xx's People

Contributors

gasagna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

a76xx's Issues

Modem Performance degrades over time, trying to figure out why!

I've had two of these boards running since the beginning of november. They are supposed to upload data every other second (30 times per minute). And in the beginning, this was working fine: No problems at all with upload times being 900-1100 ms. We can live with that.

But now we are experiencing lots of dropouts and high upload times. Switching the SIM-card from an "old" board into a new board (running the same code) gives stable uploads and low upload times as expected.

What could cause the boards to deteriorate like this? Is there something we can do to avoid it?

I was wondering if this could be a result for degrading flash memory . Looking into your examples like SaveCertificates.ino, it seems that the certificate needs to be written as a file somewhere (on the ESP32? or the modem?). How often does this happen?

In the ToDo-list it seems that the overwriting should not occur anymore, but I have a hard time figuring out if this is the case. The certOverwrite function overwrites no matter what (but perhaps that is intended):

    // delete certificate if exists, then download
    int8_t certOverwrite(const char* cert, const char* certname) {
        int8_t retcode;

        if (certExists(certname)) {
            retcode = certDelete(certname);
            A76XX_RETCODE_ASSERT_RETURN(retcode);
        }

        retcode = certDownload(cert, certname);
        A76XX_RETCODE_ASSERT_RETURN(retcode);

        return retcode;
    }

Our code only connects to one server, and (hopefully) using the same certificate over and over again.

This library is still very impressive, and it's massive. I might be overlooking something but what?

HTTPS does not work for some sites

It might be that I'm missing something.

Using the supplied test site, same as on the lilygo repo, worked fine:

const char* server_name   = "vsh.pp.ua";
const char* path          = "TinyGSM/logo.txt";
const int   server_port   = 443;
const bool  use_ssl       = true;

However, using other SSL protected sites, like httpbin.org for testing, does not:

const char* server_name   = "httpbin.org";
const char* path          = "get?parameter1=response1;

...gives errors:

Get resource  ... AT+HTTPPARA="URL","https://httbin.org:443/get?parameter1=Response1"

OK
AT+HTTPPARA="USERDATA","User-Agent:A7608E-test/0.0.1"

OK
AT+HTTPACTION=0

OK

+HTTPACTION: 0,715,0Done
AT+HTTPHEAD


ERROR
Failed to read header. Code: -2
AT+HTTPREAD=0,0

ERROR
Failed to read body. Code: -2
Received: 715

Header
----------



Body
----------


Stopping HTTP service ... AT+HTTPTERM

OK
done

What did expect was something like this (using cUrl):

{
  "args": {
    "parameter1": "response1"
  },
  "headers": {
    "Accept": "*/*",
    "Host": "httpbin.org",
    "User-Agent": "curl/8.0.1",
    "X-Amzn-Trace-Id": "Root=1-650ff1f5-55b2627229c72fdf377fa71b"
  },
  "origin": "***removed***",
  "url": "https://httpbin.org/get?parameter1=Response1"
}

There's a 97% chance I'm doing something wrong, but what?
It could be that I'm missing a header content-type, but I can't figure out how to set that (and I tested cUrl without that header too).

Can't do HTTP POST with xTaskCreatePinnedToCore

I'm stuck on creating a task that can upload data in parallell to gathering data. I can't for the life of me not get this to work. When the task ("gathering data" and "sending data") are running on the same core, everything works. When both are running on Core 0 or on different cores, it does not work, for some reason.

When they run on different cores, the upload (http.post()) halts the operation and I get errors (post error -2 among them).

In the function SendMessage() I create a task for uploading the jsonString:

  char *msg = (char *)jsonString.c_str();
  xTaskCreatePinnedToCore(
      SendJson,   /* Function to implement the task */
      "SendJSON", /* Name of the task */
      10000,      /* Stack size in bytes */
      msg,        /* Task input parameter */
      9,          /* Priority of the task */
      NULL,       /* Task handle. */
      0);         /* Core where the task should run */

---
void SendJson(void *parameter)
{
  //String data = *((String *)parameter);
  char *data = (char *)parameter;
  Serial.println(data);
  lte_post(data);
  vTaskDelete(NULL);
}

... in setup() I create two tasks, one that reads the queue every 2 second and uploads it (using the task above) and one that creates random messages.

    xTaskCreatePinnedToCore(
        SendMessagesTask,   /* Function to implement the task */
        "SendMessagesTask", /* Name of the task */
        10000,              /* Stack size in bytes */
        NULL,               /* Task input parameter */
        1,                  /* Priority of the task */
        NULL,               /* Task handle. */
        1);                 /* Core where the task should run */

    xTaskCreatePinnedToCore(
        CreateMessagesTask,   /* Function to implement the task */
        "CreateMessagesTask", /* Name of the task */
        10000,                /* Stack size in bytes */
        NULL,                 /* Task input parameter */
        1,                    /* Priority of the task */
        NULL,                 /* Task handle. */
        0);                   /* Core where the task should run */

These tasks can be on different cores. but it's crucial that CreateMessagesTask and the SendJson task is on the same Core0, but it does not matter if it's on core 0 or 1.

No matter what I do I can't get the creating/gathering of data to run in parallell with sending on a different core. Is there some limitations of this library or the A7608 modem?

The code I'm using is attached:
code.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.