Today I recieved my MKR-NB1500 and I feel like a noob but I cant get it connected. I'm using a simcard which works perfect in my phone (call/SMS/DATA) but I cant get it connected in the IOT cloud. It seems the configuration needs to have a PIN/UserName/Password but my APN doesn't require authentication. But without that information I can't upload my sketch. When I verify my sketch It's saying "Network not configured yet. Please configure the Network on the Setup tab to verify and upload the sketch."
Hi @gercod. It seems that this use case was not considered in the design of the Arduino IoT Cloud integrated sketch editor. But that is not really a problem. The Arduino IoT Cloud editor is essentially only a simplified version of the more versatile Arduino Web Editor (referred to as the "full editor" in the Arduino IoT Cloud interface). You always have the option of using Arduino Web Editor to edit, compile, and upload your Thing sketches once you have done the initial set up via Arduino IoT Cloud.
Try this:
Click the Open full editor button.
Your Thing sketch will now open in Arduino Web Editor.
Click the "thingProperties.h" tab in the Arduino Web Editor window.
Thanks for your reaction! I followed your advise but the device is still offline in de IOT Cloud.
I used some Sketches on my Desktop Ide and I had no problem sendings txt messages of starting a connection to the web. So i dont think thats the problem but it's something else
Contact Arduino Tech Support via https://www.arduino.cc/en/contact-us/ and give details of the issue and what you have done so far. Make sure your SIM card is activated and has data.
It seems I had a little data shortage So I fixxed that issue
The problem now is that most of the time I got the message 'SIM not present or wrong PIN' but when I do a reset on the Arduine board sometimes I got the message 'SIM Card OK / Connected to the GPRS network'. When this is happening after a couple of seconds the board is re-connecting itself and the connection is lost again.
I am facing the same issue as you. I am using the MKR1500 in the Netherlands with the 1NCE service provider. Card does not come with any pin numbers, so after following the fix mentioned above it does connect but shortly after it randomly reboots and says "Sim not present or wrong PIN".
I have checked and have plenty of Data left, but unfortunately the device stills remain offline
I've been searching around the web but couldn't find any fix yet for the "Offline" issue and the "Sim not present or wrong PIN" issue.
@el_nino_bv If you want to connect to the IoT cloud with a sim card from say "1nce.com" which does not have a PIN Number, Username or Password, the only thing needed is to change arduino_secrets.h as follows:
I got in touch with Arduino Tech Support and was able to successfully update my SARA module from A.02.01 to A.02.04 then to A.02.16 thanks to their help. This fixed the connection issue of the MKR 1500 to the Arduino IoT cloud.. kinda!
However, it automatically reboots every few seconds now - which makes it unusable. I think it's something to do with my code but I am looking into it now. Will let you know!
@Dozie No, I am using 1nce (www.1nce.com)! But I think I figured out the issue. Once I have it working I will share my code back! I'm setting up a tiny gps with the MKR 1500 and the Arduino Cloud. It is a lot more challenge than I initially planned
Okay finally it's working!! I had some issues with the GPS, I believed it was the cause of constant rebooting. Adding if() to this line seems to have resolved it:
if(gps.encode(Serial1.read()))// encode gps data
Beside, I also had some issues with the sketch running on its own without a serial monitor connected, so I tried uploading the code without serial.being and serial.print and that also seemed to have worked. Now the sketch can run on its own.
ALSO SUPER IMPORTANT - Even if the gps blinked and showed "GPS Fix", I didn't receive values from it until I went outside in the open sky. Once I went outside with it, it finally started showing correct GPS position values and the Arduino dashboard could display it! (yay!)
I hope the code can help other people trying to get GPS working on an MKR NB 1500 and the cloud. If anyone has question feel free to reach out!
/*
Sketch generated by the Arduino IoT Cloud Thing "Sara"
https://create.arduino.cc/cloud/things/6af1c0aa-e2b5-4242-99f2-ddfa73c6145c
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
CloudTemperatureSensor temperature;
CloudLocation tag_position;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h" // things Library
#include "Adafruit_AM2320.h" // Temperature Sensor Library
#include "TinyGPS++.h" // GPS Library
// Classes & objects
TinyGPSPlus gps; // gps object
Adafruit_AM2320 AM2320 = Adafruit_AM2320(); // AM2320 class
void setup() {
// Initialize serial and wait for port to open:
//Serial.begin(115200);
Serial1.begin(9600); // GPS serial - since there's no software serial with SamD boards
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(3000);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
AM2320.begin(); // inside the loop or else it doesn't read
temperature = AM2320.readTemperature(); // Read Temp
while(Serial1.available()){ // check for gps data
if(gps.encode(Serial1.read()))// encode gps data
{
tag_position = {gps.location.lat(),gps.location.lng()}; // Read
//Serial.println(gps.location.lat(),gps.location.lng());
}
}
delay(2000);
}
Hi, @el_nino_bv!
I'm having troubles upgrading the SARA module firmware from A.02.04 to A.02.16, may I ask how you could do it?
Also, I've been having headache understanding how to properly manage reconnections from the network but I can't find a solution: when, for example, I unplug the antenna or the SIM, the board never detects this! I've ben trying with nbAccess.isAccessAlive, NB.status() and NBClient.connected() but it doesn't seem to work... any tips?
The best way to go about it is to reach out Arduino tech support and they can then give you a detailed explanation how to do the upgrade. Once you have the newer version of A.02.16 then you shouldn't have trouble.
I would also recommend checking for status and such by using the AT commands. Just note that some specific AT commands are different depending on the version. You can have access to the AT terminal by uploading the example code on the Arduino MKR 1500.
I've indeed contacted Arduino support in the past two weeks, but I couldn't upload the firmware they gave me into the module with ExtraPuTTy because of an "unknown error" (basically, files not found).
I was wondering what procedure they made you follow (another contact in Arduino suggested that FOTA is not possible, the soldering way being the only choice), was it by the serial sketch?
First, I upload the "SerialSARAPassthrough" example sketch, then check for the current firmware version (A.02.04).
Then: open ExtraPuTTy (with the correct COM, Serial, Baud Rate in "Session" and Line discipline set to Force On in "Terminal") -> AT (wait for OK) -> AT+UFWUPD=3 (wait for OK) -> Files transfer -> Xmodem 1K -> Send -> I select the file that Arduino support provided; instead of proceding, the process never starts and in the bottom-left corner of the window I get the error: “Error File not found!”.
And that's it for the procedure; since it happened many times in a row I asked to check the firmware they sent and send it again, so retried.
Same result though.
No worries, yes I could update the firmware: in the end I think that the file they sent me was corrupted, so asked for another one and it all went smooth.
I couldn't test the reconnection yet because of other projects absorbing all the time, but I'll be retrying with the new firmware version soon (few hopes that this will do, but hope is the last to go)