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

    Someone can write a step by step guide for connecting LoPy to TTN ( in my case I don't have any gateway but I want to use LoPy as a micro-gateway) Thanks.

    Scheduled Pinned Locked Moved LoPy
    12 Posts 6 Posters 3.8k Views 8 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.
    • OfficinaO Offline
      Officina
      last edited by Officina

      Re: OTAA connection to TTN

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sakis @Officina
        last edited by

        @Officina

        Hi. At the moment there's no official tutorial about connecting to TTN, other than the forum topic you have already found. Have you tried connecting using the information provided at that topic?

        We will add that to our documentation feature list.

        1 Reply Last reply Reply Quote 0
        • G Offline
          gertjanvanhethof Pybytes Beta
          last edited by

          This is a returning discussion.
          LoPy is a nano-gateway and this means just one channel is used instead of a minimum of 3 (which is needed for LoRaWAN compliancy).
          So the LoPy can only act as a one channel gateway and only can serve one channel LoRaWAN devices (like another LoPy).
          For connection the nano-gateway to TTN you should implement http://www.grpc.io/ which is not there yet.
          There is a python version: http://www.grpc.io/docs/tutorials/basic/python.html
          But this one is NOT micropython.
          So someone should fist backport this to micropython and then we can interact with TTN as gateway.

          Till than you can connect the LoPy to TTN as a node. See: https://www.thethingsnetwork.org/docs/devices/lopy/
          This is working fine. You are able to receive messages from your LoPy but only when you in range at a full LoRaWAN gateway.

          1 Reply Last reply Reply Quote 0
          • J Offline
            jmarcelino
            last edited by

            Things are in motion ;-)

            0_1484160320230_Screen Shot 2017-01-11 at 18.43.03.png

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

              @jmarcelino Nice!! Well done, can you share more? :-)

              Cheers,
              Daniel

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                jmarcelino @daniel
                last edited by jmarcelino

                @daniel
                So far it's simple really, I started experimenting with UDP sockets yesterday, then expanded to implement a simplified (just Rx and Stat) version of the Semtech LoRa gateway protocol which TTN supports: https://github.com/Lora-net/packet_forwarder/blob/v2.2.0/PROTOCOL.TXT

                Today I added LoRa from the nano-gateway example, so it's not real LoRaWAN yet at the moment. Next I'll try to capture actual single-channel LoRaWAN traffic and if possible forward to TTN.

                Ultimate goal would be to match the ESP8266 Lua single-channel gateway code - https://github.com/JaapBraam/LoRaWanGateway - which is amazing and likely the closest thing possible to a real SX1301-based gateway, but that would very likely require your help - or to go down to the ESP-IDF level.

                D G 2 Replies Last reply Reply Quote 0
                • D Offline
                  daniel @jmarcelino
                  last edited by

                  @jmarcelino thanks for the detailed info!

                  Ultimate goal would be to match the ESP8266 Lua single-channel gateway code - https://github.com/JaapBraam/LoRaWanGateway - which is amazing and likely the closest thing possible to a real SX1301-based gateway, but that would very likely require your help - or to go down to the ESP-IDF level.

                  We would be more than glad to help you with that. You should not have to go down to ESP-IDF level, but if there's any functionality that you need not already exposed via the MicroPython API just let us know and we'll add it :-)

                  Cheers,
                  Daniel

                  J B 2 Replies Last reply Reply Quote 0
                  • J Offline
                    jmarcelino @daniel
                    last edited by jmarcelino

                    @daniel
                    Great, thanks for offering to help.

                    I was going to look at BLE but hearing from Espressif staff on esp32.com it seems Bluetooth is about to go through major changes in the imminent esp-idf 2.0 so might take up a nice LoRa challenge instead :-)

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

                      @jmarcelino for this:

                      Add support for receiving multiple SF's on a channel

                      We will need to implement a few things in C.

                      1 Reply Last reply Reply Quote 1
                      • B Offline
                        Batilan @daniel
                        last edited by

                        @daniel said in Someone can write a step by step guide for connecting LoPy to TTN ( in my case I don't have any gateway but I want to use LoPy as a micro-gateway) Thanks.:

                        Ultimate goal would be to match the ESP8266 Lua single-channel gateway code - https://github.com/JaapBraam/LoRaWanGateway - which is amazing and likely the closest thing possible to a real SX1301-based gateway, but that would very likely require your help - or to go down to the ESP-IDF level.

                        We would be more than glad to help you with that. You should not have to go down to ESP-IDF level, but if there's any functionality that you need not already exposed via the MicroPython API just let us know and we'll add it :-)

                        That would be great :-) I think we need to have the CAD detection functionality as it is in the detector() and dio0handler() functions in https://github.com/JaapBraam/LoRaWanGateway/blob/master/src/SX1276.lua somehow exposed

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          gertjanvanhethof Pybytes Beta @jmarcelino
                          last edited by

                          @jmarcelino Can you explain how data is sent to TTN. Based on the TTN Gateway documentation you should use gRPC. Is there an alternative? Where can I find documentation about this?

                          B 1 Reply Last reply Reply Quote 0
                          • B Offline
                            Batilan @gertjanvanhethof
                            last edited by Batilan

                            @gertjanvanhethof : Note that TTN will allow gateways using the current Semtech demo protocol (UDP) to connect as well, see https://www.thethingsnetwork.org/forum/t/packet-forwarder-future/4021/3

                            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 / 1
                            • First post
                              Last post

                            Pycom on Twitter

                            Pycom