Hi
Recently, there have been a few posts / PMs from forum members regarding sending data over cellular networks to ThingSpeak, MQTT brokers and such like.
Whilst Flowcode has a GSM component, it isn't without issue and I documented some discrepencies I found in the "old forum". I'm hesitant to call them "bugs" as the module used is considered old (and obsolete in certain countries) and it is most likely that the manufacturer changed their firmware somewhere down the line.
In addition, modules such as the SIM800 ran over the 2G network. Depending on which country you live in, you may find that both 3G and 2G networks have now been retired meaning no service. In the UK most network operators have already retired their 3G systems, but major ones such as Vodafone / EE / O2 are committed to 2G until the official end in 2033 (well Vodafone has stated such, others say they will phase out in coming years). Some operators that "piggy back" on these networks (an example being GiffGaff but others are available) offer SIMs that will work on 2G too, but not all do.
Therefore there is a keen interest in using more modern modules that utilise 4G networks such as the SIM7600.
Chatting with Martin (mnfisher), rather than trying to create components, we thought it may instead be helpful to create a framework illustrating "how to" that those interested could customise to their own need. Basically documenting the steps required with examples.
We have no particular time-frame for this, adding when we can, so it will be an ongoing post and please feel free to contribute. There are many ways to achieve the same result so do not think that anything we may post is the only way. We only hope to provide a working guide so consider any post "work in progress".
Between us we have SIM800, SIM900, SIM7600, a HW Kitchen GSM Playground shield (which uses a GE863-Quad) modules so we will start with these. As I have a "credit" with a well known supplier I have ordered a 7670E too, which I suspect will be similar to the 7600. These all use "AT" commands to control and communicate, so any microcontroller with a UART will be able to interface and utilise.
When I explored the SIM800 a few years back, to understand what commands needed to be sent and what reply to expect, I used a USB to Serial converter and a terminal program to connect my laptop directly to the module. Once I established what needed to be sent / captured it was a simple matter to then create code using Flowcode. I expect I'll use a similar approach for the other modules.
As a start I have dug out the guide I created a few years back and updated for FCv10. I will post next.
Regards
Sending Data over Cellular Networks
-
- Valued Contributor
- Posts: 1528
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sending Data over Cellular Networks
Hi
Following on, this guide is from the "old forum" updated to use FCv10.
Using a SIM800L it connects to and updates ThingSpeak, but is easily modified to update any similar service that uses API keys such as PushingBox for example.
The chart first needs you to enter specific information such as your APN obtained from your Network Operator, Host and your unique API Key. I used E-Blocks as they provide a very convenient platform to develop, but you can use anything you want, and can even omit components if you don't need them. Although coded for a PIC16F1939 (probably because it was in my programmer already), Flowcode makes it easy to change to pretty much any other target. As I only use the UART to send / receive it should be easily modifiable for almost any microcontroller.
The SIM800 can be a little "quirky" and there are many posts on the internet regarding such. My only real issue is with regards to powering the module. Datasheet suggests it can operate between 3.4 and 4.4v but I have great difficulty in getting the module to register using less than 4.2v. This could be just poor build quality in the module, it did come from a well know cheap supplier. It can, although I have never measured such, draw up to 2A (so they claim) so you will need a supply capable of such. Don't use jumpers to a breadboard for powering the module, wire direct to supply (with appropriate protection) as this can waste a lot of your time waiting to register.
Download the appropriate datasheets and the "AT Command Guide" as these will be invaluable.
The attached .pdf lists some of the more useful commands with a very brief description, then it lists in order the steps I took to connect to and update a ThingSpeak channel. Using these I then created my Flowcode chart. I stress that this is just a guide and you will most likely need to modify it to suit your requirements. I connected the SIM800 directly to my PC using a USB-TTL converter which allowed me to interact using a Terminal program. I use "Terminal by Br@dy" as it allows me to create Macros, but any should work such as PuTTY or HyperTerminal.
The chart is mainly to illustrate each of the steps. In it the E-Block Combo Board is initialised and the display is used to inform of progress, the Sensor to update values to be sent, and the Buttons to instigate an update. The UART RxINT is used to populate a Circular Buffer as this ensures nothing is missed.
I used Switch command icons to move through each step. The "0" branch looked for the appropriate reply to a command being sent, resetting the process if timed out or an incorrect response is obtained. If the correct response is obtained it moved on to the next step. Hopefully pretty self explanatory. Again I stress that this is just a guide and you will no doubt need to modify to suit your particular application and indeed a "proper" programmer could make this far more efficiant
Hopefully of some help.
Regards
Following on, this guide is from the "old forum" updated to use FCv10.
Using a SIM800L it connects to and updates ThingSpeak, but is easily modified to update any similar service that uses API keys such as PushingBox for example.
The chart first needs you to enter specific information such as your APN obtained from your Network Operator, Host and your unique API Key. I used E-Blocks as they provide a very convenient platform to develop, but you can use anything you want, and can even omit components if you don't need them. Although coded for a PIC16F1939 (probably because it was in my programmer already), Flowcode makes it easy to change to pretty much any other target. As I only use the UART to send / receive it should be easily modifiable for almost any microcontroller.
The SIM800 can be a little "quirky" and there are many posts on the internet regarding such. My only real issue is with regards to powering the module. Datasheet suggests it can operate between 3.4 and 4.4v but I have great difficulty in getting the module to register using less than 4.2v. This could be just poor build quality in the module, it did come from a well know cheap supplier. It can, although I have never measured such, draw up to 2A (so they claim) so you will need a supply capable of such. Don't use jumpers to a breadboard for powering the module, wire direct to supply (with appropriate protection) as this can waste a lot of your time waiting to register.
Download the appropriate datasheets and the "AT Command Guide" as these will be invaluable.
The attached .pdf lists some of the more useful commands with a very brief description, then it lists in order the steps I took to connect to and update a ThingSpeak channel. Using these I then created my Flowcode chart. I stress that this is just a guide and you will most likely need to modify it to suit your requirements. I connected the SIM800 directly to my PC using a USB-TTL converter which allowed me to interact using a Terminal program. I use "Terminal by Br@dy" as it allows me to create Macros, but any should work such as PuTTY or HyperTerminal.
The chart is mainly to illustrate each of the steps. In it the E-Block Combo Board is initialised and the display is used to inform of progress, the Sensor to update values to be sent, and the Buttons to instigate an update. The UART RxINT is used to populate a Circular Buffer as this ensures nothing is missed.
I used Switch command icons to move through each step. The "0" branch looked for the appropriate reply to a command being sent, resetting the process if timed out or an incorrect response is obtained. If the correct response is obtained it moved on to the next step. Hopefully pretty self explanatory. Again I stress that this is just a guide and you will no doubt need to modify to suit your particular application and indeed a "proper" programmer could make this far more efficiant

Hopefully of some help.
Regards
Re: Sending Data over Cellular Networks
Hi
Still working on my holiday home security project.
I tested GSM_SIM7000SA-H_(Au) module one year ago.
My goal was to send the sms to my mobile phone.
Worked OK.
Note: the module Sim7000G(global) is different from SIM7000SA-H.
Important to buy the module designed for your country.
To receive sms on my mobile phone I used the program SMS Templates.
Still working on my holiday home security project.
I tested GSM_SIM7000SA-H_(Au) module one year ago.
My goal was to send the sms to my mobile phone.
Worked OK.
Note: the module Sim7000G(global) is different from SIM7000SA-H.
Important to buy the module designed for your country.
To receive sms on my mobile phone I used the program SMS Templates.
- Attachments
-
- FC8_GSM_manual.pdf
- (894.44 KiB) Downloaded 16 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sending Data over Cellular Networks
Hi Viktor
Using the SIM800L I could create Flowcode charts to both send and receive SMS messages. Depending on how you setup the module (i.e. which AT commands you sent) it would if I remember correctly forward messages to FC as they were received, or store in the module for you to retrieve at leisure.
That's a good point, to ensure your module will actually work in your country, and could be easily overlooked especially as some "cheap" sites don't offer much in the way of detailed descriptions.
I plan on exploring the 76xx module as soon as I get time and I've now opened up my SIM7600E which appears of reasonable quality and came with both LTE and GPS antennas. I'm a little annoyed that it came with header pins already attached, as I would have preferred to solder on ones from a known reputable manufacturer such as TE Connectivity or Molex, but I shall see soon enough....
Regards
Using the SIM800L I could create Flowcode charts to both send and receive SMS messages. Depending on how you setup the module (i.e. which AT commands you sent) it would if I remember correctly forward messages to FC as they were received, or store in the module for you to retrieve at leisure.
That's a good point, to ensure your module will actually work in your country, and could be easily overlooked especially as some "cheap" sites don't offer much in the way of detailed descriptions.
I plan on exploring the 76xx module as soon as I get time and I've now opened up my SIM7600E which appears of reasonable quality and came with both LTE and GPS antennas. I'm a little annoyed that it came with header pins already attached, as I would have preferred to solder on ones from a known reputable manufacturer such as TE Connectivity or Molex, but I shall see soon enough....
Regards
Re: Sending Data over Cellular Networks
Hi
I don't remember well... need to check my records. I think I checked the 7600 without sim-card first by applying 5volt. LED flash N shows the 7600 state. After I connected the sim-card I checked the LED again.
The initialisation of 7600 is important. After the init macro, you can Tx the test string to you mobile (etc) and save the Rx string to the circular buffer. If you find in the buffer "OK", the job is done.
I don't remember well... need to check my records. I think I checked the 7600 without sim-card first by applying 5volt. LED flash N shows the 7600 state. After I connected the sim-card I checked the LED again.
The initialisation of 7600 is important. After the init macro, you can Tx the test string to you mobile (etc) and save the Rx string to the circular buffer. If you find in the buffer "OK", the job is done.
- Attachments
-
- Hardware_design_v1.04.pdf
- (2.19 MiB) Downloaded 21 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sending Data over Cellular Networks
Hi
My 7600 module has an on-board USB so after downloading drivers I connected to my laptop using such. Opening Terminal soon had AT commands flowing. I could query and get responses. It looks though, that it has defaulted to 2G connection based on LED activity, possibly due to poor reception in this area.
I haven't started to go through things really but thought to send a SMS to my phone just to check things were working. This didn't work based on my prior knowledge of the SIM800L, and the 7600 AT command instructions (v1 and v2). According to the AT commands I should terminate my message with "escape" to actually send. However I could not get it to send anything, just hanging after the message was entered.
I discovered that I need to terminate my message with "Substitute" (Hex 1A) for it to work.
AT+CMGS="123456"
> Message Text <Hex1A>
When I get time I will go through things more.
Regards
My 7600 module has an on-board USB so after downloading drivers I connected to my laptop using such. Opening Terminal soon had AT commands flowing. I could query and get responses. It looks though, that it has defaulted to 2G connection based on LED activity, possibly due to poor reception in this area.
I haven't started to go through things really but thought to send a SMS to my phone just to check things were working. This didn't work based on my prior knowledge of the SIM800L, and the 7600 AT command instructions (v1 and v2). According to the AT commands I should terminate my message with "escape" to actually send. However I could not get it to send anything, just hanging after the message was entered.
I discovered that I need to terminate my message with "Substitute" (Hex 1A) for it to work.
AT+CMGS="123456"
> Message Text <Hex1A>
When I get time I will go through things more.
Regards
Re: Sending Data over Cellular Networks
Hi chipfryer
I tried the usb-to-PC test and moved to use the Ard Mega.
Mega allow me to do the initialisation and step-by-step network check.
---
Send “AT”, reset module (if you want to), check the baud rate, set the flow control, Request product serial number identification, Set phone functionality levels, Check the sim-card ID (if you want to), Query the signal quality.
---
Antenna.
I think (correct me if I am wrong), the mobile phone has 9 antennas.
7600 module has only one.
In your case, check the antenna. Probably, you need to change the antenna for a better one or move the module close to the window, etc.
Use AT+CSQ to check the signal level.
---
Terminate the string message.
I think (I have to check my records) I used:
<CR> or \r\n
---
I found in my records.
The first part of the program to be developed should be a macro called
Tx_Command. The main program should contain a string variable
called COMMAND. When the macro is executed, it will transfer each
character in COMMAND to the SendRS232char function until it encounters a character with the value 0. When the 0 is reached the macro will transfer the value 13 (<CR>) to the SendRS232char function and return to the main program.
The command string to be transmitted must be loaded into COMMAND
before executing the macro.
--
I did not use Hex1A
--
I tried the usb-to-PC test and moved to use the Ard Mega.
Mega allow me to do the initialisation and step-by-step network check.
---
Send “AT”, reset module (if you want to), check the baud rate, set the flow control, Request product serial number identification, Set phone functionality levels, Check the sim-card ID (if you want to), Query the signal quality.
---
Antenna.
I think (correct me if I am wrong), the mobile phone has 9 antennas.
7600 module has only one.
In your case, check the antenna. Probably, you need to change the antenna for a better one or move the module close to the window, etc.
Use AT+CSQ to check the signal level.
---
Terminate the string message.
I think (I have to check my records) I used:
<CR> or \r\n
---
I found in my records.
The first part of the program to be developed should be a macro called
Tx_Command. The main program should contain a string variable
called COMMAND. When the macro is executed, it will transfer each
character in COMMAND to the SendRS232char function until it encounters a character with the value 0. When the 0 is reached the macro will transfer the value 13 (<CR>) to the SendRS232char function and return to the main program.
The command string to be transmitted must be loaded into COMMAND
before executing the macro.
--
I did not use Hex1A
--
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sending Data over Cellular Networks
Hi
When connected over USB to USB, initially, with no SIM inserted my com port was Com3. Using this my Terminal program could interact as expected.
When SIM inserted, typing anything in my Terminal crashed the program (still using Com3).
Under Device Manager I found that I now had numerous comms ports and a new Modem and Network entry. I specifically had an "AT" port on Com11.
Using this port I could connect and interact as before. Checking things, I am correctly informed of my Network Operator, my signal strength is about - 70 or so and all related queries seem to suggest all is good.
The module has three antenna ports. LTE, 3G and GPS and I have the included antenna in the LTE port. This antenna may not be the best, but I cannot rule out my location contributing.
When 4G first appeared, calls still ran over 2G. Only data ran over the 4G so perhaps when I start connecting and sending data it may change. When next in my Evil Lab I can check connectivity as it has far better reception.
Clearly I am only using the USB to USB for convenience to test, as I don't need power supplies etc. When in Evil Lab I will instead use the Tx/Rx pins to a USB Serial adapter as this is how a Flowcode powered chip will connect.
Need to check the various issues of the AT Command set, to see which (if any) document SUB instead of CR as the termination during SMS. This does illustrate a point made before about manufacturers changing things which can then "break" a FC component.
Regards
When connected over USB to USB, initially, with no SIM inserted my com port was Com3. Using this my Terminal program could interact as expected.
When SIM inserted, typing anything in my Terminal crashed the program (still using Com3).
Under Device Manager I found that I now had numerous comms ports and a new Modem and Network entry. I specifically had an "AT" port on Com11.
Using this port I could connect and interact as before. Checking things, I am correctly informed of my Network Operator, my signal strength is about - 70 or so and all related queries seem to suggest all is good.
The module has three antenna ports. LTE, 3G and GPS and I have the included antenna in the LTE port. This antenna may not be the best, but I cannot rule out my location contributing.
When 4G first appeared, calls still ran over 2G. Only data ran over the 4G so perhaps when I start connecting and sending data it may change. When next in my Evil Lab I can check connectivity as it has far better reception.
Clearly I am only using the USB to USB for convenience to test, as I don't need power supplies etc. When in Evil Lab I will instead use the Tx/Rx pins to a USB Serial adapter as this is how a Flowcode powered chip will connect.
Need to check the various issues of the AT Command set, to see which (if any) document SUB instead of CR as the termination during SMS. This does illustrate a point made before about manufacturers changing things which can then "break" a FC component.
Regards
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sending Data over Cellular Networks
Hi
Before turning to data, I'm working my way through basic functions on the 7600 such as making calls and sending SMS, which has been fun..... I have v1, v2 and v3 of the AT manuals but none of them document using SUB to terminate a SMS message.
To make a call I use ATD0123456789; (that semicolon at the end threw me. Without it I get NO CARRIER after ten seconds or so.)
For SMS I first set the mode to text by issuing AT+CMGF=1
To send I then:-
AT+CMGS="0123456789"
> Message Text <Hex1A> (again I find no documentation regarding the use of SUB rather than CR, maybe due to communicating USB-USB?)
To receive a SMS message, upon receipt of a message the module automatically forwards indication to Flowcode / PC to inform of an incoming SMS along the lines of:-
+CMTI:"SM",0 ("0" being the location of the message within the module)
To fetch the message I would issue
AT+CMGR=0 ("0" being the location of the message as per above)
The module will then return:-
+CMGR: "REC READ","0123456789"","","25/03/20,11:15:23+00" (Sending number, Date and Time +GMT Offset)
Message Text (The actual message)
Flowcode can easily capture the above and parse. You can also have Flowcode poll for unread messages and then fetch, depending on setup and commands issued.
There are many functions regarding the sending and receiving of SMS messages, the above are just basic commands. You may for example wish to delete a message upon read, so you could issue:-
AT+CMGRD=0 (This fetches the message as before but also deletes it within the module)
I'm happy enough that my 7600 is operating at a very basic level, so I will explore some data options when I get time.
Regards
Before turning to data, I'm working my way through basic functions on the 7600 such as making calls and sending SMS, which has been fun..... I have v1, v2 and v3 of the AT manuals but none of them document using SUB to terminate a SMS message.
To make a call I use ATD0123456789; (that semicolon at the end threw me. Without it I get NO CARRIER after ten seconds or so.)
For SMS I first set the mode to text by issuing AT+CMGF=1
To send I then:-
AT+CMGS="0123456789"
> Message Text <Hex1A> (again I find no documentation regarding the use of SUB rather than CR, maybe due to communicating USB-USB?)
To receive a SMS message, upon receipt of a message the module automatically forwards indication to Flowcode / PC to inform of an incoming SMS along the lines of:-
+CMTI:"SM",0 ("0" being the location of the message within the module)
To fetch the message I would issue
AT+CMGR=0 ("0" being the location of the message as per above)
The module will then return:-
+CMGR: "REC READ","0123456789"","","25/03/20,11:15:23+00" (Sending number, Date and Time +GMT Offset)
Message Text (The actual message)
Flowcode can easily capture the above and parse. You can also have Flowcode poll for unread messages and then fetch, depending on setup and commands issued.
There are many functions regarding the sending and receiving of SMS messages, the above are just basic commands. You may for example wish to delete a message upon read, so you could issue:-
AT+CMGRD=0 (This fetches the message as before but also deletes it within the module)
I'm happy enough that my 7600 is operating at a very basic level, so I will explore some data options when I get time.
Regards
Re: Sending Data over Cellular Networks
Hi.
7600 to PC test.
I found some notes about me using PuTTy.
I am not sure if you tried it or not.
Please have a look.
-----------------------------------------------------
PUTTy
Install Puttty
+ drivers
----------------------
1. Open PuTTY.
2. Select Session (menu on the left).
3. In Connection type, select Serial.
4. In Serial line, enter the COM port your modem is connected to.
5. In Speed, enter the maximum port speed (baud rate) of your modem. Example: the COM port is COM12, and the speed is 115200.
PuTTY_Session_Serial
6. Select Open at the bottom of the screen to open the connection to the modem. The window below will appear; you may now type commands to the modem.
PuTTY_Command_Line_Blank
7. Now attempt to send a text message by entering the commands below in order, one line at a time.
AT+CSMS?
Rx = +CSMS: 0,1,1,1 //compatability test
AT+CREG=1 // set sms mode -> text only
1 – enable network registration unsolicited result code +CREG: <stat>
1 – registered, home network
AT+CSQ // test signal quality Example: Rx = 18,99
AT+CMGF=1 // set sms mode -> text only
AT+CMGS="0xx8x2x5xx" // send the phone N
> // where “>” indicates-> ready to get the text
Hello //enter any text
Press on keyboard Ctrl Z
SMS should be sent to the mobile phone.
7600 to PC test.
I found some notes about me using PuTTy.
I am not sure if you tried it or not.
Please have a look.
-----------------------------------------------------
PUTTy
Install Puttty
+ drivers
----------------------
1. Open PuTTY.
2. Select Session (menu on the left).
3. In Connection type, select Serial.
4. In Serial line, enter the COM port your modem is connected to.
5. In Speed, enter the maximum port speed (baud rate) of your modem. Example: the COM port is COM12, and the speed is 115200.
PuTTY_Session_Serial
6. Select Open at the bottom of the screen to open the connection to the modem. The window below will appear; you may now type commands to the modem.
PuTTY_Command_Line_Blank
7. Now attempt to send a text message by entering the commands below in order, one line at a time.
AT+CSMS?
Rx = +CSMS: 0,1,1,1 //compatability test
AT+CREG=1 // set sms mode -> text only
1 – enable network registration unsolicited result code +CREG: <stat>
1 – registered, home network
AT+CSQ // test signal quality Example: Rx = 18,99
AT+CMGF=1 // set sms mode -> text only
AT+CMGS="0xx8x2x5xx" // send the phone N
> // where “>” indicates-> ready to get the text
Hello //enter any text
Press on keyboard Ctrl Z
SMS should be sent to the mobile phone.