Getting LoPy working with Multi-tech Conduit



  • Hi,

    We've spent a few hours trying to get our LoPys working with the mLinux Multi-tech Conduit, and having fixed it wanted to share our finding - we couldn't figure this out from another thread here. We're not using an external server like Loriot or TTN as we want to be able to do local processing.

    We're basically using the demo code shown here:
    https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/lora-otaa.html

    However, it did not work. We're in the EU and guess that the LoPy is defaulting to a private network. This simple change seemed to be sufficient:
    lora = LoRa(mode=LoRa.LORAWAN, frequency=868000000, public=True)

    Note that as discussed elsewhere, the LoPy MAC automatically sets up the device's EUI so you don't have to, unlike with some other LoRaWAN stacks. You can read it out using
    print(binascii.hexlify(lora.mac()).upper().decode('utf-8'))

    On the Conduit, we're simply programming (in Multi-tech's terminology) the "network EUI" and "network key" through the web UI - you can also do this directly in the config file. However note that those are actually the app EUI and app key, as Daniel has noted elsewhere on the forum.

    HTH

    Antony



  • Here is our config file on the EU868 Conduit. Apologies for the readability, it's generated by the web UI. Key and app EUI have been replaced with ## characters.

    /var/config/lora/lora-network-server.conf:
    {"udp": {"appPortUp": 1784, "appPortDown": 1786, "downstreamPort": 1782, "upstreamPort": 1780}, "log": {"syslog": true, "path": "/var/log/", "console": true, "level": 100}, "whitelist": {"enabled": true, "devices": []}, "addressRange": {"start": "00:00:00:01", "end": "FF:FF:FF:FE"}, "db": "/var/run/lora/lora-net-server.db", "mqtt": {"host": "127.0.0.1", "enabled": true, "port": 1883}, "__v": 2, "test": {"disableRxWindow2": false, "disableDutyCycle": false, "disableRxWindow1": false, "disableRxJoin1": false, "disableRxJoin2": false}, "lora": {"rx1DatarateOffset": 0, "maxTxPower": 26, "channelPlan": "EU868", "minDatarate": 0, "frequencyBand": 868, "netID": "000000", "enabled": true, "rx2Datarate": 7, "dutyCyclePeriod": 60, "antennaGain": 3, "ADRStep": 30, "packetForwarderConfig": "", "frequencySubBand": 1, "nodeQueueSize": 16, "maxDatarate": 7, "packetForwarderMode": false, "frequencyEU": 869500000}, "network": {"key": "################################", "leasetime": 0, "name": "", "passphrase": "", "eui": "##:##:##:##:##:##:##:##", "public": true}}

    Now we'll try a 915MHz Conduit with LoPy...



  • @Antony I can't get our config file to you at the moment as we're got the gateway on loan to a FabLab, who are using it for their own projects.

    We should have it back in a couple of weeks, I'll get it posted for you when it's returned to us!



  • It is all working for us now, but it would be very helpful if you could post the contents of
    /var/config/lora/lora-network-server.conf
    on your Conduit. (blank out keys if those are sensitive for you).

    Thanks

    Antony



  • @Antony Hi Antony! We actually have been testing a Multitech Conduit in our office to get our LoPys connected to it. We haven't had any problems getting them connected, the process seemed to be fairly seamless!

    Do you want to post a picture of your LoRa settings/configuration for both the gateway and your LoPy so we can try to help you debug your problem?

    Cheers!


Log in to reply
 

Pycom on Twitter