-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does this package support cooking-hacks RN2483? #25
Comments
I've been testing a lot with the RN2483 myself and I don't have any issues with receiving the correct data. Although I don't know exactly what you mean with cooking-hacks RN2483? There shouldn't be any difference in how nodes encrypt as the encrypting meganism is defined by the specs. Ae you sure that you did set your AppSKey correctly in both LoRa App Server and your node? Please note that in some scripts / for some nodes you need to enter it LSB, in some others MSB. This makes a difference in what you will receive 😉 In case you have doubts, start testing with a key that is equal to its reverse byte order (e.g. |
@brocaar I double checked the setting and have tested a key that is equal to its reverse byte order. It still not work. If you have time, would you please run the JavaScript I mentioned before to get a better understanding? Thanks again. |
Hi, @brocaar, Problem solved. I apologize for my carelessness. I did not encode the data with base 64.
Thank you for your help and patience. Best Regards, |
Hi, Brocaar,
I am wondering whether this package support RN2483 chip because the encryption algorithm at gateway seems not same as the one at node. Please follow my thought below.
For example, assuming that we have a string data "longtest" needs to be sent to a node. And we have network session key and app session key go like this:
The downlink packet sent by your lorawan system (lora-gateway-bridge/ lorawan-server/ lorawan-app-server) goes like this:
When my RN2483 node receive this downlink, the decrypted buffer is not the ASCII for string "longtest".
Later, I found another tool for encrypting/decrypting LoRa packets here: https://github.com/anthonykirby/lora-packet/
And I write a script (test.js) to illustrate the problem:
The output shows that the encryption algorithm of this package is not same as that running on cooking-hacks RN2483. (The encryption algorithm running in the RN2483 nodes is same as the one in JavaScript repo I mentioned before.) Would you please give me some help on this issue? Thank you.
Best Regards,
Xuanliang
The text was updated successfully, but these errors were encountered: