Alex9779 / LoFence_Firmware

Other
0 stars 0 forks source link

How to set LoRa MAC settings #1

Closed hughec1329 closed 2 months ago

hughec1329 commented 2 months ago

la66.h mentions lora mac commands set in config.h, but cant see anywhere in repo? is there a template somewhere that I use to create or is this created during compiling? Sorry if basic question I'm brand new to atmel studio, can get kiu to compile with secret.h per instructions in main.h, but can't see similar for lofence v2? lofence v2 compiles no worries, just not sure what keys it's using! Great project btw, fantastic to see lofence extended and improved, love the downlink options and decoders for chirpstack, thanks for all your work!

Alex9779 commented 2 months ago

Which lines in la66.h are you referring? Actually the la66 module I created is not yet polished as it should be...

hughec1329 commented 2 months ago

line 98 thanks for the speedy reply!

Alex9779 commented 2 months ago

Oh well, that's what I meant, this is some copy&paste residue :P There is no config.h in the project anymore. The LA66 module used in my interation of the LoFence is pretty much pre-configured with keys and everything, you just power it on and it tries to join a network.

hughec1329 commented 2 months ago

great thanks for the info, we all leave residue! just so I understand you're getting the preset dev/app eui and apkey via serial from la66 e.g. sending at+cfg, then entering to chirp/ttn got a few la66 on order just waiting to arrive so I can solder onto board and have a play

Alex9779 commented 2 months ago

just so I understand you're getting the preset dev/app eui and apkey via serial from la66 e.g. sending at+cfg, then entering to chirp/ttn

Not really, the module does that all on its own. I should maybe be a little bit more specific, in my first post speaking about "module" I meant the C code in la66.h and la66.c which I consider a code or software module. After that I meant the hardware LA66 module. So this hardware LA66 module is completely pre-configured, has a unique DEV EUI and other keys burned, you can change if you want but not with my software module, I didn't implement this. So basically my firmware just enables the module and then it automatically starts to try to join a network with its keys, that's a different approach than the RN2483 module. With that you had to do this all on your own. After powering it on my firmware just has to wait for a successful join and then proceeds.

Alex9779 commented 2 months ago

got a few la66 on order just waiting to arrive so I can solder onto board and have a play

I am curious, does that mean you got LoFence-V2 PCBs or do you mean other "boards"? I bought the USB-Stick with the LA66 to play with the module which has been a very good decision because the control of the module is not so simple due to some not so nice design decisions of its firmware...

hughec1329 commented 2 months ago

thanks that makes more sense. how are you getting hw module's burned keys to enter into gateway and allow otaa join? from photos it looks like deveui written on chip but appeui and appkey can get via serial from the update firmware link in your readme

Alex9779 commented 2 months ago

how are you getting hw module's burned keys to enter into gateway and allow otaa join?

Every hardware module has a sticker in the package with the keys...

hughec1329 commented 2 months ago

hahah that is too easy! thanks for answering my silly questions! yep ordered from jlc, waiting on la66, thanks again for your work. have 10km stock fencing to keep an eye on, if can get these working will save lots of time & motorbike petrol!

Alex9779 commented 2 months ago

1820DCF3-A714-48FA-B78B-C86DF874745E_1_201_a

Alex9779 commented 2 months ago

yep ordered from jlc, waiting on la66, thanks again for your work

Very cool, keep me updated, if you got some other troubles or questions you can also reach my by mail, it is in my profile...

hughec1329 commented 2 months ago

Very cool, keep me updated, if you got some other troubles or questions you can also reach my by mail, it is in my profile...

legend thanks Alex, will do!