Coder Social home page Coder Social logo

Comments (1)

hallard avatar hallard commented on May 18, 2024

@ukritkh
did you tried the latest push (26 days ago)?
I should detect what packet forwarder you are using, because mp_pkt_fwd (new one) and poly_pkt_fwd (legacy) handle UDP message format not the same way.
What packet forwarder are you using?
Would you mind sharing your /opt/loragw/global_conf.json that should contain also the local gwtraf server on port 1688 (the one where oled.py is listening)

    "gateway_conf": {
        "gateway_ID": "yourGWID",
        "description": "CH2i TTN GW For testing  purpose",
        "servers": [
            {
                "server_fallbacks": [
                    "mqtts://bridge.asia-se.thethings.network",
                    "mqtts://bridge.us-west.thethings.network",
                    "mqtts://bridge.brazil.thethings.network"
                ],
                "server_address": "bridge.eu.thethings.network",
                "serv_gw_id": "loragw-17dd",
                "serv_type": "ttn",
                "serv_gw_key": "ttn-account-v2.yourTTNkey",
                "serv_enabled": true
            },
            {
                "serv_port_up": 1688,
                "serv_type": "gwtraf",
                "serv_enabled": true,
                "server_address": "127.0.0.1",
                "serv_port_down": 1689
            }
        ],
        "contact_email": "",
        "fake_gps": false,
        "gps": false
    }
}

If you're using the poly_pkt_fwd the field is lsnr

lora_snr = js_data["rxpk"][0]["lsnr"]

I don't know for mp_pkt_fwd (may be lora_snr = js_data["lsnr"] since I'm not using it because it does not works with downlink other than from TTN backend. Buy you can see JSON frame uncommenting this lines in oled.py and launching it by hand

loragw@loragw-17dd:/opt/loragw $ sudo service oled stop
loragw@loragw-17dd:/opt/loragw $ sudo ./oled.py
{"rxpk":[{"tmst":481511819,"time":"2018-07-02T12:58:04.352688Z","chan":0,"rfch":1,"freq":868.100000,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","lsnr":10.5,"rssi":-29,"size":27,"data":"QPh5zR4AyAYLp9tSQPOzsIW6TwtqxHVEL0HC"}]}

from loragw-setup.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.