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

    Send Sensor data using to server using LoRa

    Scheduled Pinned Locked Moved FiPy
    lora gatewaylorafipypysenseserver
    6 Posts 2 Posters 2.0k Views 2 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.
    • N Offline
      Nazz
      last edited by

      Hello Team,

      Can anyone help me with sending the sensor data from (Ex. using FiPy & Pysense ) to server using LoRa. Node should send the sensor data to gateway, where gateway is connected to our local pc / internet from where i should be able to send the data to server. I have tried with setting up one node & one gateway and tried with the code provided in the documentation but not getting the output.

      I have setup, Node side using pysene with fipy so that it can send sensor data to gateway, gateway side again used fipy with expansion borad.

      Kindly help me with this.

      Thank You

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

        Hi @nazz,

        Where are you based? It helps to know your LoRaWAN region and also exactly which code you are using (there are different versions for different regions)

        Also can you describe your gateway setup a bit better. Where is your gateway connected to, is it The Things Network? Do you see the gateway online there?

        N 2 Replies Last reply Reply Quote 0
        • N Offline
          Nazz @jmarcelino
          last edited by

          @jmarcelino

          Thank you for your response, basically from India. Am using the code from following link

          https://docs.pycom.io/chapter/tutorials/lora/lora-mac-nano-gateway.html

          And about the gateway i did not setup in TTN. I have just connected 1-FiPy with lora antenna to one computer as considering as node and running node code in that , & 1-FiPy with lora antenna to other computer considering as gateway and running gateway code in that. And am able to receive data from node to gateway(i,e one computer to other).

          We have our server hosted and mongo db installed, now i wanted to send the data received at gateway from node to the mongo db.

          Thank You

          1 Reply Last reply Reply Quote 0
          • N Offline
            Nazz @jmarcelino
            last edited by

            @jmarcelino

            Hello, Am using attached two codes at node side and gateway side. but at the gateway side am getting an below error.
            "TypeError: unsupported types for add: 'str', 'bytes'"

            Please reply as soon as possible.

            1_1523608147214_node.py 0_1523608147184_gateway.py

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

              @nazz said in Send Sensor data using to server using LoRa:

              unsupported types for add: 'str', 'bytes'"

              Can you post the full error message including line number and where is the error is it on the node or gateway? It'll then be easier to help you.

              Sounds like a very straightforward error where you are trying to add something which is not a string to a string, so look closer at code locations where you do those concatenations.

              N 1 Reply Last reply Reply Quote 0
              • N Offline
                Nazz @jmarcelino
                last edited by

                @jmarcelino
                Am getting the error at gateway side. Error message with line number is as below
                Traceback (most recent call last):
                File "<stdin>", line 47, in <module>
                TypeError: unsupported types for add: 'str', 'bytes'

                Gateway code is attached also node side code is attached. And also please let me know whether i have used correct method to send data to server in the gateway code, using below lines of code

                response = urequests.get("http://localhost/ksn/server.php?data=" + msg)
                response.close()

                1_1523684617338_node.py 0_1523684617338_gateway.py

                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