Forum Replies Created
-
AuthorPosts
-
@heather just FYI. I have attempted to do this on my work computer with the same result.
Is there somewhere I should log MMW problems? We often struggle with the timeseries viewer – it takes a long time to load. Is this a common problem? I thought perhaps it might be caused by our location (New Zealand).
Just adding to this thread. I have had this twice. Tonight I couldn’t find a solution despite trying different browsers and incognito mode.
I agree, it is a bit of a show stopper.
James
Further update. My modular sensors code is logging to MMW flawlessly. I never thought I would see the day! Obviously something worked with Sara’s bypass code:
The only other thing I would like to know is how to code the settings into a standard modular sensors code so that my LTE doesn’t forget them.
Thanks again Sara!
James (& the rest of the UoW team)
And here’s the bypass output. I think this worked! Any idea why, and how I could transfer to my modular sensors code?
James
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166[6008] Putting XBee into command mode...[7133] Setting I/O Pins...ATD81ATD91ATD71ATD51ATP01[7227] Setting Sleep Options...ATSM1[7245] Setting Other Options...ATDO0ATP10[7284] Making sure airplane mode is off...ATAM0[7303] Turning on Bypass Mode...ATAP5ATWRATAC[7385] Resetting the module to reboot in bypass mode...ATFR[7903] Attempting to reconnect to the u-blox SARA R410M module...[7905] ### TinyGSM Version: 0.10.6[7907] ### TinyGSM Compiled Module: TinyGsmClientSaraR4ATATATAT␀ATATATATATATATATATATATOKATE0OKAT+CMEE=2OKAT+CGMIu-bloxOKAT+GMMSARA-R410M-02BOK[12443] ### Modem: u-blox SARA-R410M-02B[12443] ### Modem: u-blox SARA-R410M-02BAT+CTZU=1OKAT+CPIN?+CPIN: READYOKAT+CGMIu-bloxOKAT+GMMSARA-R410M-02BOK[12701] ### Modem: u-blox SARA-R410M-02B[12703] Setting Cellular Carrier Options...AT+CFUN=0OKAT+UMNOPROF=1OKAT+URAT=7,8OKAT+UBANDMASK=0,134217732OKATOKAT+CFUN=15OK[16013] ### TinyGSM Version: 0.10.6[16013] ### TinyGSM Compiled Module: TinyGsmClientSaraR4AT␀␀ATATATATOKATE0+CPIN: READYOKAT+UMNOPROF?+UMNOPROF: 0OK[17674] Scanning for networks. This may take up to 3 minutesAT+COPS=0OKAT+COPS=?+COPS: (1,"530 05","530 05","53005",8),(1,"530 01","530 01","53001",8),(1,"530 01","530 01","53001",9),,(,23)(12K[197736] ### Unhandled: +COPS: (1,"530 05","530 05","53005",8),(1,"530 01","530 01","53001",8),(1,"530 01","530 01","53001",9),,(,23)(12K[197742] Waiting for network registrationAT+CEREG?+CEREG: 0,1OKAT+CCID+CCID: 8964050087214794989OK[197879] CCID: 8964050087214794989AT+CGSN356726104223995OK[197937] IMEI: 356726104223995AT+CIMI530058721479498OK[197996] IMSI: 530058721479498AT+COPS?+COPS: 0,0,"Spark NZ Spark NZ",8OK[198080] Operator: Spark NZ Spark NZAT+CGPADDR=1+CGPADDR: 1,100.103.173.237OK[198158] Local IP: 100.103.173.237AT+CPWROFFOK[198199] Powering down.Hi Sara,
Here’s the output from the carriage return code extension:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175[6008] Initializing the XBee...[6010] ### TinyGSM Version: 0.10.6[6010] ### TinyGSM Compiled Module: TinyGsmClientXBee+++OKATAP0OKATGT64OKATCT64OKATWROKATACOKATHSB08[7272] ### Modem: Digi XBee3 Cellular LTE-MATCNOK[7288] Putting XBee into command mode...+++OK[7522] Setting I/O Pins...ATD81OKATD91OKATD71OKATD51OKATP01OK[7610] Setting Sleep Options...ATSM1OKATSO0OK[7645] Setting Other Options...ATDO0OKATTD0AOKATP10OKATTM64OK[7716] Setting Cellular Carrier Options...ATCP1OKATN#0OK[7751] Setting the Band Mask...ATBM134217732OK[7778] Setting the APN...ATANm2mOKATAM0OKATWROKATACOK[7876] Ensuring XBee is in transparent mode...ATAP0OK[7895] Applying changes...ATWROKATACOKATCNOK[7972] Restarting XBee...+++OKATAM1OKATWROKATACOKATFROK+++[8742] ### NO RESPONSE FROM MODEM!+++OKATAM0OKATWROKATACOKATCNOK[9320] ### TinyGSM Version: 0.10.6[9320] ### TinyGSM Compiled Module: TinyGsmClientXBee+++OKATAP0OKATGT64OKATCT64OKATWROKATACOKATHSB08[9678] ### Modem: Digi XBee3 Cellular LTE-MATCNOKATAS[189704] ### NO RESPONSE FROM MODEM![189704] Waiting for network registration+++OKATAI22ATCNOK+++OKATDB69ATCNOK[190222] Signal quality: 0+++OKATAI22ATCNOK+++OKATDB69ATCNOK[190990] Signal quality: 0+++OKATAI22ATCNOK+++OKATDB69ATCNOK[191758] Signal quality: 0.... and so on ...Sigh, so I thought we had this but I’m getting the same result. My code is below, as well as the serial output.
Any thoughts?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196#define TINY_GSM_MODEM_XBEE#define TINY_GSM_RX_BUFFER 64#define TINY_GSM_YIELD_MS 2#define TINY_GSM_DEBUG Serial#include <Arduino.h>#include <StreamDebugger.h>#include <TinyGsmClient.h>StreamDebugger debugger(Serial1, Serial);TinyGsm gsmModem(debugger);const char* apn = "m2m";void setup() {// Set the reset pin HIGH to ensure the Bee does not continually resetpinMode(20, OUTPUT);digitalWrite(20, HIGH);// Set the sleep_rq pin LOW to wake the BeepinMode(23, OUTPUT);digitalWrite(23, LOW);// Set the input pin modepinMode(19, INPUT);// Set console baud rateSerial.begin(115200);delay(10);// Set XBee module baud rateSerial1.begin(9600);// Wait for warm-up, probably overkilldelay(6000);}void loop() {/** First run the TinyGSM init() function for the XBee. */DBG(F("Initializing the XBee..."));gsmModem.init();/** Then enter command mode to set pin outputs. */DBG(F("Putting XBee into command mode..."));if (gsmModem.commandMode()) {DBG(F("Setting I/O Pins..."));/** Enable pin sleep functionality on <code>DIO9</code>.* NOTE: Only the <code>DTR_N/SLEEP_RQ/DIO8</code> pin (9 on the bee socket) can be* used for this pin sleep/wake. */gsmModem.sendAT(GF("D8"), 1);gsmModem.waitResponse();/** Enable status indication on <code>DIO9</code> - it will be HIGH when the XBee* is awake.* NOTE: Only the <code>ON/SLEEP_N/DIO9</code> pin (13 on the bee socket) can be* used for direct status indication. */gsmModem.sendAT(GF("D9"), 1);gsmModem.waitResponse();/** Enable CTS on <code>DIO7</code> - it will be <code>LOW</code> when it is clear to send* data to the XBee. This can be used as proxy for status indication if* that pin is not readable.* NOTE: Only the <code>CTS_N/DIO7</code> pin (12 on the bee socket) can be used* for CTS. */gsmModem.sendAT(GF("D7"), 1);gsmModem.waitResponse();/** Enable association indication on <code>DIO5</code> - this is should be directly* attached to an LED if possible.* - Solid light indicates no connection* - Single blink indicates connection* - double blink indicates connection but failed TCP link on last* attempt** NOTE: Only the <code>Associate/DIO5</code> pin (15 on the bee socket) can be* used for this function. */gsmModem.sendAT(GF("D5"), 1);gsmModem.waitResponse();/** Enable RSSI PWM output on <code>DIO10</code> - this should be directly attached* to an LED if possible. A higher PWM duty cycle (and thus brighter* LED) indicates better signal quality.* NOTE: Only the <code>DIO10/PWM0</code> pin (6 on the bee socket) can be used for* this function. */gsmModem.sendAT(GF("P0"), 1);gsmModem.waitResponse();/** Enable pin sleep on the XBee. */DBG(F("Setting Sleep Options..."));gsmModem.sendAT(GF("SM"), 1);gsmModem.waitResponse();/** Disassociate from the network for the lowest power deep sleep. */gsmModem.sendAT(GF("SO"), 0);gsmModem.waitResponse();DBG(F("Setting Other Options..."));/** Disable remote manager, USB Direct, and LTE PSM* NOTE: LTE-M's PSM (Power Save Mode) sounds good, but there's no easy* way on the LTE-M Bee to wake the cell chip itself from PSM, so we'll* use the Digi pin sleep instead. */gsmModem.sendAT(GF("DO"), 0);gsmModem.waitResponse();/** Ask data to be "packetized" and sent out with every new line (0x0A)* character. */gsmModem.sendAT(GF("TD0A"));gsmModem.waitResponse();/* Make sure USB direct is NOT enabled on the XBee3 units. */gsmModem.sendAT(GF("P1"), 0);gsmModem.waitResponse();/** Set the socket timeout to 10s (this is default). */gsmModem.sendAT(GF("TM"), 64);gsmModem.waitResponse();DBG(F("Setting Cellular Carrier Options..."));// Carrier Profile - 0 = Automatic selection// - 1 = No profile/SIM ICCID selected// - 2 = AT&T// - 3 = Verizon// NOTE: To select T-Mobile, you must enter bypass mode!gsmModem.sendAT(GF("CP"), 1); //change to 1 for SparkgsmModem.waitResponse();// Cellular network technology - 0 = LTE-M with NB-IoT fallback// - 1 = NB-IoT with LTE-M fallback// - 2 = LTE-M only// - 3 = NB-IoT onlygsmModem.sendAT(GF("N#"), 0);gsmModem.waitResponse();//set the band mask for sparkDBG(F("Setting the Band Mask..."));gsmModem.sendAT(GF("BM134217732"));gsmModem.waitResponse();DBG(F("Setting the APN..."));/** Save the network connection parameters. */gsmModem.gprsConnect(apn);DBG(F("Ensuring XBee is in transparent mode..."));/* Make sure we're really in transparent mode. */gsmModem.sendAT(GF("AP0"));gsmModem.waitResponse();/** Write all changes to flash and apply them. */DBG(F("Applying changes..."));gsmModem.writeChanges();/** Finally, exit command mode. */gsmModem.exitCommand();/** Force restart the modem to make sure all settings take. */DBG(F("Restarting XBee..."));gsmModem.restart();} else {// wait a bitdelay(30000L);// try againreturn;}// Scan for networks - this is probably really slowgsmModem.sendAT(GF("AS"));gsmModem.waitResponse(180000L, GF("S"), GF("ERROR"));while (Serial1.available()) {Serial.println(Serial1.readStringUntil('\r'));}// Wait forever for a connectionDBG(F("Waiting for network registration"));while (!gsmModem.isNetworkConnected()) {int csq = gsmModem.getSignalQuality();DBG("Signal quality:", csq);delay(250);}// Scan for networks - this is probably really slowgsmModem.sendAT(GF("AS"));gsmModem.waitResponse(180000L, GF("S"), GF("ERROR"));while (Serial1.available()) {Serial.println(Serial1.readStringUntil('\r'));}// Print some stuff after connectedString ccid = gsmModem.getSimCCID();DBG("CCID:", ccid);String imei = gsmModem.getIMEI();DBG("IMEI:", imei);String imsi = gsmModem.getIMSI();DBG("IMSI:", imsi);String cop = gsmModem.getOperator();DBG("Operator:", cop);IPAddress local = gsmModem.localIP();DBG("Local IP:", local);// Shut downgsmModem.poweroff();DBG("Powering down.");// And do nothing forever more.while (1) {}}123456789101112131415161718192021222324252627[6008] Initializing the XBee...[6010] ### TinyGSM Version: 0.10.6[6010] ### TinyGSM Compiled Module: TinyGsmClientXBee[7272] ### Modem: Digi XBee3 Cellular LTE-M[7288] Putting XBee into command mode...[7522] Setting I/O Pins...[7610] Setting Sleep Options...[7645] Setting Other Options...[7716] Setting Cellular Carrier Options...[7751] Setting the Band Mask...[7778] Setting the APN...[7876] Ensuring XBee is in transparent mode...[7895] Applying changes...[7972] Restarting XBee...+++[8742] ### NO RESPONSE FROM MODEM![9320] ### TinyGSM Version: 0.10.6[9320] ### TinyGSM Compiled Module: TinyGsmClientXBee[9678] ### Modem: Digi XBee3 Cellular LTE-MATAS[189704] Waiting for network registration[190222] Signal quality: 0[190990] Signal quality: 0[191758] Signal quality: 0[192526] Signal quality: 0[193294] Signal quality: 0..... for two hours...Thanks so much for your help. I will try this tonight when I get home!
Have a wonderful Christmas.
James
Thanks for the prompt reply Sara. You must love these LTE’s by now!
I have had some feedback from Spark who suggest that they have lots of other SARA R410M devices running on the network.
Sara, does the information below mean anything to you? I figure that I would construct code using “gsmModem.sendAT(GF(“”)) ” to send these configurations to the LTE?
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758# Initial module SW resetat+cfun=15# Set verbose error codesat+cmee=2# model identificationat+cgmmSARA—R410-02B# Get the current module FW versionat+cgmrL0.0.00.00.05.06 [Feb 03 2018 13:00:41]# set MNO profile to look from SIM (ICCID)at+umnoprof=1# Force only LTE-M1 radio protocols# at+urat=7,7,7at+urat=7# set Spark LTE-M1 bands in bit-mask - LTE-M1 using Band-3 (1800MHz) & Band-28 (700MHz)at+ubandmask=0,134217732# configure APN & save configat+cgdcont=1,”IP”,”m2m”at&w# Second module SW resetat+cfun=15# enable NW registration and location registrationat+cereg=1# Check if NW registration has occurred and if we can see the Spark LTE-M1 NW broadcastsat+cops?+cops: 0,0,"Spark NZ Spark NZ",8OK# check if NW registered (result code should be ‘1,1’ - ‘enabled’, registered’at+cereg?+CEREG: 1,1OK# check if PDP context attached on APN1 (result code should be ‘1’)at+cgatt?+CGATT: 1OK# check on configured active APN’sat+cgdcont?+CGDCONT: 1,"IP","m2m","10.1.2.137",0,0,0,0OK# check on configured active APN’s acquired WAN IP address(s)at+cgpaddr=1+CGPADDR: 1,10.1.2.137OKJust a further update on above. The IoT provider thinks that the UBlox needs to be told to register.
He suggested using the AT commands:
AT+CPIN?
AT+CREG?
AT+COPS=?Am I correct in assuming that the way to do this would be via the code below:
1234567891011121314151617gsmModem.sendAT(GF("CPIN?"));gsmModem.waitResponse(180000L, GF("S"), GF("ERROR"));while (Serial1.available()) {Serial.println(Serial1.readStringUntil('\r'));}gsmModem.sendAT(GF("CREG?"));gsmModem.waitResponse(180000L, GF("S"), GF("ERROR"));while (Serial1.available()) {Serial.println(Serial1.readStringUntil('\r'));}gsmModem.sendAT(GF("COPS=?"));gsmModem.waitResponse(180000L, GF("S"), GF("ERROR"));while (Serial1.available()) {Serial.println(Serial1.readStringUntil('\r'));}Hi,
I have a similar issue with our Xbee3 LTE. I have the hardware set up identical to how Letsid has it above. I am using the ‘LTExBee_FirstConnection.ino’ code, with the only amendment being a change of the apn to ‘m2m’ (as required for the Spark network). The serial output I get from this code (after the initial setup) is: “Signal quality = 0”, over and over. I left this for an hour and still got the same message.
I have a few questions/comments that might get me a step closer:
1) Do I need to do anything to the sim before inserting it? Cellphone sims need to be activated, but the instructions from the NZ IOT provider (Spark) suggested that I should just insert it, turn on the LTE and then ‘test’ it from their developers portal.
2) Cell signal is unlikely to be the problem as I am testing this at my house in an urban area. However, is there a way I can query the LTE to see what signals it can see (rather than connected signal) to determine if the antenna is the problem?
3) Spark provides 3G, 4G, 5G and CAT-M1 coverage (Spark NZ network coverage). CAT-M1 seems to be the most appropriate for this method. Should I be doing something different to specify that I want to use the CAT-M1 network as opposed to the 3G or 4G?
4) I understand network bands need to align with the capability of the Xbee3 LTE. Spark CAT-M1 operates on Band 28 (700MHz) and Band 3 (1800MHz). The LTE seems to support bands 1, 2, 3, 4, 5, 8, 12, 13, 17, 18, 19, 20, 25, 26, 28 and 39, therefore I don’t think this is the problem.
5) Is there anything else that anyone can think of that might prevent the LTE from working here in New Zealand?
6) Would I have more success with a Hologram sim? These operate on the Vodafone network in NZ, but at least my methods would align with everyone else.
5) Another option would be to purchase a developers board and ensure that network connections are addressed in XCTU rather than operating blind on the Mayfly. Would this help?
As always, thanks for your help.
Regards,
James
-
AuthorPosts