GithubHelp home page GithubHelp logo

Comments (8)

ronniesa avatar ronniesa commented on May 29, 2024

Let us double check as we don't use the simulator lately as the CI is using real gateway and devices and the unit tests use a bit different code. As the 32SupportdFcnt was probably added after the simulator was completed. @Mandur do you have an idea?

One quick test is to add to your device twin: "Supports32BitFCnt": false. Try also with true. As we do caching a restart (or call the clearcache method) of the netwrk server module (ev. clear the Redis cache too) would be required.

from iotedge-lorawan-starterkit.

pietrobr avatar pietrobr commented on May 29, 2024

I try to add a desiresd property "Supports32BitFCnt" and set it yo true, now the interal property of the Engine is set to true, but the MIC validation fails anyway in function payload.CheckMic

from iotedge-lorawan-starterkit.

ronniesa avatar ronniesa commented on May 29, 2024

I would tend to believe that for the Simulator as with most of the Lora devices Supports32BitFCnt must be set to false. This is also the default.
Are you sure that the keys are not inverted? Maybe you could try to use the same value for the ntw and the app key.
Could be that we have a bug in the Simulator

from iotedge-lorawan-starterkit.

pietrobr avatar pietrobr commented on May 29, 2024

I set Supports32BitFCnt to false, that was the default value and the MIC validation fails.

Setting AppSKey, NetSkey if they are the same doesn't seem affecting the MIC validation from a quick test.

Question: having a quick look at the code of the Engine I don't see the use of the testconfig.json, where is it used?

does the payload.CheckMic in the Engine need the testconfig.json?

from iotedge-lorawan-starterkit.

Mandur avatar Mandur commented on May 29, 2024

Hello @pietrobr, Thanks for reporting the issue. I think the problem is our documentation that is missing an element. Could you please try to add the following settings to your debug settings of the LoRaEngine : IOTEDGE_DEVICEID to "gateway". PS. You could set it to any string, as you are not using gateway mode I don't think it will matter.

Let me know if that fix it

from iotedge-lorawan-starterkit.

pietrobr avatar pietrobr commented on May 29, 2024

Hi @Mandur I've tried to set the string "gateway" with and without quotes, but nothing changed.

I'm not sure if the IOTEDGE_DEVIEID is used in payload.CheckMic that it's where the MIC validation fails.

from iotedge-lorawan-starterkit.

Mandur avatar Mandur commented on May 29, 2024

Hmmm, sorry you are right, when I tried to replicate your error this is the problem I had... I am unable to replicate the error you are facing :(. It would be of great help to get the settings you are using so I could reproduce

from iotedge-lorawan-starterkit.

ronniesa avatar ronniesa commented on May 29, 2024

As the problem was the mismatch of the ntw and app key we close the issue as resolved.

from iotedge-lorawan-starterkit.

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.