-
Notifications
You must be signed in to change notification settings - Fork 729
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
SIM7600 SSL support 🤯 #767
base: master
Are you sure you want to change the base?
Conversation
Hello @Matt-Stedman-HardStuff, @Matt-Stedman |
@Lextan276 I've drafted an example here: https://github.com/Hard-Stuff/EXAMPLES-SIMCOM_OTA |
I was also working on implementing ssl support for the SIM7600. Are you aware that your added certificates have no effect on the connection? You need to enable authentication with the following AT command |
@floBik you're absolutely right! I actually got it working on HTTPS but without the certs, or something, but yeah it needed There's another branch I've got where I was trying to get MQTTS working over UDP as in the unsecure mode, but I'm still struggling to get that part working. But, in that branch I DO have the I've switched this MR to a draft and when I'm back from travelling I'll test the MQTTS functionality again, and either way I'll adjust the MR accordingly. |
Hello @Matt-Stedman-HardStuff , After some time I got the authentication working. I tested the CA authentication and also the client authentication successfully. For me it also works for MQTT with SSL while using the PubSubClient library. I have opened a pull request in your branch for my solution. If you have any questions or so feel free to message me. |
An additional note: some servers require a Server Name Indication (SNI), which is not currently supported by my Solution. This is because the SIM7600 only supports this feature from firmware version 2.0 ? earlier versions do not seem to be able to provide the SNI. If you want to use it and your firmware is able to do so, you need to enable it with the following AT command: |
added SSL authmode support for SIM7600 (#1)
@floBik Just confirmed your code works for both MQTTS and HTTPS. Currently works with AWS, doesn't work with Airtable HTTP (but I've consistently had issues with this even on WiFi), so I'm giving it a 👍 on my end! Thanks for the help, and nice work! |
@vshymanskyy @SRGDamia1 kindly requesting you to take a look at this PR if you've a moment! would unblock our team :D for others coming here, I was able to get a working HTTP client with SSL over LTE and Wifi by using this SSLClient library |
Hi all, I'm Matt (Ghost, above! Just been combining my GitHub accounts). I can confirm I've been using this PR for a few months now and @floBik you did an excellent job, works perfectly! @live-alchemy, if you're using platformio or similar you can temporarily make your dependency |
…m7672 Merging in SIM76xx SSL support from https://github.com/Hard-Stuff/TinyGSM/ See vshymanskyy#767
Thanks for this PR, it looks useful. However I've run into an issue which I think is a bug in this change:
Anyway, what happens is that you are doing one too many waitResponses for "+CIPOPEN". So the last one will always timeout, and it will also capture the "OK", so the following waitResponse() that is looking for that will also time out. This creates a significant delay every time modemGetConnected() is called - which is a lot. Before I added your PR, my connection and sending a few (non-SSL) MQTT messages would take about 7 seconds; with this bug it takes more like 60 seconds! Why did you change it from CIPCLOSE? That presents all the information that modemGetConnected() requires in a more compact form, and seems to work fine. |
This lib is smooth .. Thanks for the help 👍 .. For beginners like me sample working code HardwareSerial SerialAT(1);
Note: cherry pick it on top of 0.11.7 |
Thanks you two, I was able to connect to my API over SSL using |
#define TINY_GSM_MODEM_SIM7600 i run tinygsm https.ino and it gives error for tinygsmclientsecure this should be not in this scope why |
Hello, I've had the opportunity to test the changes proposed in PR #767, and everything is functioning well in my setup. I'm looking forward to seeing these enhancements in the main branch. Could you share any insights on when this PR might be merged into the main repository? Thank you for your efforts and looking forward to your feedback! |
What
Native SSL support for the SIM7600. Use in the same way you would for 7080:
In your runtime code, before making any requests, you may need to add
client.setCertificate(AWS_CERT_CA); // e.g. static const char AWS_CERT_CA[] PROGMEM = R"EOF(BEGIN CERTIFICATE-----...
You DO NOT! need any additional SSL libraries for this code to work!
Tested On
HttpsClient.ino
exampleKnown/Suspected Bugs