Giter Club home page Giter Club logo

Comments (3)

rgillan avatar rgillan commented on August 22, 2024

We've masked most of the above by commenting out rows 707-710 in packet.js.

Seeing another buffer range error:

{"tmst":2727136675,"chan":2,"rfch":0,"freq":917.2,"stat":-1,"modu":"LORA","datr":"SF7BW125","codr":"OFF","lsnr":-7.5,"rssi":-103,"size":5,"data":"q5r5mNQ="}
buffer.js:972
throw new RangeError('Index out of range');
^

RangeError: Index out of range
at checkOffset (buffer.js:972:11)
at Buffer.readInt8 (buffer.js:1098:5)
at _initialiseFromWireformat (/usr/local/lib/node_modules/lora-packet/lib/packet.js:166:33)
at LoraPacket._fromWire (/usr/local/lib/node_modules/lora-packet/lib/packet.js:116:13)
at Object.exports.fromWire (/usr/local/lib/node_modules/lora-packet/lib/packet.js:7:8)
at Socket.stage0.on (/Users/rob/Documents/repositories/nisient/loragw/gwtest1680.js:48:19)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:658:8)

from lora-packet.

anthonykirby avatar anthonykirby commented on August 22, 2024

thanks for reporting these!
I clearly merged a PR without checking that it contained plausible code. I'll review & fix.

from lora-packet.

anthonykirby avatar anthonykirby commented on August 22, 2024

I've committed a fix for some of these (+ tests as test/test_github_issue17.js) but the really short packets which give an "index out of range" I think aren't valid LoRa. If I'm wrong, please point me in the right direction & I'd love to get them parsed properly.

from lora-packet.

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.