Open yuzukihironaka-lefixea opened 10 months ago
Make sure that you call #define TINY_GSM_RX_BUFFER 1024
before #include<TinyGsmClient.h>
. That should be:
#define TINY_GSM_RX_BUFFER 1024
... // Any pre-define with library TinyGsmClient
#include<TinyGsmClient.h>
...
TinyGsm modem(SerialAT);
TinyGsmClient client(modem);
...
@animevietsub Thanks for the reply.
Yes, I call any pre-define before #include<TinyGsmClient.h>
in order as below.
// define TinyGsm
#define TINY_GSM_RX_BUFFER 1024
#define TINY_GSM_MODEM_SIM7500
#define SerialAT Serial1
// Pin assign
#define SIM_TX_PIN 17
#define SIM_RX_PIN 16
...
// include libraries
#include <TinyGsmClient.h>
#include <PubSubClient.h>
...
My understanding is that #define TINY_GSM_RX_BUFFER 1024
is called first.
#define
value is determined at the time of compiling, I wonder if it has something to do with the order of compiling?
What type of issues is this?
I defined
#define TINY_GSM_RX_BUFFER 1024
at the top ofmain.cpp
but it is not overridden.What are you working with?
Modem: SIM7500JC Main processor board: ESP32 with PlatformIO TinyGSM version: 0.11.7
Scenario, steps to reproduce
Define
#define TINY_GSM_RX_BUFFER 1024
onmain.cpp
.Monitor
.read()
with Oscilloscope.Expected result
About 600~800 bytes of data is received at one time.
The waveform is as follows.
Actual result
The data is not received at one time.
The waveform is as follows, it appears that the size of RX buffer remains 64 bytes.
In My project, the receive process needs to be complete within at least 50ms.
I've already set Baud Rate as
3686400
so I couldn't increace the Transrate Speed any more.If I edit
TinyGsmTCP.tpp
, it is comletely overridden.But the declaration in
main.cpp
should be prioritized over the declaration inTinyGsmTCP.tpp
.And also I couldn't obtain a stable connection that wrapped with
PubSubClient
orSSlClient
if I edit in this way.(I'm going to make new issue about this problem if this issue get solved)Thank you.