geget
November 6, 2017, 2:08pm
1
Hi all and first sorry for my english
I just bought a mkr 1200.
Im trying to read the sigfox id in order to register my device.
I send the program below to the arduino and i've got these message on serial port meaning that sigfox is not working.
Do you have an idea about what is the issue. Thanks a lot for your help.
Serial messages (log) :
OK1
OK2
Shield error or not present!
#include <SigFox.h>
#include <ArduinoLowPower.h>
void setup() {
Serial.begin(9600);
while(!Serial) {};
Serial.println("OK1");
if (!SigFox.begin()) {
Serial.println("OK2");
Serial.println("Shield error or not present!");
return;
}
String version = SigFox.SigVersion();
String ID = SigFox.ID();
String PAC = SigFox.PAC();
// Display module informations
Serial.println("MKRFox1200 Sigfox first configuration");
Serial.println("SigFox FW version " + version);
Serial.println("ID = " + ID);
Serial.println("PAC = " + PAC);
Serial.println("");
Serial.print("Module temperature: ");
//Serial.println (SigFox.temperatureInternal());
Serial.println("Register your board on Activate | Sigfox Buy with provided ID and PAC");
delay(100);
// Send the module to the deepest sleep
SigFox.end();
}
void loop()
{
return;
}
geget
November 7, 2017, 8:43am
2
Any idea ?
Should i have to sendback my mkr fox 1200 ?
nicolsc
November 14, 2017, 3:52pm
3
Hi @geget
Looking at SigFox/SigFox.cpp at master · arduino-libraries/SigFox · GitHub , there are two ways to get into if (!SigFox.begin())
:
Undefined SIGFOX_SPI
var. Supposed to be covered by the MKRFOX core libs
Version issue, cf
String version = SigVersion();
if (version == "0.0")
return false;
Can you log the SigVersion() output ?
Hi geget
I just found the resolution of your problem.
Your problem is in this line :
Serial.println(SigFox.temperatureInternal());
You just have to switch temperature and Internal
Serial.println(SigFox.internalTemperature());
I find the resolution on the source code of the librarie here :
/*****************************************************************************/
/*
Arduino library for Atmel SIGFOX module ATA8520.
This library uses Arduino SPI library.
*/
/*****************************************************************************/
/*
Copyright (c) 2016 Arduino LLC
This software is open source software and is not owned by Atmel;
you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.
You acknowledge that the ArduinoUNO software is distributed to you free of
charge on an "as is" basis and that it has not been developed to meet your
specific requirements. It is supplied in the hope that it will be useful but
WITHOUT ANY WARRANTY that its use will be uninterrupted or error-free.
All other conditions, warranties or other terms which might have effect
This file has been truncated. show original
Have a good day guys!
ps : Sorry too for my english ahah