Open DirkO4YB opened 3 years ago
@DirkO4YB Hello Dear. I Assume this can be done for other implementations like Simcom 7600. Do you have some spare minutes to explain what troubles did you face during runtime? It would be a really helpful hand to my tryout. Thanks!
[x] I have read the Troubleshooting section of the ReadMe
What type of issue is this?
[ ] Request to support a new module
[ ] Bug or problem compiling the library [ ] Bug or issue with library functionality (ie, sending data over TCP/IP) [ ] Question or request for help [x] Prototype for extra functionality
What are you working with?
Modem: SIM800L EVB board (v2.2 5V) Main processor board: ESP8266 Wemos D1 pro, ESP8266 library latest (2.7.4) TinyGSM version: Latest (0.10.9) Code: see below
First of all thanks for making TinyGSM available, the only SIM800 library (out of many) that works for me!!
In https://github.com/vshymanskyy/TinyGSM/issues/458 , user pierreverbakel had asked for the option/function in TinyGSM for the modem to function as a server.
I have the same need, so i investigated that the function is not allready available. I investigated some more and came up with this solution to get it in, and for me it is, sort of, working.
So i am handing it to the project. But i am not an advanced programmer, the TinyGSM code is not even clear to me all the time. And i am newby on Github, no experience in pull requesting etc. Some work still probably needs to be done to make the code 'proper'. I am sure this can be easily be picked up by the maintainers, hence this request.
In my project with and SIM800L EVB board (the very cheap one) this works, sort of. Sort of, because regularly (several times per hour) the connection is dropped for reasons i can not find (as of yet).
I see that per https://github.com/vshymanskyy/TinyGSM/issues/481 this is a known problem, so perhaps we need to live with it?
As a work around, i call on function startModem() every minute in my loop to check and, if needed, reconnect. This will sometimes lead to a missed request, and a minute time to respond again after loss of connection.
Here is what i did:
In TinyGsmModem.tpp i put:
In TinyGsmClientSIM800.h :
Now in your program you can do:
In setup:
Function startModem:
In loop:
Function handleConnection: