Comments (9)
HI Alex. The command sequence looks fine, seems to just be getting no MQTT broker connection within the time given.
For your module type (SARA-R412M-02B-01 I believe) uMqttConnect() (the AT+UMQTTC=1
in the log) allows 15 seconds for the broker connection (see here). You could maybe try increasing that value 60000, as an experiment, to see if it just needs longer for some reason?
from ubxlib.
Hi @alexmaron81: how did this go in the end?
from ubxlib.
Hi Rob, I haven't been able to test any further yet. I was on holiday last week. Friday I have another meeting with thailand.
from ubxlib.
Can i ping an ip address?
from ubxlib.
The cellular module does support a command called AT+UPING
but it is not something we have so far been asked to implement in ubxlib
. If you wanted to add it yourself you could paste something like this into the end of u_cell_net.c
:
int32_t uCellNetPing(uDeviceHandle_t cellHandle, const char *pDestination)
{
int32_t errorCode = (int32_t) U_ERROR_COMMON_INVALID_PARAMETER;
uCellPrivateInstance_t *pInstance;
uAtClientHandle_t atHandle;
if (gUCellPrivateMutex != NULL) {
U_PORT_MUTEX_LOCK(gUCellPrivateMutex);
pInstance = pUCellPrivateGetInstance(cellHandle);
if ((pInstance != NULL) && (pDestination != NULL)) {
atHandle = pInstance->atHandle;
uAtClientLock(atHandle);
uAtClientCommandStart(atHandle, "AT+UPING=");
// Write destination
uAtClientWriteString(atHandle, pDestination, true);
uAtClientCommandStopReadResponse(atHandle);
errorCode = uAtClientUnlock(atHandle);
}
U_PORT_MUTEX_UNLOCK(gUCellPrivateMutex);
}
return errorCode;
}
...adding a header for it as follows in u_cell_net.h
:
/** Ping an address.
*
* @param cellHandle the handle of the cellular instance.
* @param[in] pDestination the destination IP address or domain; cannot be NULL.
* @return zero on success or negative error code on
* failure.
*/
int32_t uCellNetPing(uDeviceHandle_t cellHandle, const char *pDestination);
from ubxlib.
Hi Rob, I'm getting an error
AT+UPING="10.65.66.157"
ERROR
CONNECT-BoxAT+UMQTT=3,"10.65.66.157"
is it true what is written in the following link?
from ubxlib.
Gah, yes, re-checking the SARA-R4 AT manual:
Sorry, no ping on SARA-R412M.
from ubxlib.
can i do it in a different way?
from ubxlib.
Not that I can think of I'm afraid. In theory you could connect at PPP-level and use the native ESP-IDF IP stack to do the ping but we have never tried making a PPP connection on a SARA-R412 and it would be a major change to the way your SW works to build and use PPP.
If what you would like to do is to check connectivity with a specific server or servers, what I would do is run a UDP echo client on a known/open port of that server, then you could send UDP packets to that server on that port and check for the echoed response coming back. Of course you would need access to the server-side to do this. Mind you, you might need access to the server-side in any case to be sure that it is configured to respond to ping.
Alternatively, beneath the MQTT protocol which I guess you are trying to test lies TCP, so if you opened a TCP connection on whatever your MQTT port is and that connection was successfully opened at TCP level then you have proved that there is connectivity, assuming that is your aim, you don't need to do any MQTT stuff at all. So you could just follow the pattern of the TLS sockets example (assuming you have TLS security) or otherwise the sockets example (if you don't have TLS security) to the IP address and port number of your MQTT broker.
But that is, of course, a more complicated arrangement than a UDP echo arrangement or ping.
from ubxlib.
Related Issues (20)
- SAM-M10Q Current Draw Issue 3.3V, ~1mA instead of ~10mA HOT 5
- Zephyr device tree BLE NUS in nRF52832 HOT 8
- ESP-IDF can not initialise port HOT 2
- ***ERROR*** A stack overflow in task eventTask has been detected. HOT 10
- Unable to activate PDP context HOT 10
- uNetworkInterfaceUp: pCfg is not optional for U_NETWORK_TYPE_CELL HOT 2
- No Port Logging
- SARA-R5 Power On and Enable expected hardware connections HOT 11
- Refresh radio parameters delay HOT 4
- ESP-IDF OTA update with cellular network interface HOT 6
- uGnssPosGet sometimes fails with U_ERROR_COMMON_NOT_INITIALISED HOT 18
- Using ubxlib to interface two ublox peripherals HOT 3
- strncpy faills to compile in ESP-IDF HOT 5
- Ublox MAX-M10: Getting errror -5 for uGnssInfoGetVersions and -2 for uGnssPosGet HOT 2
- Unable to bring up GNSS! HOT 21
- USECMNG invalid certificate/key format HOT 18
- esp32c6 i2c m10 HOT 7
- uCellInfoGetTimeUtc - AT+CCLK sometimes returns invalid date HOT 3
- esp idf i2c legacy driver issue HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ubxlib.