GPS and GSM


  • 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
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.