I believe he’s using ABP from one of the earlier photos, which at least removes the possibility of copying in DevEUI as MSBF instead of LSBF. With that said without knowing if the Dev Address and Nwk and App Keys are in fact actually correct and in the correct format for the code he’s using it’s a little bit of a hit or miss.
@mojnetwork What channel is your Single Channel gateway listening on? Just because the node says it’s successfully sent the packet on Channel 0, 1, and 2 doesn’t actually mean it was received by your gateway.
If you are using ABP the Device and App EUI does not matter (also helpful to just comment it out) in your code which is why I referred to the LSB vs MSB issue before. Also If you are using LSB for your Device address and your Network and Session keys there is a problem as the LMIC code you are using as far I know and most implementations are MSB for those instances. If you want to use OTAA and are testing that you need to set your device as such and then you can worry about the LSB vs MSB issue with the EUI’s.
I would like to test also OTTA version not sure if i just comment somestuff(NwkSkey, AppSkey, DevAddr) in the code?
OTTA Device overview has 3 keys Device EUI, Application EUI and App Key(this one is missing in code)… is there any example of the code for OTTA?
So i am trying with this OTA code(link u provided): matthijskooijman/arduino-lmic
Gateway
Device Data
Arduino Serial Monitor:
Is this ok? I mean Device App Data status is orange “activation”?
And here it hangs …i am not getting any data.
I suppose code should be sending “hello world” msg in intervals(it is not doing that).
Can you add LMIC_setLinkCheckMode(1); after LMIC_reset();?
As for your compiler error, are you sure everything is typed and indented properly as well? The not declared in this scope issue tends to be something simple like missing an underscore or having a line somewhere where the compiler is not expecting it.
void forceTxSingleChannelDr() {
for(int i=0; i<9; i++) { // For EU; for US use i<71
if(i != channel) {
LMIC_disableChannel(i);
}
}
// Set data rate (SF) and transmit power for uplink
LMIC_setDrTxpow(dr, 14);
}
and than setup …
os_init();
LMIC_reset();
// Force Single Channel
forceTxSingleChannelDr();
LMIC_setLinkCheckMode(1);
// Start job (sending automatically starts OTAA too)
do_send(&sendjob);
I can see i my Gate Traffic that simulated download package has been sent.
I have received this package in my Gateway
I did not get any notification from my Node in my serial monitor.
It did not trigger this(“if(LMIC.dataLen)”):
case EV_TXCOMPLETE:
// use this event to keep track of actual transmissions
Serial.print("EV_TXCOMPLETE, time: ");
Serial.println(millis() / 1000);
if(LMIC.dataLen) { // data received in rx slot after tx
//debug_buf(LMIC.frame+LMIC.dataBeg, LMIC.dataLen);
// data received in rx slot after tx
Serial.print(F("Received "));
Serial.print(LMIC.dataLen);`Preformatted text`