Low-level C for PIC and Telit GL865


#1

Hi,

I am trying to use a pic microcontroller combined with a 3G Telit GL865 module to send data to hologram dashboard. I already have a hologram global sim card.

It is not clear how I can send data using low-level C and AT commands to communicate with Hologram Dashboard.

I have seen Arduino and python libraries, but do you guys have any example with bare C code? Could someone help me?

Here is what I already found:

I found the documentation about the low level ip endpoint here:

Blockquote

LOW-LEVEL IP ENDPOINT
OUR LOW-LEVEL, NON-REST TCP/IP API ENDPOINT (CHARACTERS SENT AND RECEIVED OVER LOW-LEVEL SOCKET CONNECTIONS) ALLOWS DEVICES TO CONSUME VERY MINIMAL DATA COMPARED TO REST AND HTTP

IP: 23.253.146.203 (cloudsocket konekt io), Port: 9999

Blockquote

I also found this post, where an Http post was used to solve a similar problem: Compatibility with Libelium Plug and Sense (Telit LE910-NAG 4G module)?

I found a project where they implemented GSM with PIC 18f4550 to send data via SIM900 directly to thingspeak. Is this example similar to sending data to hologram dashboard? Here is the link: https://www.electronicwings.com/pic/pic18f4550-interface-with-sim900a-gprs

Thank you


#2

It is not clear how I can send data using low-level C and AT commands to communicate with Hologram Dashboard

This is really module dependent, basically Hologram defines the endpoint interface here https://hologram.io/docs/reference/cloud/embedded/ specifying to use TCP to which port and url and how to format the data. How to accomplish this is very dependent on your system. Basically the set of AT commands will be different depending on if you use a U-Blox Sara R4 module, U-Blox U2 module, Telit module, SIMCOM module, etc.

There are basically two parts you need to get a solution:

  1. which AT commands in what order do I need to use with a Telit GL865 to register on the cellular network and create a tcp connection to a url. For looking up examples, the modem is what is important, any url is fine, similarly Arduino code or even python code would be fine as long as they use AT commands, you are just looking for hte AT command sequence.
  2. how to send AT commands on a PIC MCU. This is basically just how to handle two way communication over UART. The Arduino library extracts some of the lower level hardware api calls to use the MCU uarts, you will have to look up the PIC specific commands to send receive data from UART and work out message timeouts / buffer sizes / etc. to handle the AT commands you found in (1).

Your sim900 example is similar to what you need although the AT commands may be somewhat different (due to different module). It looks like thingspeak uses HTTP where hologram uses JSON over TCP. Looking at their TCP SEND screenshot, to send to Hologram vs thingspeak only 2 lines need to change:

instead of
AT+CIPSTART="TCP","api.thingspeak.com","80"
use:
AT+CIPSTART="TCP","cloudsocket.hologram.io","999"

and instead of:
> GET /update?api_key=...&field1=1
use:
> {"k":"ABCDWXYZ","d":"Hello, World!","t":"TOPIC1"}


closed #3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.