Problem with establishing an internet connection | Thales IoT Developer Community
January 20, 2020 - 11:31am, 5790 views
Hi.
I am trying to establish a Https GET connection using AT commands. I began by firstly setting up an internet connection profile using the following command. I used the "Configuring an Internet Connection Profile" example for my PLS62-W board ( orange terminal box ).
AT+COPS?+COPS: 0,0,"vodafone UK",0
OK
AT+CREG?+CREG: 0,1
AT+CGREG?+CGREG: 0,0
AT+CGDCONT=1,"IP","wap.vodafone.co.uk"OK
AT^SGAUTH=1,1,"wap","wap"OK
AT^SICA=1,1ERROR
I keep getting an error after everytime I try to activate PDP context 1.
Can you please highlight to me why this error keeps occuring?
Also, is there any way to know if I have an internet connection, and that the apn I enter is valid?
Thanks
Kav
done
Hi,
Thanks I have received the files.
Can you please just inform me of the steps you have taken to make the amazonaws.com_root_ca file you have sent me. I would like to reproduce it my self.
Many thanks
Hi,
I can now succesfully connect to AWS and send data using HTTP.
However, I am trying to publish data via MQTT to AWS using AT commands. I am aware that I will need to setup a MQTT client in my micro but unclear on how to use the AT commands to be able to publish/subscribe to a topic.
Any guidance would be appreciated.
Many thanks
Hello,
This module does not have MQTT protocol support. You may implement it in a MIDlet or your device that controls the PLS62-W moudle. As for AT commands there's a demo MIDlet application on our forum that you may try: https://iot-developer.thalesgroup.com/showcase/command-mqtt-client
As for certificate that I have sent you it was prepared by my collegue with a tool that is published here: https://iot-developer.thalesgroup.com/showcase/server-certificates-manager
It can extract root certificate and convert it. It's using this service - https://crt.sh/ The version that is currently published ***** some updates because of changes in the used service. The author is going to update it in the near future.
Regards,
Bartłomiej
Hello Bartłomiej,
Thanks for getting back to me. I would have utilised the MQTT Midlet client but the system I am currently building requires the certificates & the MQTT client to be housed in the Microcontroller.
I'm confused on how to use the TCP/IP AT command set to establish a connection and pub/sub to AWS broker using the MQTT client that I have setup in my NRF52 Nordic micrcontroller. I have went through the PLS62W AT command guide with no clear understanding of how to implement MQTT protocol.
Please correct me if I am wrong, but I am assuming that the MQTT MIDlet client uses the basic AT commands and simplifies the process to establish and pub/sub to a broker by creating several commands specific for MQTT.
Any guidance and support would be greatly appreciated.
Cheers
Kav
Hello Kav,
There's an article in the knowledge base with MQTT libraries adopted for the module's Java version together with a demo MIDlet. The AT command example is also using the same libraries but it additionally provides a custom AT command (there's a Java API with which anybody can implement and add the own AT commands - the commands are usable while the MIDlet is running). The command is described in the article. It is possible that the functionality that it provides may not meet your ***** of course.
If you want to use IP services over AT commands and secure TLS connection you have to store certificates for TLS handshake on the moudle. Then you can either send/receive data with AT commands or use the transparent connection to directly send receive data from your microcontroller. So you can use your MQTT implementation after the connection is established. There are examples for different connection types (including transparent sockets) in the AT commands specification document. There's one restriction regarding transparent connections - you get the bare socket and need to provide your own HTTP protocol implementation. But this would be easy for such a scenario.
You also have a possibility not to use IP services over AT commands at all. You can use the module as modem and establish PPP connection (please see ATD*99# command for more details) or WWAN connection (AT^SWWAN command) or use MBIM. But then your system would have to have its own TCP/IP stack implementation and the desired connection protocol, serve the TLS layer and host certificates for TLS conneciotn. It could be a good solution if you had for example Linux OS on your device.
IP services over AT commands provides you TCP/IP layer and basic HTTP(S) client. You only need to implement your data exchange on top of that (for example with MQTT).
Best regards,
Bartłomiej