I am new in IoT using Arduino. I am using a Sparkfun LTE Shield (LTE Cat M1/NB-IoT Shield Hookup Guide - SparkFun Learn), an Arduino UNO, and an AT&T simcard to send data to Thingspeak. I could able to register operator and also send SMS to my cellphone using the shield library (its first and second examples). However, its third example is sending and saving data to hologram. Since my simcard is not a hologram one, I do not know how to edit the code such that I would be able to send data to Thingspek (I made the field for my data and I have its Write API Key/Channel feed).
There may not be cut-and-paste-ready code for what you want to do, but your device can receive AT commands via a serial connection, and in the first half-dozen or so hits from that Google search I suggested, at least one shows how to post to Thingspeak using AT commands. All you need to do is connect the dots.
Thank you for your reply. You are right. I found a code based on AT commands for another cellular module. However, I think I need to find the AT commands for Ublox SARA for the SparkFun shield.
As you suggested I found some AT commands for this shield and they worked (Please look at the Arduino codes and LOG below). However, It seems "AT+UDNSRN" is not working correctly. I tested the command with the example that I found in the SARA-R4 series manual (https://www.u-blox.com/en/docs/UBX-17003787#[{"num"%3A2272%2C"gen"%3A0}%2C{"name"%3A"XYZ"}%2C59.527%2C572.677%2Cnull]). The IP address that I got for Google website (+UDNSRN: "142.251.40.132") is different from the one in the manual (+UDNSRN: "216.239.59.147"). Any idea to solve this issue?
Thank you for your reply. Actually, I wanted to test this command before using it to find IP address of "api.thingspeak.com". I found two different IPs using this command : "3.224.210.136","3.213.58.187" (also, nslookup command on CMD Windows gives me these IPs). Moreover, I found that some websites report "184.106.153.149" as Thingspeak's IP. I used the "AT+USOCO" on Arduino code for these three IPs:
I searched a lot and still searching to find out the solution. I will post it when I find it out.
Please share any ideas or suggestions with me in this regard.
Did you look at the AT commands manual way down at the bottom of the Sparkfun website for your device that you linked in your first post? Its examples for the AT+USOCO command show a completely different format than the way you did it.
I have already looked at the manual for the AT commands, but since I am new to AT commands, I do not know which format should I use. Actually, if I use the format similar to the one mentioned in the manual, I get the error below. Any idea which format should I have for my Arduino code?