Hey everyone!
I'm have troubles to set up the Arduino with my LoRaWAN Gateway by Multitech. I've already got some RN2483 on Raspberries via the Connection board sending in the Network without problems and wanted to try it out on the Arduino now as well.
When using the example code from the tutorial for LoRaWAN I get only errors for every single step, beginning at "sys get ver", returning "invalid_param" (see
http://imgur.com/zTYx5rg). So I thought I'd skip the library and directly send the commands via Serial:
Code:
void setup() {
// put your setup code here, to run once:
LoRaWAN.ON(SOCKET1);
Serial.begin(57600);
Serial.println("sys reset\r\n");
delay(3000);
Serial.println(Serial.readString());
delay(3000);
Serial.println("mac reset 868\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("sys get ver\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("sys get hweui\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("mac set appkey 13E54A2F8CA2D4A8B7A58AB02E6787C9\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("mac set deveui 0004A30B001BD2C4\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("mac set appeui A9CE2BF59712D1B5\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("mac save\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("sys get vdd\r\n");
Serial.println(Serial.readString());
delay(3000);
Serial.println("mac join otaa\r\n");
Serial.println(Serial.readString());
delay(5000);
This however works only about ~25% of the times I run the script, the other times it will fail at one of the set commands, leading to a failed join command (key_not_init) or the join command itself fails (invalid_param).
http://imgur.com/o9RlkuG This shows the script running twice in a row without any change to it in between, once going through and once getting an invalid_param for the "mac set appkey", how can this be? Already tried different boards, shield, USB cable, and microchip, none of it helped... Maybe something to do with a too low power supply? But it should run connected to the computers usb outlet, or no? sys get vdd returns ~3200. Any help or ideas are appreciated!
Thanks a lot