• 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 ?

  • Mod

    Rfm95 should be supported.

  • Mod

    @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. is my code for posting location to a map.

  • @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 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 ?

  • Mod

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

  • Mod

    @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.

  • @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

  • Mod

    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)

  • 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.

  • Mod

    @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

  • 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.

  • Mod

    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

  • 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.

  • Mod

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

  • 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?

  • Mod

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

  • 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.

  • Mod

    @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.

  • Mod

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

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

  • @fhenryco for me, the benefit of the A6 is that I have one on my desk 🙂

    @gohan I'm not fixed on using a MQTT gateway. Not after learning that a regular Ethernet Gateway can be used as a Client. Actually I would very much prefer using it as an Ethernet Gateway if I can.

    So far I have not managed to get MySensors to play ball. Even though I have an internet connection up and running and a port to connect to, I'm not seeing any incoming connections. Must dig deeper.

Log in to reply

Suggested Topics

  • 1
  • 1
  • 2
  • 3
  • 2
  • 2