Arduino TinyGSM Library?

Would it be possible to produce an example of how to upload data using TinyGSM instead of WiFi? It seems the Arduino Library is hard coded for WiFi only.

What “Arduino Library” are we talking about and where do you infer that it is hardcoded with Wifi?

Hi Franky,

This one, I thought it was an “offical” development but apears not. I’ll post on their github.


The library mentioned looks pretty good, but seems to be very intertwined with the Esp Wifi SDK, so that might be more complex to tear apart? Maybe you can at least reuse the influx-line-protocol generator from this library?

I would rather go the other way starting from the TinyGSM library.
The biggest problem might be the HTTPS connection, if that works the rest is easy.
TinyGSM has a HttpsClient, I would start with that.

If this is all too complicated, I would think about using something simpler using a “proxy”. So for example MQTT and/or Telegraf in between.

Hi Frank,

Telegraf looks ideal, I’ll be sending fairly simple data so it shouldn’t be too difficult to write something for sending via UDP.

I have tried using the TinyGSM and ArduinoHTTPClient libraries to access my cloud account using https, without success. I have a MKRNB1500 with a ublox gsm module.

Here is the raw AT commands being sent to the modem, and its response, when it tries to open a socket with the cloud server address

13:3:20.187 -> AT+USOCO=0,"",443,1
13:3:20.219 -> 
13:3:20.219 -> OK
13:3:20.219 -> 
13:3:20.219 -> +UUSOCO: 0,167

From the docs of the gsm module, the error code returned from the modem (the 167 in the UUSOCO response above) means “ENSRBADNAME - Misformatted domain name”. It looks to me like the server name cannot be resolved properly. In fact, even a basic ping to this server address from the commands line fails with

gasagna@vega - ~$: ping
ping: cannot resolve Unknown host

Some help from InfluxDB team would be appreciated.

I would not expect a ping command to accept the “hostname”

The https:// on the front turns it from a hostname into a URL (or URI).

Try just “ping” instead.

That should tell you whether the DNS resolver your device is pointing at can
resolve the hostname, and also whether it can be reached by ICMP.

For what it’s worth, this is what I get with that command:

$ ping
PING ( 56(84) bytes of
64 bytes from (
icmp_req=1 ttl=105 time=24.4 ms
64 bytes from (
icmp_req=2 ttl=105 time=17.6 ms
64 bytes from (
icmp_req=3 ttl=105 time=19.8 ms

So for me, it does resolve and it does respond to ICMP.


Thanks for the tip. Using the hostname only, now I get

19:53:32.325 -> AT+USOCO=0,"",443,1
19:53:32.325 -> 
19:53:32.325 -> OK
19:53:33.537 -> 
19:53:33.537 -> +UUSOCO: 0,255

but the error code code 255 seems undocumented in the model docs. Any help would be appreciated.

You seem to be using a device which has far more capability in its AT command
set than any GSM modem I’ve ever come across, however I think you’re asking
for help with it in the wrong place.

This list / forum is for discussion about InfluxDB, and I doubt that anyone
here is going to know enough about your modem to help you get it to connect to
what just happens to be an InfluxDB server at the other end.

I suggest you either try to get the modem to connect to a standard HTTPS
website (and thereby eliminate any confusion or complication introduced by the
InfluxDB service) or ask on a forum more strongly orientated towards this
hardware, or similarly capable GSM devices in general.

Your problem seems to be one of network connectivity with this particular
device, not the higher-level service of InfluxDB.