Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Multitech Conduit

    Scheduled Pinned Locked Moved LoPy
    41 Posts 12 Posters 25.5k Views 12 Watching
    Loading More Posts
    • 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.
    • R Offline
      Ralph
      last edited by

      Thanks @Xykon, you were faster :)

      1 Reply Last reply Reply Quote 0
      • S Offline
        stuart
        last edited by

        Thanks @Ralph, @jubbs, @bmarkus and @Xykon - I've re-installed the Firmware, selected the UK and started to see some LoraWan log activity which is a good step forward - you can see from the logs here that the device is getting registered:

        12:4:42:753|INFO| Parsing 1 rx packets
        12:4:42:754|DEBUG| Received packet
        ================================
        000   00 6b 67 12 ac e3 da a4
        008   ad 62 6e 27 96 49 d5 b3
        010   70 fc 25 0e 77 cf a6
        
        
        12:4:42:755|DEBUG| Rx on 868300000, rssi: -18 snr: 75
        12:4:42:755|DEBUG| Received frame: type: Join Request
        12:4:42:755|INFO| Received join request
        12:4:42:756|DEBUG| BUFFER: 006b6712ace3daa4ad626e279649d5b370fc25
        12:4:42:756|DEBUG| App EUI: ad-a4-da-e3-ac-12-67-6b
        12:4:42:757|DEBUG| Dev EUI: 70-b3-d5-49-96-27-6e-62
        12:4:42:757|DEBUG| Nonce: 000025fc
        12:4:42:758|DEBUG| MIC is valid
        12:4:42:758|DEBUG| Got appkey: 11.b0.28.2a.18.9b.75.b0.b4.d2.d8.c7.fa.38.54.8b
        12:4:42:759|DEBUG| DEV NONCE: 25fc
        12:4:42:759|DEBUG| APP NONCE: 79745b
        12:4:42:759|DEBUG| session keys: 97f3a21d1e2937f3abf9d516c07c380d 56fab4e564aa47a098a58e8eb61836f6
        12:4:42:760|TRACE| SQL query = SELECT address FROM nodes WHERE deveui = "70b3d54996276e62";
        12:4:42:761|INFO| Device not found in DB
        12:4:42:762|INFO| assigning address: 1
        12:4:42:763|TRACE| SQL query = SELECT address FROM nodes where deveui = "70b3d54996276e62";
        12:4:42:765|TRACE| SQL query = INSERT INTO nodes (address, appeui, deveui, authenticationkey, encryptionkey, lastdownmsgseqno, class) VALUES ("00000001", "ada4dae3ac12676b", "70b3d54996276e62", "2b7e151628aed2a6abf7158809cf4f3c", "2b7e151628aed2a6abf7158809cf4f3c", 0, "A")
        12:4:42:769|TRACE| SQL query = INSERT INTO packets (node, gateway, seqno, data) VALUES ("00000001", "", 0, "");
        12:4:42:773|TRACE| SQL query = INSERT INTO appkeys (appeui, deveui, appkey) VALUES ("ada4dae3ac12676b", "70b3d54996276e62", "11b0282a189b75b0b4d2d8c7fa38548b");
        12:4:42:776|DEBUG| Update session keys
        12:4:42:777|TRACE| SQL query = UPDATE nodes SET authenticationkey = "97f3a21d1e2937f3abf9d516c07c380d", encryptionkey = "56fab4e564aa47a098a58e8eb61836f6" WHERE address = "00000001"
        12:4:42:779|DEBUG| Freq 0: 8691000
        12:4:42:780|DEBUG| Freq 1: 8693000
        12:4:42:780|DEBUG| Freq 2: 8695000
        12:4:42:780|DEBUG| Freq 3: 8697000
        12:4:42:781|DEBUG| Freq 4: 8699000
        12:4:42:781|DEBUG| GenerateJoinRequestIntegrityCode
        12:4:42:782|DEBUG| node is active
        12:4:42:783|DEBUG| app data size 0
        12:4:42:784|INFO| Queue join response 33 bytes
        12:4:42:784|DEBUG| Update stats
        12:4:42:784|DEBUG| Join packet received
        12:4:42:784|DEBUG| transmitController.ReceivedFrame
        12:4:42:785|DEBUG| update bestGateway
        12:4:42:785|DEBUG| Time: 654662052
        12:4:42:785|DEBUG| App Queue Length: 1
        12:4:42:786|DEBUG| NewFrame
        12:4:42:786|DEBUG| 0 : 00:80:00:00:00:00:c4:b5 == 00:80:00:00:00:00:c4:b5 1
        12:4:42:786|DEBUG| update gateway 0
        12:4:42:787|DEBUG| DR Index sf: 12 bw: 125 index: 0
        12:4:42:787|DEBUG| Rx Frame SEQ 42202 SNR 75 SF 0
        12:4:42:787|DEBUG| ADR FindDR : snr : 75 step : 30
        12:4:42:788|DEBUG| ADR PRE MIN/MAX DR: 9
        12:4:42:788|DEBUG| ADR NEW DR: 5 MIN: 0 MAX: 5 STEP: 30
        12:4:42:788|DEBUG| ADR update avgSnr store size: 0 snr: 75 avg: 0
        12:4:42:788|DEBUG| ADR update avgSnr store size: 0 snr: 75 avg: 75
        12:4:42:789|DEBUG| ReceiveOption : ad
        12:4:42:789|TRACE| SQL query = UPDATE nodes SET lastdownmsgseqno = 0 WHERE address = "00000001";
        12:4:42:792|TRACE| SQL query = UPDATE nodes SET jointime = "2016-10-27T12:04:42Z" WHERE address = "00000001"
        12:4:42:793|DEBUG| Send MQTT message 228 bytes
        12:4:42:794|DEBUG| UDP message: lora/70-b3-d5-49-96-27-6e-62/packet_recv {"chan":1,"codr":"4/5","data":"AGtnEqzj2qStYm4nlknVs3D8JQ53z6Y=","datr":"SF12BW125","freq":868.29999999999995,"lsnr":7.5,"modu":"LORA","rfch":0,"rssi":-18,"size":23,"stat":1,"time":"2016-10-27T12:04:42.751089Z","tmst":654662052}
        12:4:42:794|DEBUG| UDP port: 1784
        12:4:42:798|TRACE| Published message: 2
        12:4:42:798|TRACE| MQTT message: lora/70-b3-d5-49-96-27-6e-62/packet_recv
        12:4:42:802|TRACE| SQL query = UPDATE packets SET port = 39, seqno = 0, gateway = "008000000000c4b5", time = "2016-10-27T12:04:42Z", microseconds = 751089, rssi = -18, channel = 1, lsnr_cB = 75, spread = 12, modulationbandwidth = 125, data = "9649d5b370fc25" WHERE node = "00000001"
        12:4:42:806|TRACE| SQL query = UPDATE nodes SET lastuppacketid = 1, lastmessagems = 42 WHERE address = "00000001";
        12:4:42:808|TRACE| SQL query = UPDATE gateways SET lastuppacketid = 1 WHERE address = "008000000000c4b5";
        12:4:42:811|DEBUG| getTimeOnAirMs dr: 12 bw: 0 pl: 8 sz: 32 toa: 1810
        12:4:42:812|INFO| Send Join Accept - EUI: 70-b3-d5-49-96-27-6e-62 ADDR: 00000001
        12:4:42:812|INFO| Schedule TX Time on air: 1820 ms
        12:4:42:812|DEBUG| BestGatewayChannel::scheduleAt seq: 0 tm:721931 dur:1820 freq:868300000
        12:4:42:813|DEBUG| BestGatewayChannel::scheduleAt gw_seq: 42202 seq: 0
        12:4:42:813|DEBUG| BestGatewayChannel 0 : 00:80:00:00:00:00:c4:b5
        12:4:42:814|TRACE| Schedule DC band: 1 available: 6312 duration: 1820 freq: 868300000
        12:4:42:814|DEBUG| returning 00:80:00:00:00:00:c4:b5
        12:4:42:814|DEBUG| Scheduling for Rx Window 1 00:00:00:01
        12:4:42:815|DEBUG| Send MQTT message 0 bytes
        12:4:42:816|DEBUG| UDP message: lora/70-b3-d5-49-96-27-6e-62/joined 
        12:4:42:816|DEBUG| UDP port: 1784
        12:4:42:817|TRACE| SQL query = SELECT address FROM nodes WHERE deveui = "70b3d54996276e62";
        12:4:42:819|DEBUG| Mosquitto command received 'packet_recv'
        12:4:42:819|TRACE| Unknown command 'packet_recv
        12:4:42:854|TRACE| Published message: 3
        12:4:42:894|TRACE| MQTT message: lora/70-b3-d5-49-96-27-6e-62/joined
        12:4:42:894|TRACE| SQL query = SELECT address FROM nodes WHERE deveui = "70b3d54996276e62";
        12:4:42:896|DEBUG| Mosquitto command received 'joined'
        12:4:42:896|TRACE| Unknown command 'joined
        12:4:44:834|TRACE| Parse downstream message 12 bytes
        12:4:44:835|TRACE| Gateway 00:80:00:00:00:00:c4:b5 seen IP address 127.0.0.1:47241
        12:4:45:932|TRACE| Parse message 5 bytes
        12:4:45:932|TRACE| command: 'stats' 5
        12:4:47:505|DEBUG| is frame ready?
        12:4:47:506|DEBUG| App Queue Length: 1
        12:4:47:506|DEBUG| BestGateway: 8000000000c4b5
        12:4:47:507|DEBUG| Start
        12:4:47:507|INFO| Frame transmitted to 00:00:00:01 via GW (00:80:00:00:00:00:c4:b5 Chan LC2 127.0.0.1:47241)  Seq# 0
        12:4:47:508|TRACE| SQL query = UPDATE nodes SET lastdownmsgseqno = 0 WHERE address = "00000001";
        12:4:47:511|DEBUG| App Data Queue: 1 front size: 33 available: 242
        12:4:47:511|DEBUG| check if front is join request 33 bytes
        12:4:47:511|DEBUG| Start
        12:4:47:511|TRACE| App Data Queue - Join Popped
        12:4:47:512|DEBUG| Transmitted Frame data
        ================================
        000   20 c1 4a 1b bf c8 4a 03
        008   54 49 c7 31 75 00 3c f3
        010   bb e4 f8 27 ae 08 d5 4d
        018   56 59 82 4e 24 e2 bc e1
        020   8d
        
        
        12:4:47:514|DEBUG| rx1Offset: 0 rx1Datarate: 12
        12:4:47:515|DEBUG| Use JoinResponse Window Time
        12:4:47:517|DEBUG| JSON tx: {
           "txpk" : {
              "codr" : "4/5",
              "data" : "IMFKG7/ISgNUSccxdQA887vk+CeuCNVNVlmCTiTivOGN",
              "datr" : "SF12BW125",
              "freq" : 868.29999999999995,
              "ipol" : true,
              "modu" : "LORA",
              "ncrc" : false,
              "powe" : 11,
              "rfch" : 0,
              "size" : 33,
              "tmst" : 659662052
           }
        }
        
        12:4:47:518|DEBUG| Band: 1 DutyCycle: 6362
        12:4:47:519|DEBUG| getTimeOnAirMs dr: 12 bw: 0 pl: 8 sz: 33 toa: 1810
        12:4:47:519|INFO| Update DC Band: 1 Duration: 1810 time-on-air available: 4552 ms
        12:4:47:520|INFO| Transmit UDP message to Gateway 208 bytes
        12:4:47:520|DEBUG| Send on socket 212 bytes, payload len: 208
        12:4:47:544|DEBUG| Send MQTT message 198 bytes
        12:4:47:544|DEBUG| UDP message: lora/70-b3-d5-49-96-27-6e-62/packet_sent {"codr":"4/5","data":"IMFKG7/ISgNUSccxdQA887vk+CeuCNVNVlmCTiTivOGN","datr":"SF12BW125","freq":868.29999999999995,"ipol":true,"modu":"LORA","ncrc":false,"powe":11,"rfch":0,"size":33,"tmst":659662052}
        12:4:47:545|DEBUG| UDP port: 1784
        12:4:47:548|TRACE| Published message: 4
        12:4:47:584|TRACE| MQTT message: lora/70-b3-d5-49-96-27-6e-62/packet_sent
        12:4:47:584|TRACE| SQL query = SELECT address FROM nodes WHERE deveui = "70b3d54996276e62";
        12:4:47:586|DEBUG| Mosquitto command received 'packet_sent'
        12:4:47:586|TRACE| Unknown command 'packet_sent
        

        but the running code never appears to go past the condition

        while not lora.has_joined():
            time.sleep(2.5)
            print('Waiting to join the network...')
        

        I can see the confirmation of join stats in the Conduit:

        0_1477571092167_upload-a8b8dc93-6632-449a-8ea7-5f900fd0de1c

        ...but no data actually gets sent because as mentioned it doesn't appear to exit the lora.has_joined() while loop.

        Any advice on what might be happening here?

        Thanks again for all your support.

        Stuart

        1 Reply Last reply Reply Quote 0
        • A Offline
          arneme @daniel
          last edited by

          @daniel said in Multitech Conduit:

          "__v" : 2

          What is the significance of "__v" : 2 in the config file for the network server? All Conduits we have (with default setup) uses "__v" : 1

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            stuart @arneme
            last edited by stuart

            @arneme I'm not sure the significance. I connected an xDot to the Conduit today with no problems. I suspect my LoPy LoRa chip may be damaged as it was briefly used without the external antenna attached.

            Anyone know if there any way to confirm this?

            I can get a join packet out of the LoPy, but that's infrequent and the only packet type I've seen.

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              arneme @stuart
              last edited by

              @stuart Hi Stuart, we have connected different types of devices to the Multitech (including mDot) but we have not been able to connect the LoPy yet. We do see that the LoPy sends a join request and that the Multitech gateway is sending a join ack back, but the LoPy does not manage to "catch" the ack. I think their timing might be off and hopefully they will manage to get this right in later versions of the firmware.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                stuart @arneme
                last edited by

                @arneme said in Multitech Conduit:

                We do see that the LoPy sends a join request and that the Multitech gateway is sending a join ack back, but the LoPy does not manage to "catch" the ack.

                Hi @arneme and thanks for replying. Aye, what you've described there is exactly the behavior I've seen when attempting to connect my LoPy to the Conduit.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  daniel
                  last edited by

                  @arneme and @stuart other users have reported the sams issue, but we have Multi-Tech Gateways as well and we don't have any problems when joining.

                  Would you be so kind to share with us the configuration of your Multi-Tech Gateways? In the same way that I posted ours before in this same thread? That will help shed some light into the issue... Thanks!

                  Cheers,
                  Daniel

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    arneme @daniel
                    last edited by sakis

                    @daniel When I use your configuration it works. The thing is that our setup is very different since we have set up the Conduit in basic packet forwarder mode. We are running a single cloud based network server for our entire network of 15 gateways in three different geographical locations (three cities in Norway). The configuration for the packet forwarder is like this (Gateway ID and URL to our network server is anonymised with x and y´s):

                    {
                    	"SX1301_conf": {
                            "lorawan_public": true,
                    		"radio_0": {
                    			"enable": true,
                    			"freq": 867500000
                    		},
                    		"radio_1": {
                    			"enable": true,
                    			"freq": 868500000
                    		},
                    		"chan_multiSF_0": {
                    			"enable": true,
                    			"radio": 1,
                    			"if": -400000
                    		},
                    		"chan_multiSF_1": {
                    			"enable": true,
                    			"radio": 1,
                    			"if": -200000
                    		},
                    		"chan_multiSF_2": {
                    			"enable": true,
                    			"radio": 1,
                    			"if": 0
                    		},
                    		"chan_multiSF_3": {
                    			"enable": true,
                    			"radio": 0,
                    			"if": -400000
                    		},
                    		"chan_multiSF_4": {
                    			"enable": true,
                    			"radio": 0,
                    			"if": -200000
                    		},
                    		"chan_multiSF_5": {
                    			"enable": true,
                    			"radio": 0,
                    			"if": 0
                    		},
                    		"chan_multiSF_6": {
                    			"enable": true,
                    			"radio": 0,
                    			"if": 200000
                    		},
                    		"chan_multiSF_7": {
                    			"enable": true,
                    			"radio": 0,
                    			"if": 400000
                    		},
                    		"chan_Lora_std": {
                    			"enable": true,
                    			"radio": 1,
                    			"if": -200000,
                    			"bandwidth": 250000,
                    			"spread_factor": 7
                    		},
                    		"chan_FSK": {
                    			"enable": true,
                    			"radio": 1,
                    			"if": 300000,
                    			"datarate": 50000,
                    			"freq_deviation": 25000
                    		}
                    	},
                    	"gateway_conf" : {
                    	"gateway_ID": "000800FFFFXXXXX",
                        "fake_gps": true,
                        "ref_latitude": 69.6816054,
                        "ref_longitude": 18.987787,
                        "ref_altitude": 16,
                    	"server_address" : "xxxxxx.yyyyy.com",
                    	"serv_port_up": 1700,
                    	"serv_port_down": 1700,
                    	"keepalive_interval": 10,
                    	"stat_interval": 30,
                    	"push_timeout_ms": 100,
                    	"forward_crc_valid": true,
                    	"forward_crc_error": false,
                    	"forward_crc_disabled": false	
                      }
                    }
                    
                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      daniel
                      last edited by

                      @arneme thanks for the config. I will test with that and with the Conduit as a simple packet forwarder and see where that gets me.

                      Cheers,
                      Daniel

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        arneme @daniel
                        last edited by arneme

                        @daniel Note that you will need a Network server running somewhere. We are using the Semtech Network server but you will have to contact them directly in order to get the binaries or source code for it. It might however be possible to set up a second Multitech station and run the network server there but we have not tested this configuration. Another option is to use the Loriot.io packet forwarder and set up an account with them (we have tested this with the same result as for our own setup). If you want we could set you up to use our network server as well.

                        A 1 Reply Last reply Reply Quote 0
                        • A Offline
                          arneme @arneme
                          last edited by

                          @arneme I took the global_config.json generated by the Network server (when using Daniels original setup of the Network server) and using this file (modified with our network server DNS name) to configure the basic packet forwarder (and setting the Conduit in basic packet forward mode) I actually managed to connect the LoPy. Our network server is now receiving packets from the LoPy after successful join.

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            daniel
                            last edited by

                            I took the global_config.json generated by the Network server (when using Daniels original setup of the Network server) and using this file (modified with our network server DNS name) to configure the basic packet forwarder (and setting the Conduit in basic packet forward mode) I actually managed to connect the LoPy. Our network server is now receiving packets from the LoPy after successful join.

                            @arneme that's good news. Were you able to understand what part of the config is affecting the behavior of the join procedure?

                            1 Reply Last reply Reply Quote 0
                            • E Offline
                              egnoske
                              last edited by

                              I see some folks report that they can connect their LoPy to the Multitech Conduit however I have 0% success on LoPy while I have 100% success on mDot. Are there any absolutely working py scripts with matching conduit configs out there?

                              I currently have an identical setup as jubbs and identical results...

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                stuart
                                last edited by stuart

                                I recently purchased a second LoPy as I previously thought I may have damaged the first one by not immediately attaching the external RF aerial.

                                However, I'm still experiencing the same issues on the second LoPy (my LoRaWAN configuration is further down this thread). I still can't connect to the network using OTAA with the Conduit gateway which is pretty frustrating (especially given that other folk seem to have achieved this).

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  arneme
                                  last edited by

                                  After upgrading my LoPy to the latest firmware (release='0.9.6.b1', version='v1.8.6-40-gd10463e on 2016-11-25') I am not able to connect to a Multitech gateway (in basic packet forwarder mode) anymore :-(

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    daniel
                                    last edited by

                                    @arneme Can you provide any logs from the Multitech Gateway? That might help understand the problem.

                                    We are working this week on fine tuning the timing of the LoRa stack and we are sending our modules for LoRaWAN certification.

                                    A 1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      arneme @daniel
                                      last edited by arneme

                                      @daniel I can provide you with logs, just tell me what you want. I can even allow you to login and install software on the gateway if you want to use your own customised packet forwarder (i.e. to get more verbose log output) or monitoring tool.

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        arneme
                                        last edited by

                                        Upgrading the LoPy to the latest version (0.9.7.b1) and getting the order of the parameters right in the auth part of lora.join() call fixed the problem (yes, the order of the parameters actually changed between versions). The LoPy is now again working towards our Multitech stations :-)

                                        K G 2 Replies Last reply Reply Quote 1
                                        • K Offline
                                          kiwi64ajs @arneme
                                          last edited by

                                          @arneme said in Multitech Conduit:

                                          Upgrading the LoPy to the latest version (0.9.7.b1) and getting the order of the parameters right in the auth part of lora.join() call fixed the problem (yes, the order of the parameters actually changed between versions). The LoPy is now again working towards our Multitech stations :-)

                                          Ok, so what was the order previously and what order did you have to make it to work now?

                                          Regards

                                          Alex Shepherd

                                          A 1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            arneme @kiwi64ajs
                                            last edited by arneme

                                            @kiwi64ajs said in Multitech Conduit:

                                            @arneme said in Multitech Conduit:

                                            Upgrading the LoPy to the latest version (0.9.7.b1) and getting the order of the parameters right in the auth part of lora.join() call fixed the problem (yes, the order of the parameters actually changed between versions). The LoPy is now again working towards our Multitech stations :-)

                                            Ok, so what was the order previously and what order did you have to make it to work now?

                                            For new revisions of the firmware just follow this (scroll down for the OTAA part):
                                            https://docs.pycom.io/pycom_esp32/library/network.LORA.html?highlight=lora

                                            As you can see there the DevKey is now implicitly set to the MAC of the device and the order of the remaining parameters in the authorisation part of parameters in join is: AppEUI, AppKey

                                            The join used to take three parameters in the authorisation part and the order used to be: AppKey, AppEUI, DevEUI

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom