I have been trying to join an mkr1310 on my chirpstack v3 local network.
I have run FirstConfiguration.ino but it will not connect. Can someone help with this? What are the correct parameters to use? Thanks
Cheers,
Bob
have a read of how-to-get-the-best-out-of-this-forum
post your code?
what is the problem? e.g. code not compiling, LoRa module does not initialize, not connecting to the LoRaWAN server, etc???
do you have access to the LoRaWAN gateway? if so you can check the log to see if the MKR1310 is attempting to join
Thanks, Horace, for the offer of help. I apologize for the brief information and will try to fill in the details here.
My experience is very limited with programming but I have a working knowledge of Linux. I have a weather station (N4MRV-1 --- Ashland, Virginia Current Weather Conditions) to which I have connected several sensors via LoRa and MQTT. I lave a local LoRaWAN network with a RAK7244 server running chirpstack v3.
The Arduino MKR1310 is connected to a Win10 machine running Arduino IDE 2.3.3. The program I am running is FirstConfiguration.ino (see below)
The program compiles and uploads and give me the following:
Your module version is: 1.3.0.0
Your device EUI is: 39:30:31:30:52:31:79:08
Are you connecting via OTAA (1) or ABP (2)? [I use OTTA]
Enter your APP EUI [I use 0000000000000000]
Enter your APP KEY [I use 01020304050607080910111213141516]
I get no other messages except that there is no connection and am advised that I should move closer to the window [LoRa gateway is about 10 feet away].
There is no attempted join message on the gateway as I have seen in installing other sensors. I can't find any trace of data coming from the MKR1310.
It seems as if the MKR1310 isn't sending out any radio signal but I don't know how to check this.
Thanks for any suggestions. I'll be happy to send any additional information needed.
Cheers,
Bob (Ashland, VA)
=======================================================
/*
First Configuration
This sketch demonstrates the usage of MKR WAN 1300/1310 LoRa module.
This example code is in the public domain.
*/
#include <MKRWAN_v2.h>
LoRaModem modem;
// Uncomment if using the Murata chip as a module
// LoRaModem modem(Serial1);
String appEui;
String appKey;
String devAddr;
String nwkSKey;
String appSKey;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial);
Serial.println("Welcome to MKRWAN1300/1310 first configuration sketch");
Serial.println("Register to your favourite LoRa network and we are ready to go!");
// change this to your regional band (eg. US915, AS923, ...)
if (!modem.begin(US915)) {
Serial.println("Failed to start module");
while (1) {}
};
Serial.print("Your module version is: ");
Serial.println(modem.version());
Serial.print("Your device EUI is: ");
Serial.println(modem.deviceEUI());
int mode = 0;
while (mode != 1 && mode != 2) {
Serial.println("Are you connecting via OTAA (1) or ABP (2)?");
while (!Serial.available());
mode = Serial.readStringUntil('\n').toInt();
}
int connected;
if (mode == 1) {
appEui = "0000000000000000";
appKey = "01020304050607080910111213141516";
connected = modem.joinOTAA(appEui, appKey);
} else if (mode == 2) {
Serial.println("Enter your Device Address");
while (!Serial.available());
devAddr = Serial.readStringUntil('\n');
Serial.println("Enter your NWS KEY");
while (!Serial.available());
nwkSKey = Serial.readStringUntil('\n');
Serial.println("Enter your APP SKEY");
while (!Serial.available());
appSKey = Serial.readStringUntil('\n');
devAddr.trim();
nwkSKey.trim();
appSKey.trim();
connected = modem.joinABP(devAddr, nwkSKey, appSKey);
}
if (!connected) {
Serial.println("Something went wrong; are you indoor? Move near a window and retry");
while (1) {}
}
delay(5000);
int err;
modem.setPort(3);
modem.beginPacket();
modem.print("HeLoRA world!");
err = modem.endPacket(true);
if (err > 0) {
Serial.println("Message sent correctly!");
} else {
Serial.println("Error sending message :(");
}
}
void loop() {
while (modem.available()) {
Serial.write(modem.read());
}
modem.poll();
}
Sorry, I posted the wrong code in my reply. Correct code I'm using is:
/*
First Configuration
This sketch demonstrates the usage of MKR WAN 1300/1310 LoRa module.
This example code is in the public domain.
*/
#include <MKRWAN.h>
LoRaModem modem;
// Uncomment if using the Murata chip as a module
// LoRaModem modem(Serial1);
String appEui;
String appKey;
String devAddr;
String nwkSKey;
String appSKey;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial);
Serial.println("Welcome to MKR WAN 1300/1310 first configuration sketch");
Serial.println("Register to your favourite LoRa network and we are ready to go!");
// change this to your regional band (eg. US915, AS923, ...)
if (!modem.begin(US915)) {
Serial.println("Failed to start module");
while (1) {}
};
Serial.print("Your module version is: ");
Serial.println(modem.version());
if (modem.version() != ARDUINO_FW_VERSION) {
Serial.println("Please make sure that the latest modem firmware is installed.");
Serial.println("To update the firmware upload the 'MKRWANFWUpdate_standalone.ino' sketch.");
}
Serial.print("Your device EUI is: ");
Serial.println(modem.deviceEUI());
int mode = 0;
while (mode != 1 && mode != 2) {
Serial.println("Are you connecting via OTAA (1) or ABP (2)?");
while (!Serial.available());
mode = Serial.readStringUntil('\n').toInt();
}
int connected;
if (mode == 1) {
Serial.println("Enter your APP EUI");
while (!Serial.available());
appEui = Serial.readStringUntil('\n');
Serial.println("Enter your APP KEY");
while (!Serial.available());
appKey = Serial.readStringUntil('\n');
appKey.trim();
appEui.trim();
connected = modem.joinOTAA(appEui, appKey);
} else if (mode == 2) {
Serial.println("Enter your Device Address");
while (!Serial.available());
devAddr = Serial.readStringUntil('\n');
Serial.println("Enter your NWS KEY");
while (!Serial.available());
nwkSKey = Serial.readStringUntil('\n');
Serial.println("Enter your APP SKEY");
while (!Serial.available());
appSKey = Serial.readStringUntil('\n');
devAddr.trim();
nwkSKey.trim();
appSKey.trim();
connected = modem.joinABP(devAddr, nwkSKey, appSKey);
}
if (!connected) {
Serial.println("Something went wrong; are you indoor? Move near a window and retry");
while (1) {}
}
delay(5000);
int err;
modem.setPort(3);
modem.beginPacket();
modem.print("HeLoRA world!");
err = modem.endPacket(true);
if (err > 0) {
Serial.println("Message sent correctly!");
} else {
Serial.println("Error sending message :(");
}
}
void loop() {
while (modem.available()) {
Serial.write(modem.read());
}
modem.poll();
}
what happens if you hardcode the LoRaWAN parameters, e.g.
connected = modem.joinOTAA("0000000000000000", "01020304050607080910111213141516");
I assume you are getting the message "Something went wrong; are you indoor? Move near a window and retry"
LoRa should work OK over 10feet
can you upload the serial monitor output (copy and post as text using code tags </>)
I've tried a few things. For some reason, when running FirstConfiguration.ino I only get the signon message :
Welcome to MKR WAN 1300/1310 first configuration sketch
Register to your favourite LoRa network and we are ready to go!
I was originally getting the OTTA request for eui and key. Now it just stops with no error messages.
The compiler output is as follows:
==============================================
Compiler output from FirstConfiguration.ino
==============================================
FQBN: arduino:samd:mkrwan1310
Using board 'mkrwan1310' from platform in folder: C:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13
Using core 'arduino' from platform in folder: C:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13
Detecting libraries used...
C:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_MKRWAN1310 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8059 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino MKR WAN 1310" -DUSE_BQ24195L_PMIC -DVERY_LOW_POWER -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino/api/deprecated -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino/api/deprecated-avr-comp -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\variants\mkrwan1300 C:\Users\bgrat\AppData\Local\Temp\arduino\sketches\911AA8977F76746212B74AB18A02A6DC\sketch\FirstConfiguration.ino.cpp -o nul
Alternatives for MKRWAN.h: [MKRWAN@1.1.0]
ResolveLibrary(MKRWAN.h)
-> candidates: [MKRWAN@1.1.0]
C:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_MKRWAN1310 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8059 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino MKR WAN 1310" -DUSE_BQ24195L_PMIC -DVERY_LOW_POWER -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino/api/deprecated -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino/api/deprecated-avr-comp -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\variants\mkrwan1300 -Ic:\Users\bgrat\Documents\Arduino\libraries\MKRWAN\src C:\Users\bgrat\AppData\Local\Temp\arduino\sketches\911AA8977F76746212B74AB18A02A6DC\sketch\FirstConfiguration.ino.cpp -o nul
Generating function prototypes...
C:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_MKRWAN1310 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8059 -DUSBCON -DUSB_MANUFACTURER="Arduino LLC" -DUSB_PRODUCT="Arduino MKR WAN 1310" -DUSE_BQ24195L_PMIC -DVERY_LOW_POWER -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/ -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/ -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino/api/deprecated -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino/api/deprecated-avr-comp -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino -IC:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\variants\mkrwan1300 -Ic:\Users\bgrat\Documents\Arduino\libraries\MKRWAN\src C:\Users\bgrat\AppData\Local\Temp\arduino\sketches\911AA8977F76746212B74AB18A02A6DC\sketch\FirstConfiguration.ino.cpp -o C:\Users\bgrat\AppData\Local\Temp\2645451796\sketch_merged.cpp
C:\Users\bgrat\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\bgrat\AppData\Local\Temp\2645451796\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_MKRWAN1310 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8059 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino MKR WAN 1310\"" -DUSE_BQ24195L_PMIC -DVERY_LOW_POWER "-IC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.13\\cores\\arduino/api/deprecated" "-IC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.13\\cores\\arduino/api/deprecated-avr-comp" "-IC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.13\\cores\\arduino" "-IC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.13\\variants\\mkrwan1300" "-Ic:\\Users\\bgrat\\Documents\\Arduino\\libraries\\MKRWAN\\src" "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC\\sketch\\FirstConfiguration.ino.cpp" -o "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC\\sketch\\FirstConfiguration.ino.cpp.o"
Compiling libraries...
Compiling library "MKRWAN"
Compiling core...
Using previously compiled file: C:\Users\bgrat\AppData\Local\Temp\arduino\sketches\911AA8977F76746212B74AB18A02A6DC\core\variant.cpp.o
Using precompiled core: C:\Users\bgrat\AppData\Local\Temp\arduino\cores\arduino_samd_mkrwan1310_1712431f2307d1b0c6f46b5a837b077a\core.a
Linking everything together...
"C:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" "-LC:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC" -Os -Wl,--gc-sections -save-temps "-TC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.13\\variants\\mkrwan1300/linker_scripts/gcc/flash_with_bootloader.ld" "-Wl,-Map,C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.map" --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -o "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.elf" "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC\\sketch\\FirstConfiguration.ino.cpp.o" "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC\\core\\variant.cpp.o" -Wl,--start-group "-LC:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math -lm "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/..\\..\\cores\\arduino_samd_mkrwan1310_1712431f2307d1b0c6f46b5a837b077a\\core.a" -Wl,--end-group
"C:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.elf" "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.bin"
"C:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.elf" "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.hex"
Using library MKRWAN at version 1.1.0 in folder: C:\Users\bgrat\Documents\Arduino\libraries\MKRWAN
"C:\\Users\\bgrat\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-size" -A "C:\\Users\\bgrat\\AppData\\Local\\Temp\\arduino\\sketches\\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.elf"
Sketch uses 19624 bytes (7%) of program storage space. Maximum is 262144 bytes.
Global variables use 4032 bytes (12%) of dynamic memory, leaving 28736 bytes for local variables. Maximum is 32768 bytes.
Performing 1200-bps touch reset on serial port COM4
Waiting for upload port...
Upload port found on COM7
"C:\Users\bgrat\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe" -i -d --port=COM7 -U true -i -e -w -v "C:\Users\bgrat\AppData\Local\Temp\arduino\sketches\911AA8977F76746212B74AB18A02A6DC/FirstConfiguration.ino.bin" -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Apr 30 2019 12:41:57
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID : 10010005
version()=v2.0 [Arduino:XYZ] Apr 30 2019 12:41:57
Version : v2.0 [Arduino:XYZ] Apr 30 2019 12:41:57
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security : false
Boot Flash : true
readWord(addr=0x40000834)=0x7000a
BOD : true
readWord(addr=0x40000834)=0x7000a
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.815 seconds
Write 19624 bytes to flash (307 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)
[====== ] 20% (64/307 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)
[============ ] 41% (128/307 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0x1000)
[================== ] 62% (192/307 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x5000, size=0x1000)
[========================= ] 83% (256/307 pages)write(addr=0x20005000,size=0xcc0)
writeBuffer(scr_addr=0x20005000, dst_addr=0x6000, size=0xcc0)
[==============================] 100% (307/307 pages)
done in 0.155 seconds
Verify 19624 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = 275e
checksumBuffer(start_addr=0x3000, size=0x1000) = 6f46
checksumBuffer(start_addr=0x4000, size=0x1000) = d318
checksumBuffer(start_addr=0x5000, size=0x1000) = eae6
checksumBuffer(start_addr=0x6000, size=0xca8) = 3e09
Verify successful
done in 0.017 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)
I compiled and uploaded the MKRWANFWUpdate_standalone.ino and got the following in the monitor:
Output from MKRWANFWUpdate_standalone.ino
Welcome to MKR WAN 1300/1310 first configuration sketch
Register to your favourite LoRa network and we are ready to go!
Press a key to start FW update
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0447 (STM32L07xxx/08xxx)
- RAM : Up to 20KiB (8192b reserved by bootloader)
- Flash : Up to 192KiB (size first sector: 32x128)
- Option RAM : 32b
- System RAM : 8KiB
Write to memory
Erasing memory
Wrote and verified address 0x08000100 (0%)
Wrote and verified address 0x08000200 (0%)
---------skip---------
Wrote and verified address 0x08020100 (99%)
Wrote and verified address 0x08020200 (99%)
Wrote and verified address 0x08020280 (100%)
Done.
Starting execution at address 0x08000000... done.
Flashing ok :)
1.3.0.0
A compile and rerun of FirstConfiguration.ino gave me the same results as mentioned above. Hardcoding as you suggested didn't change anything.
Hope this tells you something.
Cheers,
Bob
maybe worth posting the problem on the Chirpstack Forum
Done, thanks Horace.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.