-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TinyGSM on ESP32 only working with #define TINY_GSM_RX_BUFFER 2 #286
Comments
You're not getting more than two bytes at a time? That seems pretty unreasonable. What errors did you get at the end? Please post the AT/errors. |
Hi, I have the same problem with the similar hardware (ESP32 with SIM800L). When is conecting to MQTT and I view in server side, conection petition, but this is not finished, and conecction is dropped. Change library to 0.3.5 and apply this workarround #269 to compile, and works all againg.... The problem is with 0.6.2 and 0.7.4. Return code MQTT is 1 (Bad protocol) |
AT log? Debug prints? |
Hello together, here is my full log with a Buffer Size of 256: Initializing modem...[4031] ### TinyGSM Version: 0.7.4 OK OK OK OK +CPIN: READY OK SIM800 R14.18 OK +CREG: 0,5 OK SHUT OK OK OK OK OK OK OK +SAPBR: 1,1,"10.177.109.126" OK OK OK OK OK OK OK 10.177.109.126 OK OK 10.177.109.126 OK ERROR OK OK 1, CONNECT OK
DATA ACCEPT:1,32
DATA ACCEPT:1,17
DATA ACCEPT:1,21 +CIPRXGET: 4,1,0 OK +CIPSTATUS: 1,0,"TCP","212.237.59.104","80","CONNECTED" OK +CIPRXGET: 4,1,0 OK +CIPSTATUS: 1,0,"TCP","212.237.59.104","80","CONNECTED" OK +CIPRXGET: 4,1,633 OK AT+CIPRXGET=2,1,255 +CIPRXGET: 2,1,255,378 +CIPRXGET: 2,1,255,123 OK +CIPRXGET: 4,1,123 OK +CIPRXGET: 2,1,123,0
OK +CIPRXGET: 4,1,0 OK +CIPSTATUS: 1,0,"TCP","212.237.59.104","80","REMOTE CLOSING" OK OK +CIPRXGET: 4,1,0 OK +CIPSTATUS: 1,0,"TCP","212.237.59.104","80","REMOTE CLOSING" OK OK 1, CLOSE OK SHUT OK +SAPBR 1: DEACT OK Received: 0 bytes Here is the last part of the log for a buffer size of 2:[28848] ### READ: 1 from 1 +CIPRXGET: 2,1,1,79 OK +CIPRXGET: 4,1,79 OK +CIPRXGET: 2,1,1,78 OK +CIPRXGET: 2,1,1,77 OK +CIPRXGET: 2,1,1,76 +CIPRXGET: 2,1,1,75 OK +CIPRXGET: 2,1,1,74 OK +CIPRXGET: 2,1,1,73 +CIPRXGET: 2,1,1,72 OK +CIPRXGET: 2,1,1,71 +CIPRXGET: 4,1,71 OK +CIPRXGET: 2,1,1,70 +CIPRXGET: 2,1,1,69 OK +CIPRXGET: 2,1,1,68 +CIPRXGET: 2,1,1,67 OK +CIPRXGET: 2,1,1,66 +CIPRXGET: 2,1,1,65 +CIPRXGET: 2,1,1,64 +CIPRXGET: 2,1,1,63 OK +CIPRXGET: 4,1,63 OK +CIPRXGET: 2,1,1,62 +CIPRXGET: 2,1,1,61 OK +CIPRXGET: 2,1,1,60 OK +CIPRXGET: 2,1,1,59 +CIPRXGET: 2,1,1,58 +CIPRXGET: 2,1,1,57 +CIPRXGET: 2,1,1,56 OK +CIPRXGET: 2,1,1,55 +CIPRXGET: 4,1,55 OK +CIPRXGET: 2,1,1,54 +CIPRXGET: 2,1,1,53 +CIPRXGET: 2,1,1,52 +CIPRXGET: 2,1,1,51 +CIPRXGET: 2,1,1,50 +CIPRXGET: 2,1,1,49 OK +CIPRXGET: 2,1,1,48 +CIPRXGET: 2,1,1,47 OK +CIPRXGET: 4,1,47 OK +CIPRXGET: 2,1,1,46 OK +CIPRXGET: 2,1,1,45 +CIPRXGET: 2,1,1,44 OK +CIPRXGET: 2,1,1,43 OK +CIPRXGET: 2,1,1,42 +CIPRXGET: 2,1,1,41 OK AT+CIPRXGET=2,1,1 +CIPRXGET: 2,1,1,40 OK +CIPRXGET: 2,1,1,39 OK +CIPRXGET: 4,1,39 OK +CIPRXGET: 2,1,1,38 OK +CIPRXGET: 2,1,1,37 OK +CIPRXGET: 2,1,1,36 +CIPRXGET: 2,1,1,35 OK +CIPRXGET: 2,1,1,34 OK +CIPRXGET: 2,1,1,33 +CIPRXGET: 2,1,1,32 OK +CIPRXGET: 2,1,1,31 +CIPRXGET: 4,1,31 OK +CIPRXGET: 2,1,1,30 OK +CIPRXGET: 2,1,1,29 +CIPRXGET: 2,1,1,28 +CIPRXGET: 2,1,1,27 OK +CIPRXGET: 2,1,1,26 OK +CIPRXGET: 2,1,1,25 +CIPRXGET: 2,1,1,24 OK +CIPRXGET: 2,1,1,23 OK +CIPRXGET: 4,1,23 OK +CIPRXGET: 2,1,1,22 +CIPRXGET: 2,1,1,21 +CIPRXGET: 2,1,1,20 +CIPRXGET: 2,1,1,19 +CIPRXGET: 2,1,1,18 +CIPRXGET: 2,1,1,17 +CIPRXGET: 2,1,1,16 +CIPRXGET: 2,1,1,15 OK +CIPRXGET: 4,1,15 OK +CIPRXGET: 2,1,1,14 +CIPRXGET: 2,1,1,13 +CIPRXGET: 2,1,1,12 +CIPRXGET: 2,1,1,11 +CIPRXGET: 2,1,1,10 +CIPRXGET: 2,1,1,9 +CIPRXGET: 2,1,1,8 +CIPRXGET: 2,1,1,7 OK +CIPRXGET: 4,1,7 OK +CIPRXGET: 2,1,1,6 OK +CIPRXGET: 2,1,1,5 +CIPRXGET: 2,1,1,4 OK +CIPRXGET: 2,1,1,3 OK +CIPRXGET: 2,1,1,2 +CIPRXGET: 2,1,1,1 OK AT+CIPRXGET=2,1,1 +CIPRXGET: 2,1,1,0 OK +CIPRXGET: 4,1,0 OK +CIPSTATUS: 1,0,"TCP","212.237.59.104","80","REMOTE CLOSING" OK OK 1, CLOSE OK SHUT OK +SAPBR 1: DEACT OK Received: 121 bytes |
I tried the solution from @hardmax and it works, but this cannot be the solution. I think the newer version has some nice fixes and additions. |
I think this issue and #284 are different faces of the same problem. I don't think it's something related to the ESP32. I've modified the read to de-increment the sock_available as we read out, which should reduce/eliminate the number of I'd changed the read function to not attempt to read more characters than the response confirmed were available, but it seems the SIM800 occasionally lies about how much is available. I still need to think about how to deal with it. That didn't happen when I did some quick tests with the SIM800 before pushing the update. I'll try and test again somewhere with 2G service. |
Hello, i tried different approaches and all of them resulted in different output for the same code. I changed only TINY_GSM_RX_BUFFER from 1, 2, 16 and 1024 and each value produced different output from screen full of question marks to nothing at all . TinyGSM 0.7.4 ESP32 core 1.0.1. i used WebClient example for testing purposes. this is the output if i set buffer to 1024: this is the output if i set buffer to 2: hell⸮ (almost perfect, but misses "o" as in hello) This is the output if i set buffer to 16: Initializing modem... |
I'm sorry, guys. I've (hopefully) caught the issues now. I think it was all in the SIM800 and probably not on the ESP32 side. Can you try again with |
Good Morning, on monday i am back at home and will test the new version. Thanks for your help. Regards |
Its Working........ Reagards |
@fbeek - can I close this? |
Hello, sorry for my late response. Many thanks to you for your work. Regards |
Hi @SRGDamia1 , See: AT+CIPRXGET=2,0,568 This is where is get's stuck. The example that I am trying (HttpClient.ino) explicitly states that I might have to increase the buffer for things to work with esp8266. Maybe you could change the recommendation. I know to little of how this works to know whether that is correct or better to change something in code and keep the recommendation. Thanks in advance! |
TinyGSM version: 0.7.4
Hardware: ESP32 Dev Kit V1 with Framework 1.0.2 (1.0.1 also tested), Sim800L EVB
HardwareSerial 1 for AT commands.
Scenario, steps to reproduce
Iam trying to get the diagnostic and mqtt sketch to work. Lab Power Supply with 5V 4A is working nicely, so no VCC drops or resets.
Expected result
Passes http transfer test with 121 Bytes. And connect to mqtt
Actual result
I can only receive the complete data at the http test when I set #define TINY_GSM_RX_BUFFER 2. With larger buffer values I can only get a part of the 121 Bytes of the TINYGSM test logo file. I thought the ESP32 should have enough power and ram?
With this settings the MQTT Sketch is also not working.
In the command log there where no errors until the end. So i think it must be something in the ESP32 context.
Does Anyone have this lib working on an esp32
The text was updated successfully, but these errors were encountered: