Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. GPS and GSM

GPS and GSM

Scheduled Pinned Locked Moved Development
21 Posts 4 Posters 4.6k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fhenrycoF Offline
    fhenrycoF Offline
    fhenryco
    wrote on last edited by
    #1

    Re: GPS and GSM

    Just to be sure, when you say that you would just use an ethernet or MQTT gateway for a GPS tracker, the ethernet module is actually not needed right ? Indeed a GPS tracker is in general not near any ethernet network ...
    So we are talking about just the gateway arduino (with ethernet gateway sketch supplemented by GPS and GSM sketches) connected to GPS and GSM modules, and of course a battery ...
    which Lorawan module do you have ?

    mfalkviddM 1 Reply Last reply
    0
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #2

      Rfm95 should be supported.

      1 Reply Last reply
      0
      • fhenrycoF fhenryco

        Re: GPS and GSM

        Just to be sure, when you say that you would just use an ethernet or MQTT gateway for a GPS tracker, the ethernet module is actually not needed right ? Indeed a GPS tracker is in general not near any ethernet network ...
        So we are talking about just the gateway arduino (with ethernet gateway sketch supplemented by GPS and GSM sketches) connected to GPS and GSM modules, and of course a battery ...
        which Lorawan module do you have ?

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by mfalkvidd
        #3

        @fhenryco yes, the gateway would be a MySensors (ethernet or mqtt) gateway but it would not have a physical ethernet connection. It would use the gsm connection to send data instead.

        I use RFM95W and RFM96 LoRa modules.

        https://github.com/mfalkvidd/FatLinkGateway/blob/master/FatLinkGateway.ino is my code for posting location to a map.

        fhenrycoF 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @fhenryco yes, the gateway would be a MySensors (ethernet or mqtt) gateway but it would not have a physical ethernet connection. It would use the gsm connection to send data instead.

          I use RFM95W and RFM96 LoRa modules.

          https://github.com/mfalkvidd/FatLinkGateway/blob/master/FatLinkGateway.ino is my code for posting location to a map.

          fhenrycoF Offline
          fhenrycoF Offline
          fhenryco
          wrote on last edited by
          #4

          @mfalkvidd

          What i don't get is why you propose this : would there be any benefit of such an ethernet gateway (if the specific mysensors protocol is actually useless) over a mere arduino with sketch for GPS_GSM tracker module ?

          If i merge part of the mysensors GPS sketch which uses softwareserial on A0 and A5 (but A5 can actually be left unconnected)
          and part of the SMS sketch taken from mysensors SMSgateway sketch , using softwareserial on pin 2 and 3 , i learn from here https://forum.arduino.cc/index.php?topic=398856.0 that two software serial can't listen at the same time
          so they advice the alternatives

          BEST: GSM on pins 8 & 9 (AltSoftSerial), GPS in pins 0 & 1 (Serial). Disconnect pin 0 to upload.

          2nd BEST: GSM on pins 0 & 1 (disconnect pin 0 to upload), GPS on pins 8 & 9 (AltSoftSerial).

          3rd BEST: GSM on pins 8 & 9, GPS on any two pins with NeoSWSerial.

          However the GPS mysensor sketch is (surprisingly) using analog pins for the software serial ... is the limitation on two ss unable to listen at the same time circumvented this way ?

          mfalkviddM 1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #5

            Is there a specific reason why you want to use mysensors instead of other mqtt-gsm solutions?

            fhenrycoF 1 Reply Last reply
            0
            • fhenrycoF fhenryco

              @mfalkvidd

              What i don't get is why you propose this : would there be any benefit of such an ethernet gateway (if the specific mysensors protocol is actually useless) over a mere arduino with sketch for GPS_GSM tracker module ?

              If i merge part of the mysensors GPS sketch which uses softwareserial on A0 and A5 (but A5 can actually be left unconnected)
              and part of the SMS sketch taken from mysensors SMSgateway sketch , using softwareserial on pin 2 and 3 , i learn from here https://forum.arduino.cc/index.php?topic=398856.0 that two software serial can't listen at the same time
              so they advice the alternatives

              BEST: GSM on pins 8 & 9 (AltSoftSerial), GPS in pins 0 & 1 (Serial). Disconnect pin 0 to upload.

              2nd BEST: GSM on pins 0 & 1 (disconnect pin 0 to upload), GPS on pins 8 & 9 (AltSoftSerial).

              3rd BEST: GSM on pins 8 & 9, GPS on any two pins with NeoSWSerial.

              However the GPS mysensor sketch is (surprisingly) using analog pins for the software serial ... is the limitation on two ss unable to listen at the same time circumvented this way ?

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #6

              @fhenryco I would guess that the analog pin is used to keep the digial pins available for other stuff. I dont't think it affects the software serial limitations.

              The reason to keep MySensors would be to use other features like sleep. But if you don't see any value, don't use MySensors. I don't use MySensors in the FatLinkGateway.

              I wasn't aware of the software serial limitation to only listen to one serial at the time, but I don't think it will have any impact in practice. When the Arduino is talking to the gsm module to send a message with the latest position it will ignore position updates from the gps, but that's ok. And when he Arduino talks to the gps to get the latest position it will not get replies from AT commands sent to the gsm module, but that's also ok.

              1 Reply Last reply
              0
              • gohanG gohan

                Is there a specific reason why you want to use mysensors instead of other mqtt-gsm solutions?

                fhenrycoF Offline
                fhenrycoF Offline
                fhenryco
                wrote on last edited by
                #7

                @gohan
                That's what i'm trying to understand ... also MQTT gateway needs ethernet, and there is no such thing available for a gps tracker which can only communicate through gsm, and once the data are received through the gsm network , one would just like to be able to collect them and translate to a location on a map or to get them in a controller where it can be used with other sensor data to trigger scripts ... for all this i was wondering why the simplest solution would not be the better : (mfalkvidd seems to agree) just a sketch to collect gps data and send them as sms and nothing else ... However part of the mysensors protocol devoted to presentation of child objects and so on would make sense if the final receiver, for instance domoticZ could recognize it even though it was received through SMS ...(i don't have the impression that this is possible so far? i don't even know wether domoticZ can recognize and handle sensors and actuators through SMS. yet that would be cool all the more since we have this smsgateway sketch which could evolve to become a genuine SMSgateway or even WAN gateway if it could talk to a controller through the exchange of SMS or Lora messages and to other sensors with the wireless short distance mysensors protocol )

                LoraWan will be the next step. Actually i dont have a specific project, i'm just exploring as much as i can all IoT possibilities as a teacher in networks and telecoms... Many thanks for all the valuable info i got from mysensors forum

                1 Reply Last reply
                1
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #8

                  I remember I saw something on the Adafruit forum about an example on how to make a MQTT connection over GSM but I didn't have the time to investigate further. At the moment for basic GPS tracking I have a Seekios that has it's own app and it is pretty much free to use (sim included)

                  1 Reply Last reply
                  0
                  • ThucarT Offline
                    ThucarT Offline
                    Thucar
                    wrote on last edited by
                    #9

                    I'm actually looking into this very thing myself. Not from the GPS aspect but the GSM/GPRS point of view. The goal here is to create a remote battery/solar powered MQTT gateway that can have a network of nodes of its own.

                    I'm testing things with the A6 GSM/GPRS module from AI Thinker. Right now I'm trying to chew through the MyGatewayTransportMQTTClient.cpp file and figure out how to convinve MySensors to play nice with the thing.

                    As the A6 library I'm using TinyGSM. Using one of the TinyGSM examples I got the GPRS connection up and running in no time.

                    Controller: Node-Red
                    Gateway: SerialGateway & GSMMQTTGateway
                    MySensors: 2.2.0

                    gohanG 1 Reply Last reply
                    0
                    • ThucarT Thucar

                      I'm actually looking into this very thing myself. Not from the GPS aspect but the GSM/GPRS point of view. The goal here is to create a remote battery/solar powered MQTT gateway that can have a network of nodes of its own.

                      I'm testing things with the A6 GSM/GPRS module from AI Thinker. Right now I'm trying to chew through the MyGatewayTransportMQTTClient.cpp file and figure out how to convinve MySensors to play nice with the thing.

                      As the A6 library I'm using TinyGSM. Using one of the TinyGSM examples I got the GPRS connection up and running in no time.

                      gohanG Offline
                      gohanG Offline
                      gohan
                      Mod
                      wrote on last edited by
                      #10

                      @Thucar I think you will need some some kind of controller (like node-red or whatever) than can bridge the different systems connected to MQTT

                      1 Reply Last reply
                      0
                      • ThucarT Offline
                        ThucarT Offline
                        Thucar
                        wrote on last edited by
                        #11

                        How come? Using a TinyGSM example sketch I can connect to the internet, get an IP address, connect to my MQTT broker and push/read messages. So I was thinking all I need to do is use the TinyGSM library to set up an Internet connection. Then use the GatewayXXXXMQTTClient sketch to handle everything else. Pretty much like with Ethernet or ESP8266 versions of the gateway.

                        Controller: Node-Red
                        Gateway: SerialGateway & GSMMQTTGateway
                        MySensors: 2.2.0

                        1 Reply Last reply
                        1
                        • gohanG Offline
                          gohanG Offline
                          gohan
                          Mod
                          wrote on last edited by
                          #12

                          I meant from the server side, from the client you only need the mqtt client, but if you want the GSM client talk to other things like on your mysensors network, then a controller is needed

                          1 Reply Last reply
                          0
                          • ThucarT Offline
                            ThucarT Offline
                            Thucar
                            wrote on last edited by
                            #13

                            I was thinking more in the lines of a standalone Mysensors network. So I would place this GSM gateway in my beeyard, add nodes to each individual hive and have the gateway forward all gathered information to my MQTT broker. At the same time I could use the gateway to read incoming messages from the broker and forward them to the nodes.

                            An alternative would be to not configure it as a MQTT gateway but as an Ethernet Client gateway that connects directly to my PC.

                            Controller: Node-Red
                            Gateway: SerialGateway & GSMMQTTGateway
                            MySensors: 2.2.0

                            1 Reply Last reply
                            0
                            • gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #14

                              Ok I got it now. Maybe @Yveaux could provide a comment on the feasibility

                              1 Reply Last reply
                              0
                              • ThucarT Offline
                                ThucarT Offline
                                Thucar
                                wrote on last edited by Thucar
                                #15

                                Looks like I have it working. At least it compiles nicely and connects to the Internet via GPRS. The problem is, I can't use it as an Ethernet server gateway when on GPRS. It has to be in Client configuration. I've been using MySController so far but does not look like it supports gateways as Clients. What would you say is the simplest way to test the Ethernet Client configuration?

                                Controller: Node-Red
                                Gateway: SerialGateway & GSMMQTTGateway
                                MySensors: 2.2.0

                                1 Reply Last reply
                                0
                                • gohanG Offline
                                  gohanG Offline
                                  gohan
                                  Mod
                                  wrote on last edited by
                                  #16

                                  Sorry... no idea on how to hack the mysensors gateway to use gprs

                                  1 Reply Last reply
                                  0
                                  • ThucarT Offline
                                    ThucarT Offline
                                    Thucar
                                    wrote on last edited by
                                    #17

                                    I'm not looking to hack it. I think I pretty much did that part. I'm looking for information on how to use or more specifically test a regular Ethernet Gateway in Client mode. The Client mode seems to be an official feature of the Ethernet Gateway judging by the comments in the example file.

                                    Controller: Node-Red
                                    Gateway: SerialGateway & GSMMQTTGateway
                                    MySensors: 2.2.0

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • ThucarT Thucar

                                      I'm not looking to hack it. I think I pretty much did that part. I'm looking for information on how to use or more specifically test a regular Ethernet Gateway in Client mode. The Client mode seems to be an official feature of the Ethernet Gateway judging by the comments in the example file.

                                      mfalkviddM Offline
                                      mfalkviddM Offline
                                      mfalkvidd
                                      Mod
                                      wrote on last edited by
                                      #18

                                      @Thucar the ethernet client gateways needs an open tcp port to connect to. If you have a linux machine you can use netcat to start such a port. If the linux machine is behind a router you'll need to use port forearding.

                                      gohanG 1 Reply Last reply
                                      0
                                      • mfalkviddM mfalkvidd

                                        @Thucar the ethernet client gateways needs an open tcp port to connect to. If you have a linux machine you can use netcat to start such a port. If the linux machine is behind a router you'll need to use port forearding.

                                        gohanG Offline
                                        gohanG Offline
                                        gohan
                                        Mod
                                        wrote on last edited by
                                        #19

                                        @mfalkvidd I think he wants to compile a MQTT gateway but without the ethernet interface and use the GPRS instead

                                        fhenrycoF 1 Reply Last reply
                                        0
                                        • gohanG gohan

                                          @mfalkvidd I think he wants to compile a MQTT gateway but without the ethernet interface and use the GPRS instead

                                          fhenrycoF Offline
                                          fhenrycoF Offline
                                          fhenryco
                                          wrote on last edited by
                                          #20

                                          what would you say is the main benefit of the A6 module with respect to a sim800L

                                          ThucarT 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular