I also tried this with a nice struct, tried char* or uint8_t*)&msg,… and also got now and then huge messages for no reason. Depending on the first values I got everything right or nothing in the rest of the variables. So I changed it to:
payload[0] = (byte) ((temperature_coded & 0xFF00) >> 8 );
payload[1] = (byte) ((temperature_coded & 0X00FF) );
etc… (temperature is a 16 bit value)
and send payload directly, never bogus or double messages anymore! Important to declare payload as: char payload[size]
It could be a SAMD issue, just try it and let me know if it solves your problem.
Posts made by Crowdsourcer
-
RE: More messages than expected on application server.
-
RE: More messages than expected on application server.
@Martijn-Kooijman I think you may have a problem with the data packing. You probably defined a String datatosend, then datatosend=(const char*)&payload; where payload is an array of several bytes of data you want to send (like with TTN)? It goes nuts sometimes, but not always, so you may think it works but it is not correct, even if you have declared it with attribute((packed)). Solution: just send an int array (After AT+USOST=…).
-
RE: More messages than expected on application server.
No, antenna plug seems fine, still 30% message loss this afternoon.
-
RE: More messages than expected on application server.
Update: the UFL antenna connector may not have been tightly connected, it was angled up a bit. It seems that these connectors soon develop some play after some light use. I will update you if this solved it.
-
RE: More messages than expected on application server.
It surprized me that several messages did not arrive because I had good results with the Sigfox implementation of IoT (if reception was good). @Stefan-de-Lange : So I will look into COAP, do you have some advice to get me started?
-
RE: More messages than expected on application server.
@Martijn-Kooijman Yes, I had the same problems, took me a few days to improve it but I am still not satisfied. At first it seemed to run fine with 6 s delay after a SARA power up and reset, but messages sometimes were crazy long (never sent that), or skipped. A 30 s delay did give improvements. But, even after a 30 s delay a message may not arrive (about 1 in 10 in Allthingstalk). I do have the modem set to NB, to speed things up, but still it is slow. Today I increased to 35 s but no further improvement, still some messages are skipped. I am sending every 15 min 6 bytes, sometimes there is only one message in an hour! Reception is perfect. So my hope would be that a new firmware would make it faster.
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange
Yes, there seem to be test solder pads that belong to the SARA chip, but nowhere mentioned what they are (there are 6 of them). I prefer to wait for a serial pass through update such as tested by: https://forum.arduino.cc/index.php?topic=628808.15 Problem seems that it is difficult to get the update file from Ublox (they only provide the USB flash update). -
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange said in Arduino MKR NB1500: lukt niet om te verbinden.:
AT+USOCR=17,7000
Regarding the modem firmware update: I contacted Arduino and their hardware team is working hard to release instructions and the proper files to do the update. However they cannot mention a release date yet. Let’s hope for a fast release!
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange Thank you so much, it works now! My message appears at the IoT dashboard or T-Mobile.
The joke is that I bought these modules last Friday, and updating the modem seems very difficult. I would need to do that using a pass through AT+ command method. I will contact Arduino for that. Thanks a lot again! Bert -
RE: Arduino MKR NB1500: lukt niet om te verbinden.
AT+USOST=0,“172.27.131.100”, 15683, 11, “48656c6c6f20576f726c64”
werkt ook niet.
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange said in Arduino MKR NB1500: lukt niet om te verbinden.:
AT+USOST=2,“172.27.131.100”,15683,11,“48656c6c6f20576f726c64”
AT+USOST=0,“172.27.131.100”,15683,11,“48656c6c6f20576f726c64” werkt dus niet!
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange said in Arduino MKR NB1500: lukt niet om te verbinden.:
AT+NSOST=0,“172.27.131.100”,15683,11,“48656c6c6f20576f726c64”
Ik bedoelde dat AT+NSOST=0,“172.27.131.100”,15683,11,“48656c6c6f20576f726c64”
een error geeft, ik kies dan NSOST socket nummer op basis van terugmelding van AT+USOCR=17, 7000 in dit geval was het 0.
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange said in Arduino MKR NB1500: lukt niet om te verbinden.:
AT+USOCR=17,7000 (message +USOCR: 2)
Helaas, geeft +CME ERROR: Operation not allowed
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange Mijn Arduino heeft een u-blox SARA-R410M-02B, zoals ik in de pdf link had aangegeven.
-
RE: Arduino MKR NB1500: lukt niet om te verbinden.
Hierbij mijn eerste vertalingspoging van de T-Mobile guide naar Arduino MKR NB 1500 modem AT commands Het werkt nog niet, graag aanvullen, alvast bedankt!
Deel 2: Network attach:
AT+NRB wordt: AT+CFUN=15
AT+NCONFIG=“AUTOCONNECT”,“TRUE” wordt: …??
AT+NCONFIG=“CR_0354_0338_SCRAMBLING”,“TRUE” wordt: …??
AT+NCONFIG=“CR_0859_SI_AVOID”,“TRUE” wordt: …??
AT+NCONFIG? wordt: …??
AT+CGDCONT=0,“IP”,“cdp.iot.t-mobile.nl” wordt: AT+CGDCONT=1,“IP”,“cdp.iot.t-mobile.nl” (foutje in handleiding: =0?)
AT+CFUN=1 Werkt!
AT+NBAND=8 wordt: …??
AT+COPS=1,2,“20416” Werkt!
AT+CSQ Werkt (geeft 20,99), dus goed signaal.
AT+CGATT? Werkt (geeft een 1, dus connected)
AT+CGPADDR Werkt (message terug: IP adres)
AT+NPING=“172.27.131.100” wordt: …??
AT+CGSN=1 wordt: AT+CGSNDeel 4: “Hello world”
AT+NSOCR=“DGRAM”,17,7000,1 wordt???: … AT+USOCR=17,7000 (message +USOCR: 2)
AT+NSOST=0,“172.27.131.100”,15683,11,“48656c6c6f20576f726c64” wordt…??: AT+USOST=2,“172.27.131.100”,15683,11,“48656c6c6f20576f726c64” maar geeft errors!AT commands U-Blox modems:
U-Blox N2 modem (waarschijnlijk de T-Mobile handleiding): https://www.u-blox.com/sites/default/files/SARA-N2-N3_ATCommands_%28UBX-16014887%29.pdf
U-Blox R4 modem (in Arduino MKR NB1500): https://www.u-blox.com/sites/default/files/SARA-R4_ATCommands_%28UBX-17003787%29.pdf -
RE: Arduino MKR NB1500: lukt niet om te verbinden.
@Stefan-de-Lange said in Arduino MKR NB1500: lukt niet om te verbinden.:
UBLOX N2
Bedankt, dat verklaart een boel. Helaas werkt op de Sara N4 modems ook AT+CFUN=16 niet, alleen 15 is toegestaan. Ik ga het nu even testen.
-
Arduino MKR NB1500: lukt niet om te verbinden.
De handleiding op deze site om te connecten met T-Mobile lijkt niet te werken voor de Arduino MKR NB1500. De meeste AT commando’s worden niet herkend (response: “ERROR”). De handleiding start met AT+NRB, NRB komt echter niet voor als AT commando in de Ublox handleiding van het narrow band modem. AT+CGPADDR werkt en geeft een IP adres terug.
Data versturen lukt echter niet. Heeft iemand een handleiding hoe dit moet met het Arduino MKR NB1500 board?