Coder Social home page Coder Social logo

Comments (9)

Suretronic avatar Suretronic commented on August 28, 2024

Further.
It works ok with frequency 866200000, which indicates either a calculation problem or problem parsing the server request.
Fix would appreciated if poss. Cheers Ron

from lorawangateway.

JaapBraam avatar JaapBraam commented on August 28, 2024

This is a bug in https://github.com/JaapBraam/LoRaWanGateway/blob/master/src/LoRaWanGW.lua#L191

from lorawangateway.

Suretronic avatar Suretronic commented on August 28, 2024

Hi JaapBraam
Apologies, missed seeing your response until now. If it isn't fixed in that line yet (no chance to check yet), it shouldn't be too difficult to sort out. Much appreciated ... and the gateway is great work by the way, particularly with such an innovative approach to handling multiple spreading factors. Best wishes, Ron.

from lorawangateway.

jrw77 avatar jrw77 commented on August 28, 2024

My solution for line 191 (split into lines and indented for better readability):

  local fix=data:sub(5):gsub('"freq":(%d+)[.](%d+)',
    function(d,f) 
        local h=f; 
        while h*10 < 1000000 do 
            h=h*10 
        end; 
        while #f > 0 and f:sub(1,1) == '0' do  
            h=h/10; 
            f = f.sub(2) 
        end; 
        return '"freq":'..(d*1000000+h) 
    end)

from lorawangateway.

JaapBraam avatar JaapBraam commented on August 28, 2024

Looks good!

If it works as expected, please create a pull request to fix the bug.

from lorawangateway.

jrw77 avatar jrw77 commented on August 28, 2024

Actually, I´d love to, but first I have to get my gateway to receive its first package. I am struggling with creating a node that would send a package. My current approach is to use the same code base (second set of nodemcu/D1 + sx1276, Ra-01) and basically call

function send(mydata)
    padlen = (4 - (#mydata) % 4) % 4;
    
    pkt = { codr="4/5",
            data=mydata,
            freq=CONFIG["GW_FREQ"],
            ipol=true,
            modu="LORA",
            powe=27,
            rfch=0,
            size= #mydata + padlen,
            tmst=tmr.now()+8000,
            datr=CONFIG["GW_SF"]..CONFIG["GW_BW"]
         };
    radio.txpk(pkt)
end

This does send something, which I can perceive as a chirp in a receiver tuned to that frequency, but my gateway (configured to the same frequency and spreading factor) does not receive it. Anything obvious that I overlooked? Does radio.txpk(pkt) send a packet format that the gateway ignores, as it seems to come from another gateway (would make sense to reduce ping-pong interference)?

from lorawangateway.

Rubensen avatar Rubensen commented on August 28, 2024

DIO pins configured correctly ? I expend hours last week with exactly this issue with a Wemos board...

from lorawangateway.

jrw77 avatar jrw77 commented on August 28, 2024

When I shorten the pins to 3V3, the correct interrupt handler gets called (rx timeout on DIO0, rxpk on DIO1, which does not find data available). I don´t think I damaged the sx1276 outputs by that, but it helped to check the wiring to the nodemcu.
I am using 433175 kHz, as my module is for that freq band, do you think that is an issue?

from lorawangateway.

Kingwulin avatar Kingwulin commented on August 28, 2024

When I shorten the pins to 3V3, the correct interrupt handler gets called (rx timeout on DIO0, rxpk on DIO1, which does not find data available). I don´t think I damaged the sx1276 outputs by that, but it helped to check the wiring to the nodemcu.
I am using 433175 kHz, as my module is for that freq band, do you think that is an issue?

I guess you are a Chinese, I meet some question on the function of detecting multiple SF,would I have a talk with you over QQ or wechat (:

from lorawangateway.

Related Issues (20)

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.