54#if defined(SFE_IRIDIUM_ARDUINO)
55#define IRIDIUM_9604_DEVICE_BASE_CLASSES public Print, public SparkFun_Iridium_9604::SfeDebugPrint, public SparkFun_Iridium_9604::urcHandlerInterface
57#define IRIDIUM_9604_DEVICE_BASE_CLASSES public SparkFun_Iridium_9604::SfeDebugPrint, public SparkFun_Iridium_9604::urcHandlerInterface
106 bool begin(
unsigned long baud);
109#if defined(SFE_IRIDIUM_ARDUINO)
349 unsigned int lac,
unsigned int ci,
int Act));
357 unsigned int tac,
unsigned int ci,
int Act));
367 virtual size_t write(uint8_t c);
374 virtual size_t write(
const char *str);
382 virtual size_t write(
const char *buffer,
size_t size);
383#if defined(SFE_IRIDIUM_ARDUINO)
507 uint8_t *h, uint8_t *min, uint8_t *s, int8_t *tz);
528 uint8_t h, uint8_t min, uint8_t s, int8_t tz);
1646 unsigned int days = 14,
unsigned int period = 4,
unsigned int resolution = 1,
1647 unsigned int gnssTypes = 65,
unsigned int mode = 0,
unsigned int dataType = 15);
1725 uint8_t *response =
nullptr,
size_t responseSize = 0,
size_t *responseLen =
nullptr,
1907 bool getNMEA(
const char *msgId,
bool pollIfNoURC =
true);
2000 bool processNMEA(
const char *sentence,
size_t length);
2050 bool signalQuality =
true,
bool serviceAvailability =
true,
2051 bool svBeamCoordinates =
false);
2062 bool *serviceAvailability,
bool *svBeamCoordinates);
2524#define _RXBuffSize 2056
2532#define _partialLineSize 256
2757 size_t hwPrint(
const char *s);
#define IRIDIUM_9604_DEVICE_BASE_CLASSES
The base classes of DevIridium9604. On Arduino, DevIridium9604 is also a Print.
Definition: Iridium_9604.h:57
IRIDIUM_9604_cier_mode_t
+CIER <mode>
Definition: Iridium_9604_typedefs.h:580
@ IRIDIUM_9604_CIER_MODE_ENABLE
Enable indicator event reporting (+CIEV URCs)
Definition: Iridium_9604_typedefs.h:582
IRIDIUM_9604_tcp_socket_status_t
The TCP socket status (+USOCTL=socket,10).
Definition: Iridium_9604_typedefs.h:239
const uint8_t IRIDIUM_9604_NMEA_OUTPUT_DISABLED
The module sets <output> to 0 when <rate> is 0.
Definition: Iridium_9604_typedefs.h:547
IRIDIUM_9604_mqtt_nv_parameter_t
The +UMQTTNV operations.
Definition: Iridium_9604_typedefs.h:346
IRIDIUM_9604_rat_t
The radio access technologies (+URAT). New for the 9604.
Definition: Iridium_9604_typedefs.h:496
IRIDIUM_9604_utime_urc_configuration_t
The +UTIMEIND time indication URC configuration.
Definition: Iridium_9604_typedefs.h:279
@ IRIDIUM_9604_UTIME_URC_CONFIGURATION_ENABLED
Definition: Iridium_9604_typedefs.h:281
IRIDIUM_9604_flow_control_t
Flow control definitions for AT&K Note: SW (XON/XOFF) flow control is not supported on the Iridium 96...
Definition: Iridium_9604_typedefs.h:76
@ IRIDIUM_9604_ENABLE_FLOW_CONTROL
Definition: Iridium_9604_typedefs.h:78
IRIDIUM_9604_sbdreg_status_t
+SBDREG registration status (Additional Commands Beta)
Definition: Iridium_9604_typedefs.h:709
IRIDIUM_9604_sbd_clear_t
+SBDD buffer selection
Definition: Iridium_9604_typedefs.h:647
@ IRIDIUM_9604_SBD_CLEAR_MO
Clear the mobile originated buffer.
Definition: Iridium_9604_typedefs.h:648
IRIDIUM_9604_sim_states_t
The SIM states reported by the +UUSIMSTAT URC.
Definition: Iridium_9604_typedefs.h:286
#define IRIDIUM_9604_10_SEC_TIMEOUT
Timeout (ms).
Definition: Iridium_9604_typedefs.h:29
IRIDIUM_9604_functionality_t
The module functionality levels (+CFUN).
Definition: Iridium_9604_typedefs.h:476
@ FULL_FUNCTIONALITY
Definition: Iridium_9604_typedefs.h:478
IRIDIUM_9604_gnss_system_t
The GNSS systems (+UGPS). Values can be added together.
Definition: Iridium_9604_typedefs.h:509
@ GNSS_SYSTEM_SBAS
Definition: Iridium_9604_typedefs.h:511
@ GNSS_SYSTEM_GPS
Definition: Iridium_9604_typedefs.h:510
IRIDIUM_9604_message_format_t
The SMS message formats (+CMGF).
Definition: Iridium_9604_typedefs.h:255
@ IRIDIUM_9604_MESSAGE_FORMAT_TEXT
Definition: Iridium_9604_typedefs.h:257
IRIDIUM_9604_gnss_aiding_request_t
The GNSS aiding requests (+UGAOS). New for the 9604 library.
Definition: Iridium_9604_typedefs.h:534
void(* IRIDIUM_9604_sbd_callback_t)(IRIDIUM_9604_error_t status, const IRIDIUM_9604_sbd_session_t *session)
The SBD session callback - see setSBDCallback()
Definition: Iridium_9604_typedefs.h:690
IRIDIUM_9604_registration_status_t
The network registration status (+CREG / +CEREG).
Definition: Iridium_9604_typedefs.h:150
IRIDIUM_9604_http_content_types_t
The HTTP POST content types.
Definition: Iridium_9604_typedefs.h:334
#define IRIDIUM_9604_RESET_PIN
The default reset pin: not connected.
Definition: Iridium_9604_typedefs.h:25
#define minimumResponseAllocation
The minimum response buffer size (bytes).
Definition: Iridium_9604_typedefs.h:53
#define IRIDIUM_9604_2_MIN_TIMEOUT
Timeout (ms).
Definition: Iridium_9604_typedefs.h:31
IRIDIUM_9604_sec_profile_parameter_t
The +USECPRF security profile parameters.
Definition: Iridium_9604_typedefs.h:420
#define IRIDIUM_9604_STANDARD_RESPONSE_TIMEOUT
Timeout (ms).
Definition: Iridium_9604_typedefs.h:28
IRIDIUM_9604_utime_sensor_t
The +UTIME time source sensors.
Definition: Iridium_9604_typedefs.h:271
@ IRIDIUM_9604_UTIME_SENSOR_GNSS_LTE
Definition: Iridium_9604_typedefs.h:273
#define IRIDIUM_9604_POWER_PIN
Default to no pin.
Definition: Iridium_9604_typedefs.h:24
IRIDIUM_9604_utime_mode_t
The +UTIME time modes.
Definition: Iridium_9604_typedefs.h:262
@ IRIDIUM_9604_UTIME_MODE_PPS
Definition: Iridium_9604_typedefs.h:264
IRIDIUM_9604_error_t
The library error codes.
Definition: Iridium_9604_typedefs.h:129
@ IRIDIUM_9604_ERROR_SUCCESS
0
Definition: Iridium_9604_typedefs.h:131
@ IRIDIUM_9604_ERROR_INVALID
-1
Definition: Iridium_9604_typedefs.h:130
IRIDIUM_9604_socket_protocol_t
The socket protocols.
Definition: Iridium_9604_typedefs.h:232
IRIDIUM_9604_sec_manager_opcode_t
The +USECMNG operations.
Definition: Iridium_9604_typedefs.h:461
#define IRIDIUM_9604_NUM_SOCKETS
The number of sockets: 0-6 (9604 AT manual, <socket> range).
Definition: Iridium_9604_typedefs.h:55
const uint8_t IRIDIUM_9604_NMEA_OUTPUT_URC
Output the NMEA string as a +UUGNMEA URC. Process it with bufferedPoll()
Definition: Iridium_9604_typedefs.h:549
void(* IRIDIUM_9604_pin_write_callback_t)(bool state)
The PWR_ON / RESET_N pin write callback - see setPowerOnPinWriteCallback() and setResetPinWriteCallba...
Definition: Iridium_9604_typedefs.h:679
mobile_network_operator_t
The standard Europe profile should be used as the basis for all other MNOs in Europe outside of Vodaf...
Definition: Iridium_9604_typedefs.h:88
IRIDIUM_9604_lock_status_t
+CULK lock status
Definition: Iridium_9604_typedefs.h:613
#define IRIDIUM_9604_SBD_SESSION_DEFAULT_TIMEOUT
Default timeout for an SBD session (+SBDI / +SBDIX / +SBDDET / +SBDREG): 5 minutes.
Definition: Iridium_9604_typedefs.h:43
#define IRIDIUM_9604_3_MIN_TIMEOUT
Timeout (ms).
Definition: Iridium_9604_typedefs.h:32
IRIDIUM_9604_gnss_aiding_mode_t
The GNSS aiding modes (+UGPS). Values can be added together.
Definition: Iridium_9604_typedefs.h:523
@ GNSS_AIDING_MODE_AUTOMATIC
Definition: Iridium_9604_typedefs.h:525
IRIDIUM_9604_sec_manager_parameter_t
The +USECMNG certificate / key types.
Definition: Iridium_9604_typedefs.h:467
IRIDIUM_9604_sbdareg_mode_t
+SBDAREG automatic registration mode
Definition: Iridium_9604_typedefs.h:624
IRIDIUM_9604_areg_event_t
+AREG <event>
Definition: Iridium_9604_typedefs.h:636
The Iridium 9604 device class: all of the AT command, URC, NMEA and satellite methods....
Definition: Iridium_9604.h:62
IRIDIUM_9604_error_t setIndicatorEventReporting(IRIDIUM_9604_cier_mode_t mode=IRIDIUM_9604_CIER_MODE_ENABLE, bool signalQuality=true, bool serviceAvailability=true, bool svBeamCoordinates=false)
Configure the indicator event reporting (AT+CIER): the +CIEV signal quality, service availability and...
Definition: Iridium_9604_Satellite.cpp:183
void setSBDAutoRegistrationCallback(void(*autoRegistrationCallback)(IRIDIUM_9604_areg_event_t event, int regError))
Set the callback for the +AREG automatic registration URC.
Definition: Iridium_9604_Satellite.cpp:442
SparkFun_Iridium_9604::IridiumDeviceBus * _sfeBus
The UART.
Definition: Iridium_9604.h:2501
IRIDIUM_9604_error_t autobaud(unsigned long desiredBaud)
Find the module's baud rate and change it to desiredBaud.
Definition: Iridium_9604.cpp:685
bool _pollReentrant
Prevent reentry of poll - just in case it gets called from a callback.
Definition: Iridium_9604.h:2521
IRIDIUM_9604_error_t setAPN(sfe_string_t apn, uint8_t cid=1, IRIDIUM_9604_pdp_type pdpType=PDP_TYPE_IP)
Set the Access Point Name for a PDP context (AT+CGDCONT).
Definition: Iridium_9604_Network.cpp:217
int _lastSocketProtocol[IRIDIUM_9604_NUM_SOCKETS]
Record the protocol for each socket to avoid having to call querySocketType in parseSocketReadIndicat...
Definition: Iridium_9604.h:2540
uint8_t _sbdState
The state of the non-blocking SBD session.
Definition: Iridium_9604.h:2553
SparkFun_Iridium_9604::nmeaMessageVector nmeaMessages
The NMEA message objects - one per supported NMEA message.
Definition: Iridium_9604.h:2497
IRIDIUM_9604_error_t writeSBDData(const uint8_t *data, size_t length, int *status=nullptr)
Write binary data to the mobile originated buffer (AT+SBDW). The library HEX-encodes the data.
Definition: Iridium_9604_Satellite.cpp:1147
unsigned long _sbdStartTime
millis when the non-blocking session started (or was cancelled).
Definition: Iridium_9604.h:2554
IRIDIUM_9604_error_t parseSocketReadIndicationUDP(int socket, int length)
Read the UDP data indicated by a +UUSORF URC and pass it to the socket read callback(s).
Definition: Iridium_9604.cpp:1312
void(* _socketReadCallbackPlus)(int, const char *, int, sfe_ip_address_t, int)
socket, data, length, remoteAddress, remotePort
Definition: Iridium_9604.h:2538
IRIDIUM_9604_init_type_t
The initialization types used by init().
Definition: Iridium_9604.h:2618
@ IRIDIUM_9604_INIT_AUTOBAUD
Definition: Iridium_9604.h:2620
@ IRIDIUM_9604_INIT_RESET
Definition: Iridium_9604.h:2621
@ IRIDIUM_9604_INIT_STANDARD
Definition: Iridium_9604.h:2619
IRIDIUM_9604_error_t socketDirectLinkCongestionTimer(int socket, unsigned long congestionTimer)
Set the direct link congestion timer (AT+UDCONF=8).
Definition: Iridium_9604_Sockets.cpp:866
IRIDIUM_9604_error_t setSBDAutoRegistration(IRIDIUM_9604_sbdareg_mode_t mode)
Set the SBD automatic registration mode (AT+SBDAREG).
Definition: Iridium_9604_Satellite.cpp:386
bool _invertPowerPin
Invert the power pin polarity.
Definition: Iridium_9604.h:2505
IRIDIUM_9604_error_t _lastSBDSessionStatus
The status of the most recent SBD session.
Definition: Iridium_9604.h:2564
IRIDIUM_9604_error_t mqttPublishFromFile(const sfe_string_t &topic, const sfe_string_t &filename, uint8_t qos=0, bool retain=false)
Publish the contents of a file to an MQTT topic (AT+UMQTTC=3).
Definition: Iridium_9604_Internet.cpp:663
IRIDIUM_9604_error_t readSBDData(uint8_t *data, size_t maxLength, size_t *length)
Read the mobile terminated buffer (AT+SBDR). The library HEX-decodes the data.
Definition: Iridium_9604_Satellite.cpp:945
IRIDIUM_9604_error_t deleteReadSentSMSmessages(void)
Delete all the read and sent SMS messages from preferred storage (AT+CMGD=1,2).
Definition: Iridium_9604.h:826
char * iridium_calloc_char(size_t num)
Allocate a zeroed char buffer (with calloc). Free it with free().
Definition: Iridium_9604.cpp:1476
IRIDIUM_9604_error_t getMNOprofile(mobile_network_operator_t *mno)
Read the Mobile Network Operator profile (AT+UMNOPROF?).
Definition: Iridium_9604_General.cpp:729
IRIDIUM_9604_rat_t getRAT(void)
Read the selected Radio Access Technology (AT+URAT?). New for the 9604.
Definition: Iridium_9604_General.cpp:902
IRIDIUM_9604_error_t querySocketTotalBytesSent(int socket, uint32_t *total)
Query the total number of bytes sent on a socket (AT+USOCTL=socket,2).
Definition: Iridium_9604_Sockets.cpp:999
IRIDIUM_9604_error_t deleteAllSMSmessages(void)
Delete all the SMS messages from preferred storage, including the unread messages (AT+CMGD=1,...
Definition: Iridium_9604.h:838
SparkFun_Iridium_9604::sfe_string_t sfe_string_t
The string type: String on Arduino; std::string on ESP-IDF.
Definition: Iridium_9604.h:66
sfe_string_t getModelID(void)
Read the model identification (AT+CGMM).
Definition: Iridium_9604_General.cpp:78
IRIDIUM_9604_error_t gpsRequestAiding(IRIDIUM_9604_gnss_aiding_request_t request, unsigned long timeout=IRIDIUM_9604_2_MIN_TIMEOUT)
Request a GNSS aiding operation (AT+UGAOS): e.g. download the AssistNow Online data into the GNSS.
Definition: Iridium_9604_GNSS.cpp:249
int socketOpen(IRIDIUM_9604_socket_protocol_t protocol, unsigned int localPort=0)
Open a TCP or UDP socket (AT+USOCR).
Definition: Iridium_9604_Sockets.cpp:24
IRIDIUM_9604_error_t setHTTPpassword(int profile, sfe_string_t password)
Set the HTTP password (AT+UHTTP=profile,3).
Definition: Iridium_9604_Internet.cpp:127
IRIDIUM_9604_error_t resetSecurityProfile(int secprofile)
Reset a security profile (AT+USECPRF=profile).
Definition: Iridium_9604_Internet.cpp:850
void addToBacklog(char c)
Add one character to the backlog. NULLs are converted to ASCII '0'.
Definition: Iridium_9604.cpp:1238
bool _sbdHaveResult
true if the +SBDIX result was received.
Definition: Iridium_9604.h:2563
IRIDIUM_9604_error_t init(unsigned long baud, IRIDIUM_9604_init_type_t initType=IRIDIUM_9604_INIT_STANDARD)
Initialize the module: autobaud, disable echo, configure the URCs etc. Called by begin().
Definition: Iridium_9604.cpp:709
IRIDIUM_9604_error_t setSecurityManager(IRIDIUM_9604_sec_manager_opcode_t opcode, IRIDIUM_9604_sec_manager_parameter_t parameter, sfe_string_t name, sfe_string_t data)
Import or remove a certificate or key (AT+USECMNG).
Definition: Iridium_9604_Internet.cpp:897
IRIDIUM_9604_error_t getPDPaddress(int cid, sfe_ip_address_t *address)
Read the IP address of a PDP context (AT+CGPADDR=<cid>).
Definition: Iridium_9604_Network.cpp:897
IRIDIUM_9604_error_t setRegistrationCallback(void(*registrationCallback)(IRIDIUM_9604_registration_status_t status, unsigned int lac, unsigned int ci, int Act))
Set the callback for the network registration status URC (+CREG) and enable the URC (AT+CREG=2).
Definition: Iridium_9604.cpp:531
IRIDIUM_9604_error_t getPreferredMessageStorage(int *used, int *total, sfe_string_t memory="ME")
Read the number of used and total SMS memory locations (AT+CPMS).
Definition: Iridium_9604_SMS.cpp:89
bool processSBDSessionEvent(const char *event)
Non-blocking SBD session: check an event (line) from bufferedPoll for the session result,...
Definition: Iridium_9604_Satellite.cpp:720
sfe_string_t clock(void)
Read the module's real time clock (AT+CCLK?).
Definition: Iridium_9604_General.cpp:264
IRIDIUM_9604_error_t enterPPP(uint8_t cid=1, char dialing_type_char=0, unsigned long dialNumber=99, IRIDIUM_9604_l2p_t l2p=L2P_DEFAULT)
Enter PPP mode (ATD*99***cid#).
Definition: Iridium_9604_Network.cpp:492
void urcSocketListenIndication(sfe_ip_address_t localIP, sfe_ip_address_t remoteIP)
urcHandlerInterface: record the IP addresses from a +UUSOLI URC (see lastRemoteIP()).
Definition: Iridium_9604.cpp:583
void setPingCallback(void(*pingRequestCallback)(int retry, int p_size, sfe_string_t remote_hostname, sfe_ip_address_t ip, int ttl, long rtt))
Set the callback for the ping result URC (+UUPING). See ping().
Definition: Iridium_9604.cpp:511
void invertPowerPin(bool invert=false)
Invert the polarity of the power pin, if required. Normally the module's PWR_ON pin is pulled low and...
Definition: Iridium_9604.cpp:813
bool hasRingAlert(void)
Check if an SBD ring alert has been received (the +SBDSX RA flag).
Definition: Iridium_9604_Satellite.cpp:1135
IRIDIUM_9604_error_t sendReceiveSBDText(const char *message, uint8_t *rxBuffer, size_t *rxLength)
Send a text message (or nothing) and receive any waiting MT message using SBD: write the MO buffer (+...
Definition: Iridium_9604_Satellite.cpp:1499
int socketGetLastError()
Read the last socket error (AT+USOER).
Definition: Iridium_9604_Sockets.cpp:1280
IRIDIUM_9604_error_t waitForResponse(const char *expectedResponse, const char *expectedError, uint16_t timeout)
Wait for an expected response (or error) from the module. Any other data (URCs) is added to the backl...
Definition: Iridium_9604.cpp:955
IRIDIUM_9604_error_t getHTTPprotocolError(int profile, int *error_class, int *error_code)
Read the most recent HTTP protocol error for a profile (AT+UHTTPER).
Definition: Iridium_9604_Internet.cpp:303
IRIDIUM_9604_error_t querySocketLastError(int socket, int *error)
Query the last socket error (AT+USOCTL=socket,1).
Definition: Iridium_9604_Sockets.cpp:944
IRIDIUM_9604_error_t querySocketOutUnackData(int socket, uint32_t *total)
Query the number of unacknowledged outgoing bytes on a TCP socket (AT+USOCTL=socket,...
Definition: Iridium_9604_Sockets.cpp:1224
void flushNMEA(const char *msgId)
Mark the stored copy of an NMEA message as stale.
Definition: Iridium_9604_GNSS.cpp:795
mobile_network_operator_t getNetworkProfile(void)
Read the Mobile Network Operator (MNO) profile (AT+UMNOPROF?).
Definition: Iridium_9604_Network.cpp:204
IRIDIUM_9604_error_t nvMQTT(IRIDIUM_9604_mqtt_nv_parameter_t parameter)
Save, restore or reset the MQTT profile in non volatile memory (AT+UMQTTNV).
Definition: Iridium_9604_Internet.cpp:351
void setResetPinWriteCallback(IRIDIUM_9604_pin_write_callback_t callback)
Set a callback to write the 9604 RESET_N pin - in place of the GPIO pin passed to the constructor.
Definition: Iridium_9604.h:182
size_t _sbdRxBufferSize
sendReceiveSBD: the size of _sbdRxBuffer.
Definition: Iridium_9604.h:2560
int _powerPin
The PWR_ON pin. -1 if not connected.
Definition: Iridium_9604.h:2503
void setCommunicationBus(SparkFun_Iridium_9604::IridiumDeviceBus &theBus)
Set the communication bus. Called by the begin() methods of SFE_IRIDIUM_9604. Call it yourself to use...
Definition: Iridium_9604.cpp:92
IRIDIUM_9604_error_t setHTTPsecure(int profile, bool secure, int secprofile=-1)
Enable or disable HTTPS (AT+UHTTP=profile,6). Default: disabled (HTTP on port 80).
Definition: Iridium_9604_Internet.cpp:211
IRIDIUM_9604_error_t getUtimeMode(IRIDIUM_9604_utime_mode_t *mode, IRIDIUM_9604_utime_sensor_t *sensor)
Read the time mode and time source (AT+UTIME?).
Definition: Iridium_9604_General.cpp:419
IRIDIUM_9604_error_t clearSBDBuffers(IRIDIUM_9604_sbd_clear_t buffers=IRIDIUM_9604_SBD_CLEAR_MO)
Clear the mobile originated and/or mobile terminated SBD buffers (AT+SBDD).
Definition: Iridium_9604_Satellite.cpp:451
bool isSBDSessionInProgress(void)
Check if a non-blocking SBD session is in progress (or being cancelled).
Definition: Iridium_9604.h:2419
bool processURCEvent(const char *event)
Pass one event (line) to the registered URC handlers.
Definition: Iridium_9604.cpp:371
IRIDIUM_9604_error_t getFileSize(sfe_string_t filename, int *size)
Read the size of a file in the module's file system (AT+ULSTFILE).
Definition: Iridium_9604_FileSystem.cpp:456
SparkFun_Iridium_9604::SfeDebugPrint & urcDebug(void)
urcHandlerInterface: the debug printer, for the URC handlers.
Definition: Iridium_9604.h:2450
~DevIridium9604()
Destroy the DevIridium9604 object, freeing the backlog and receive buffers.
Definition: Iridium_9604.cpp:68
IRIDIUM_9604_error_t gpsAidingServerConf(const char *primaryServer, const char *secondaryServer, const char *authToken, unsigned int days=14, unsigned int period=4, unsigned int resolution=1, unsigned int gnssTypes=65, unsigned int mode=0, unsigned int dataType=15)
Configure the u-blox AssistNow aiding server (AT+UGSRV).
Definition: Iridium_9604_GNSS.cpp:129
IRIDIUM_9604_gnss_aiding_mode_t gnss_aiding_mode_t
The GNSS aiding mode type. (Retained for SARA-R5 compatibility.)
Definition: Iridium_9604.h:1591
IRIDIUM_9604_error_t unlock(const char *unlockKey, IRIDIUM_9604_lock_status_t *status=nullptr)
Unlock the module (AT+CULK).
Definition: Iridium_9604_Satellite.cpp:295
size_t _lastErrorTextLength
The number of characters in _lastErrorText.
Definition: Iridium_9604.h:2516
int readAvailable(char *inString)
Read all the available serial data into inString.
Definition: Iridium_9604.cpp:1419
void disableDebugging(void)
Turn off the debug messages.
Definition: Iridium_9604.cpp:172
size_t hwPrint(const char *s)
Write a NULL-terminated string to the module, through the communication bus.
Definition: Iridium_9604.cpp:1376
IRIDIUM_9604_error_t deleteFile(sfe_string_t filename)
Delete a file from the module's file system (AT+UDELFILE).
Definition: Iridium_9604_FileSystem.cpp:515
IRIDIUM_9604_error_t setMQTTclientId(const sfe_string_t &clientId)
Set the MQTT client ID (AT+UMQTT=0).
Definition: Iridium_9604_Internet.cpp:365
IRIDIUM_9604_error_t setHTTPcustomHeader(int profile, sfe_string_t header)
Set an HTTP custom request header (AT+UHTTP=profile,9). Format: "0:Content-Type:application/json".
Definition: Iridium_9604_Internet.cpp:190
IRIDIUM_9604_error_t socketWrite(int socket, const char *str, int len=-1)
Write data to a TCP socket (AT+USOWR). OK for binary data if len is provided.
Definition: Iridium_9604_Sockets.cpp:182
IRIDIUM_9604_error_t sendHTTPPOSTfile(int profile, sfe_string_t path, sfe_string_t responseFilename, sfe_string_t requestFile, IRIDIUM_9604_http_content_types_t httpContentType)
Send an HTTP POST request with the contents of a file (AT+UHTTPC=profile,4). The response is written ...
Definition: Iridium_9604_Internet.cpp:280
IRIDIUM_9604_error_t getSBDStatusExtended(IRIDIUM_9604_sbd_status_t *status)
Read the extended SBD status (AT+SBDSX).
Definition: Iridium_9604_Satellite.cpp:1102
bool begin(unsigned long baud)
Initialize the module and ensure it is connected. Autobauds the module to baud if required....
Definition: Iridium_9604.cpp:97
bool _extendedErrorCapturing
extendedErrorCheck: true while the <err> text is being read.
Definition: Iridium_9604.h:2519
static const uint8_t IRIDIUM_9604_SBD_STATE_CANCELLING
_sbdState: cancelSBDSession has been called. Waiting for the final result code
Definition: Iridium_9604.h:2551
int8_t rssi(void)
Read the received signal strength (AT+CSQ). Cellular (LTE-M) only.
Definition: Iridium_9604_Network.cpp:24
uint8_t getOperators(struct operator_stats *op, int maxOps=3)
Scan for the available network operators (AT+COPS=?). This can take up to 3 minutes.
Definition: Iridium_9604_Network.cpp:544
IRIDIUM_9604_error_t appendFileContents(sfe_string_t filename, sfe_string_t str)
Append data to a file in the module's file system (AT+UDWNFILE). The file is created if it does not e...
Definition: Iridium_9604_FileSystem.cpp:79
IRIDIUM_9604_error_t mqttPublishTextMsg(const sfe_string_t &topic, const char *const msg, uint8_t qos=0, bool retain=false)
Publish a text message to an MQTT topic (AT+UMQTTC=2).
Definition: Iridium_9604_Internet.cpp:577
void setSBDATTimeout(unsigned long timeout_ms)
Set the AT command timeout used for SBD sessions (+SBDI, +SBDIX, +SBDDET). Default: 5 minutes....
Definition: Iridium_9604.h:2374
IRIDIUM_9604_error_t socketReadAvailable(int socket, int *length)
Read the number of bytes waiting to be read from a TCP socket (AT+USORD=socket,0).
Definition: Iridium_9604_Sockets.cpp:476
static const char * getSBDErrorString(int error)
Convert an SBD error code (+SBDIX MO status, +SBDDET error, +AREG reg error) to text....
Definition: Iridium_9604_Satellite.cpp:1320
const char * getLastErrorText(void)
Get the reason for the most recent error.
Definition: Iridium_9604.h:421
IRIDIUM_9604_error_t setFTPcredentials(const sfe_string_t &userName, const sfe_string_t &pwd)
Set the FTP user name and password (AT+UFTP=2,3).
Definition: Iridium_9604_Internet.cpp:746
SparkFun_Iridium_9604::sfe_ip_address_t sfe_ip_address_t
The IP address type: IPAddress on Arduino; SfeIPAddress on ESP-IDF.
Definition: Iridium_9604.h:67
char * _partialLine
An incomplete line from bufferedPoll() - processed when the rest of the line arrives.
Definition: Iridium_9604.h:2533
IRIDIUM_9604_error_t setAllNMEAoutput(uint8_t rate=1, uint8_t output=IRIDIUM_9604_NMEA_OUTPUT_URC)
Configure the output of all 13 NMEA messages (AT+UGNMEA). Returns the first error,...
Definition: Iridium_9604_GNSS.cpp:469
IRIDIUM_9604_error_t setSimPin(sfe_string_t pin)
Enter the SIM PIN (AT+CPIN).
Definition: Iridium_9604_Network.cpp:408
IRIDIUM_9604_error_t sbdSession(IRIDIUM_9604_sbd_session_t *result)
Initiate an SBD session (AT+SBDI). No ring alert support. Always detaches.
Definition: Iridium_9604_Satellite.cpp:871
IRIDIUM_9604_error_t connectMQTT(void)
Connect to the MQTT broker (AT+UMQTTC=1). The result is delivered by the +UUMQTTC URC: see setMQTTCom...
Definition: Iridium_9604_Internet.cpp:423
unsigned long _baud
The current baud rate.
Definition: Iridium_9604.h:2509
IRIDIUM_9604_error_t getExtSignalQuality(signal_quality &signal_quality)
Read the extended signal quality (AT+CESQ). Cellular (LTE-M) only.
Definition: Iridium_9604_Network.cpp:71
void setGNSSAidingCallback(void(*gnssAidingCallback)(int aidMode, int result))
Set the callback for the assisted GNSS indication URC (+UUGIND). Enable the URC with setGNSSAidingInd...
Definition: Iridium_9604.cpp:506
IRIDIUM_9604_error_t socketDirectLinkTimeTrigger(int socket, unsigned long timerTrigger)
Set the direct link time trigger (AT+UDCONF=5).
Definition: Iridium_9604_Sockets.cpp:803
IRIDIUM_9604_error_t querySocketType(int socket, IRIDIUM_9604_socket_protocol_t *protocol)
Query the socket type: TCP or UDP (AT+USOCTL=socket,0).
Definition: Iridium_9604_Sockets.cpp:887
IRIDIUM_9604_error_t setHTTPserverName(int profile, sfe_string_t server)
Set the HTTP server name (AT+UHTTP=profile,1).
Definition: Iridium_9604_Internet.cpp:85
int _cmsErrorIndex
extendedErrorCheck: the number of IRIDIUM_9604_RESPONSE_CMS_ERROR characters matched.
Definition: Iridium_9604.h:2518
IRIDIUM_9604_error_t setUtimeMode(IRIDIUM_9604_utime_mode_t mode=IRIDIUM_9604_UTIME_MODE_PPS, IRIDIUM_9604_utime_sensor_t sensor=IRIDIUM_9604_UTIME_SENSOR_GNSS_LTE)
Set the time mode and time source (AT+UTIME).
Definition: Iridium_9604_General.cpp:400
bool _autoTimeZoneForBegin
Enable the automatic time zone update during begin().
Definition: Iridium_9604.h:2513
IRIDIUM_9604_error_t sendSBDText(const char *message)
Send a text message using SBD: write the MO buffer (+SBDW), start an extended SBD session (+SBDIX) an...
Definition: Iridium_9604_Satellite.cpp:1485
IRIDIUM_9604_error_t pollNMEA(void)
Poll the NMEA messages stored in the module memory (AT+UGNMEA?). The messages are processed as if the...
Definition: Iridium_9604_GNSS.cpp:536
void flushPartialLineToBacklog(void)
Move any incomplete bufferedPoll() line into the backlog - so it is processed with the next data.
Definition: Iridium_9604.cpp:1253
void setMQTTCommandCallback(void(*mqttCommandRequestCallback)(int command, int result))
Set the callback for the MQTT command result URC (+UUMQTTC).
Definition: Iridium_9604.cpp:521
IRIDIUM_9604_error_t readMQTT(int *pQos, sfe_string_t *pTopic, uint8_t *readDest, int readLength, int *bytesRead)
Read an MQTT message which has been received on a subscribed topic (AT+UMQTTC=6).
Definition: Iridium_9604_Internet.cpp:479
IRIDIUM_9604_error_t getIndicatorEventReporting(IRIDIUM_9604_cier_mode_t *mode, bool *signalQuality, bool *serviceAvailability, bool *svBeamCoordinates)
Read the indicator event reporting configuration (AT+CIER?).
Definition: Iridium_9604_Satellite.cpp:202
sfe_string_t getSerialNo(void)
Read the product serial number (AT+CGSN).
Definition: Iridium_9604_General.cpp:120
void printSBDSession(const IRIDIUM_9604_sbd_session_t &session)
Print the SBD session result (debug).
Definition: Iridium_9604_Satellite.cpp:694
IRIDIUM_9604_error_t setClockFromGNSS(void)
Set the module clock (+CCLK) from the GNSS UTC time (AT+UGTMR).
Definition: Iridium_9604_GNSS.cpp:678
IRIDIUM_9604_error_t querySocketRemoteIPAddress(int socket, sfe_ip_address_t *address, int *port)
Query the remote IP address and port of a socket (AT+USOCTL=socket,4).
Definition: Iridium_9604_Sockets.cpp:1109
bool bufferedPoll(void)
Process any data from the module: the backlog first, then any fresh serial data. URCs are passed to t...
Definition: Iridium_9604.cpp:200
IRIDIUM_9604_error_t setClock(sfe_string_t theTime)
Set the module's real time clock (AT+CCLK).
Definition: Iridium_9604_General.cpp:378
nmeaMessage * getNmeaMessagePtr(nmeaCallbackDataCommon_t *theData)
Get the nmeaMessage from inside an NMEA callback.
Definition: Iridium_9604_GNSS.cpp:818
IRIDIUM_9604_error_t socketConnect(int socket, const char *address, unsigned int port)
Connect a TCP socket to a remote host (AT+USOCO). Not required for UDP sockets.
Definition: Iridium_9604_Sockets.cpp:152
IRIDIUM_9604_error_t socketReadAvailableUDP(int socket, int *length)
Read the number of bytes waiting to be read from a UDP socket (AT+USORF=socket,0).
Definition: Iridium_9604_Sockets.cpp:714
IRIDIUM_9604_error_t setHTTPserverIPaddress(int profile, sfe_ip_address_t address)
Set the HTTP server IP address (AT+UHTTP=profile,0).
Definition: Iridium_9604_Internet.cpp:64
IRIDIUM_9604_sbdreg_status_t getSBDRegistrationStatus(void)
Read the SBD registration status (AT+SBDREG?). From the Iridium 9604 Additional Commands (Beta).
Definition: Iridium_9604_Satellite.cpp:1225
void powerOn(void)
Pulse the PWR_ON pin briefly to turn the module on.
Definition: Iridium_9604.cpp:876
IRIDIUM_9604_error_t gpsPower(bool enable=true, gnss_system_t gnss_sys=GNSS_SYSTEM_GPS, gnss_aiding_mode_t gnss_aiding=GNSS_AIDING_MODE_AUTOMATIC)
Power the GNSS on or off (AT+UGPS). On the Iridium 9604 the GNSS may already be on - the satellite st...
Definition: Iridium_9604_GNSS.cpp:66
IRIDIUM_9604_l2p_t
The layer 2 protocols for enterPPP().
Definition: Iridium_9604.h:696
@ L2P_DEFAULT
Definition: Iridium_9604.h:697
@ L2P_M_OPT_PPP
Definition: Iridium_9604.h:701
@ L2P_M_HEX
Definition: Iridium_9604.h:699
@ L2P_M_RAW_IP
Definition: Iridium_9604.h:700
@ L2P_PPP
Definition: Iridium_9604.h:698
void powerOff(void)
Pulse the PWR_ON pin for a long time to perform a graceful shutdown. modulePowerOff() (+CPWROFF) is p...
Definition: Iridium_9604.cpp:864
size_t * _sbdRxLength
sendReceiveSBD: the size of _sbdRxBuffer in, the number of bytes received out.
Definition: Iridium_9604.h:2559
IRIDIUM_9604_error_t setSBDSessionTimeout(int timeout)
Set the SBD session timeout (AT+SBDST).
Definition: Iridium_9604_Satellite.cpp:1039
IRIDIUM_9604_error_t querySocketTotalBytesReceived(int socket, uint32_t *total)
Query the total number of bytes received on a socket (AT+USOCTL=socket,3).
Definition: Iridium_9604_Sockets.cpp:1054
void modulePowerOn(void)
Power the module on by pulsing the PWR_ON pin. Requires the powerPin to have been provided to the con...
Definition: Iridium_9604.cpp:660
IRIDIUM_9604_error_t sendSBDBinary(const uint8_t *txData, size_t txLength)
Send a binary message using SBD: write the MO buffer (+SBDW), start an extended SBD session (+SBDIX) ...
Definition: Iridium_9604_Satellite.cpp:1492
void setSatelliteServiceAvailabilityCallback(void(*serviceAvailabilityCallback)(bool serviceAvailable))
Set the callback for the +CIEV service availability indication.
Definition: Iridium_9604_Satellite.cpp:281
IRIDIUM_9604_error_t getSIMstateReportingMode(int *mode)
Read the SIM state reporting mode (AT+USIMSTAT?).
Definition: Iridium_9604_Network.cpp:438
IRIDIUM_9604_error_t automaticOperatorSelection()
Select the network operator automatically (AT+COPS=0).
Definition: Iridium_9604_Network.cpp:665
IRIDIUM_9604_error_t socketSetSecure(int profile, bool secure, int secprofile=-1)
Enable or disable SSL/TLS on a socket (AT+USOSEC).
Definition: Iridium_9604_Sockets.cpp:103
IRIDIUM_9604_error_t functionality(IRIDIUM_9604_functionality_t function=FULL_FUNCTIONALITY)
Set the module functionality (AT+CFUN).
Definition: Iridium_9604_General.cpp:690
IRIDIUM_9604_error_t setBaud(unsigned long baud)
Change the module's baud rate (AT+IPR). The library changes its own baud rate to match.
Definition: Iridium_9604_General.cpp:791
sfe_string_t getIMEI(void)
Read the cellular IMEI (AT+GSN). See getSatelliteIMEI() for the satellite (SBD) IMEI.
Definition: Iridium_9604_General.cpp:141
IRIDIUM_9604_error_t configSecurityProfile(int secprofile, IRIDIUM_9604_sec_profile_parameter_t parameter, int value)
Configure a security profile parameter with an integer value (AT+USECPRF).
Definition: Iridium_9604_Internet.cpp:868
const int _maxSocketRead
The limit on bytes that can be read in a single read.
Definition: Iridium_9604.h:2719
void enableAtDebugging(sfe_print_t &debugPort=SparkFun_Iridium_9604::sfeStdout)
Turn on the AT command debug messages: every AT command and response is printed.
Definition: Iridium_9604.cpp:181
IRIDIUM_9604_error_t sendHTTPGET(int profile, sfe_string_t path, sfe_string_t responseFilename)
Send an HTTP GET request (AT+UHTTPC=profile,1). The response is written to a file in the module's fil...
Definition: Iridium_9604_Internet.cpp:235
bool setNetworkProfile(mobile_network_operator_t mno, bool autoReset=false, bool urcNotification=false)
Set the Mobile Network Operator (MNO) profile (AT+UMNOPROF). Checks the current profile first and onl...
Definition: Iridium_9604_Network.cpp:170
int isSatelliteServiceAvailable(void)
The most recent satellite service availability, from the +CIEV URCs. Call bufferedPoll() regularly to...
Definition: Iridium_9604.h:2076
IRIDIUM_9604_error_t deregisterOperator(void)
Deregister from the network operator (AT+COPS=2).
Definition: Iridium_9604_Network.cpp:749
sfe_string_t getNmeaMessageField(nmeaMessage *theMessage, const char *fieldName)
Get one field of the stored copy of an NMEA message, by name. Call getNMEA() first.
Definition: Iridium_9604_GNSS.cpp:840
IRIDIUM_9604_error_t setMNOprofile(mobile_network_operator_t mno, bool autoReset=false, bool urcNotification=false)
Set the Mobile Network Operator profile (AT+UMNOPROF).
Definition: Iridium_9604_General.cpp:708
void setSatelliteSignalQualityCallback(void(*signalQualityCallback)(int signalQuality))
Set the callback for the +CIEV signal quality indication.
Definition: Iridium_9604_Satellite.cpp:276
IRIDIUM_9604_lock_status_t getLockStatus(void)
Read the lock status (AT+CULK?).
Definition: Iridium_9604_Satellite.cpp:346
sfe_string_t getFirmwareVersion(void)
Read the firmware version (AT+CGMR).
Definition: Iridium_9604_General.cpp:99
IRIDIUM_9604_error_t urcSocketReadIndication(int socket, int length)
urcHandlerInterface: read the TCP data indicated by a +UUSORD URC and pass it to the socket read call...
Definition: Iridium_9604.h:2465
void extendedErrorReset(void)
Reset the +CME ERROR / +CMS ERROR matching and clear _lastErrorText. Called before each command.
Definition: Iridium_9604.cpp:1481
IRIDIUM_9604_error_t setHTTPusername(int profile, sfe_string_t username)
Set the HTTP user name (AT+UHTTP=profile,2).
Definition: Iridium_9604_Internet.cpp:106
IRIDIUM_9604_error_t subscribeMQTTtopic(int max_Qos, const sfe_string_t &topic)
Subscribe to an MQTT topic (AT+UMQTTC=4).
Definition: Iridium_9604_Internet.cpp:451
IRIDIUM_9604_error_t getSimStatus(sfe_string_t *code)
Read the SIM PIN status (AT+CPIN?).
Definition: Iridium_9604_Network.cpp:365
int hwAvailable(void)
The number of bytes available to be read from the module.
Definition: Iridium_9604.cpp:1456
IRIDIUM_9604_error_t checkSBDSessionResult(const IRIDIUM_9604_sbd_session_t &session)
Check the result of an SBD session: the MO status (0 to -4 = success) and the MT status (2 = error)....
Definition: Iridium_9604_Satellite.cpp:1394
int getSatelliteSignalQuality(void)
The most recent satellite signal quality (0-5 bars), from the +CIEV URCs. Call bufferedPoll() regular...
Definition: Iridium_9604.h:2070
IRIDIUM_9604_error_t mqttPublishBinaryMsg(const sfe_string_t &topic, const char *const msg, size_t msg_len, uint8_t qos=0, bool retain=false)
Publish a binary message to an MQTT topic (AT+UMQTTC=9).
Definition: Iridium_9604_Internet.cpp:626
IRIDIUM_9604_error_t setUtimeConfiguration(int32_t offsetNanoseconds=0, int32_t offsetSeconds=0)
Set the time offsets (AT+UTIMECFG).
Definition: Iridium_9604_General.cpp:539
IRIDIUM_9604_error_t sendSMS(sfe_string_t number, sfe_string_t message)
Send an SMS message (AT+CMGS).
Definition: Iridium_9604_SMS.cpp:42
bool extendedErrorCheck(char c)
Look for a "+CME ERROR: <err>" or "+CMS ERROR: <err>" response, one character at a time.
Definition: Iridium_9604.cpp:1492
IRIDIUM_9604_error_t getUtimeConfiguration(int32_t *offsetNanoseconds, int32_t *offsetSeconds)
Read the time offsets (AT+UTIMECFG?).
Definition: Iridium_9604_General.cpp:555
void autoTimeZoneForBegin(bool enable=true)
Enable or disable the automatic time zone update during begin(). Call this before begin()....
Definition: Iridium_9604_General.cpp:395
bool getNMEA(const char *msgId, bool pollIfNoURC=true)
Get a fresh copy of an NMEA message. Returns true if fresh data has arrived (as a URC,...
Definition: Iridium_9604_GNSS.cpp:755
IRIDIUM_9604_error_t gpsRequest(unsigned int timeout, uint32_t accuracy, bool detailed=true, unsigned int sensor=3)
Request the location (AT+ULOC). The result is delivered by the +UULOC URC: see setGpsReadCallback().
Definition: Iridium_9604_GNSS.cpp:99
IRIDIUM_9604_error_t getFileBlock(const sfe_string_t &filename, char *buffer, size_t offset, size_t requestedLength, size_t &bytesRead)
Read a block of data from a file in the module's file system (AT+URDBLOCK). OK for binary files....
Definition: Iridium_9604_FileSystem.cpp:326
IRIDIUM_9604_error_t setHTTPauthentication(int profile, bool authenticate)
Enable or disable HTTP authentication (AT+UHTTP=profile,4).
Definition: Iridium_9604_Internet.cpp:148
IRIDIUM_9604_error_t sendReceiveSBDBinary(const uint8_t *txData, size_t txLength, uint8_t *rxBuffer, size_t *rxLength)
Send a binary message (or nothing) and receive any waiting MT message using SBD: write the MO buffer ...
Definition: Iridium_9604_Satellite.cpp:1504
void setSBDCallback(IRIDIUM_9604_sbd_callback_t sbdCallback)
Set the SBD session callback - and make the SBD sessions non-blocking.
Definition: Iridium_9604.h:2411
bool _bufferedPollReentrant
Prevent reentry of bufferedPoll - just in case it gets called from a callback.
Definition: Iridium_9604.h:2520
IRIDIUM_9604_error_t deleteSMSmessage(int location, int deleteFlag=0)
Delete SMS message(s) (AT+CMGD).
Definition: Iridium_9604_SMS.cpp:285
int getWaitingMessageCount(void)
The number of MT messages waiting at the gateway, from the most recent SBD session.
Definition: Iridium_9604.h:2359
IRIDIUM_9604_error_t sbdDetach(int *error=nullptr)
Detach from the SBD gateway (AT+SBDDET).
Definition: Iridium_9604_Satellite.cpp:497
IRIDIUM_9604_error_t parseSocketReadIndication(int socket, int length)
Read the TCP data indicated by a +UUSORD URC and pass it to the socket read callback(s).
Definition: Iridium_9604.cpp:1263
sfe_ip_address_t _lastRemoteIP
The remote IP address from the most recent +UUSOLI URC.
Definition: Iridium_9604.h:2510
void writePowerOnPin(bool state)
Write the PWR_ON pin: using the callback (if set), else the GPIO pin. Never drives the pin high: true...
Definition: Iridium_9604.cpp:822
IRIDIUM_9604_sbd_callback_t _sbdCallback
The SBD session callback. nullptr = blocking sessions.
Definition: Iridium_9604.h:2552
void completeSBDSession(IRIDIUM_9604_error_t status)
Non-blocking SBD session: mark the session complete. checkSBDSession calls the callback.
Definition: Iridium_9604_Satellite.cpp:791
void writeResetPin(bool state)
Write the RESET_N pin: using the callback (if set), else the GPIO pin. Never drives the pin high: tru...
Definition: Iridium_9604.cpp:843
void setSocketReadCallbackPlus(void(*socketReadCallbackPlus)(int, const char *, int, sfe_ip_address_t, int))
Set the socket read callback - called when a +UUSORD or +UUSORF URC is received. The library reads th...
Definition: Iridium_9604.cpp:485
int _iridiumResponseBacklogLength
The backlog could contain binary data so we can't use strlen to find its length.
Definition: Iridium_9604.h:2529
SparkFun_Iridium_9604::nmeaCallbackDataCommon_t nmeaCallbackDataCommon_t
The NMEA callback data type (SparkFun_Iridium_9604::nmeaCallbackDataCommon_t).
Definition: Iridium_9604.h:70
bool _sbdHighLevelNext
Set by sendReceiveSBD before it starts the session.
Definition: Iridium_9604.h:2557
virtual void beginSerial(unsigned long baud)
Set the communication bus baud rate.
Definition: Iridium_9604.cpp:1466
IRIDIUM_9604_error_t getAPN(int cid, sfe_string_t *apn, sfe_ip_address_t *ip, IRIDIUM_9604_pdp_type *pdpType=nullptr)
Read the Access Point Name and IP address for a PDP context (AT+CGDCONT?).
Definition: Iridium_9604_Network.cpp:281
IRIDIUM_9604_error_t getSBDTrafficManagementStatus(int *status, unsigned long *time)
Read the SBD traffic management status (AT+SBDLOE).
Definition: Iridium_9604_Satellite.cpp:904
IRIDIUM_9604_error_t sendUBXmessage(uint8_t msgClass, uint8_t msgId, const uint8_t *payload, uint16_t payloadLen, uint8_t *response=nullptr, size_t responseSize=0, size_t *responseLen=nullptr, unsigned long timeout=IRIDIUM_9604_10_SEC_TIMEOUT+1000)
Send a UBX message to the GNSS and return its response, as bytes (AT+UGUBX). See sendUBX().
Definition: Iridium_9604_GNSS.cpp:336
IRIDIUM_9604_error_t setUtimeIndication(IRIDIUM_9604_utime_urc_configuration_t config=IRIDIUM_9604_UTIME_URC_CONFIGURATION_ENABLED)
Configure the +UUTIME time indication URC (AT+UTIMEIND).
Definition: Iridium_9604_General.cpp:475
IRIDIUM_9604_error_t setMQTTsecure(bool secure, int secprofile=-1)
Enable or disable MQTT over TLS (AT+UMQTT=11).
Definition: Iridium_9604_Internet.cpp:408
IRIDIUM_9604_error_t setHTTPserverPort(int profile, int port)
Set the HTTP server port (AT+UHTTP=profile,5). Default: 80.
Definition: Iridium_9604_Internet.cpp:169
unsigned long _sbdATTimeout
The AT command timeout for SBD sessions (ms).
Definition: Iridium_9604.h:2546
bool haveResetPin(void)
Check if the RESET_N pin can be written: GPIO pin or callback.
Definition: Iridium_9604.h:2665
IRIDIUM_9604_error_t modulePowerOff(void)
Gracefully disconnect from the network and power the module off (AT+CPWROFF).
Definition: Iridium_9604.cpp:642
int urcGetLastSocketProtocol(int socket)
urcHandlerInterface: the protocol of the most recent socket operation on a socket.
Definition: Iridium_9604.cpp:576
IRIDIUM_9604_error_t resetHTTPprofile(int profile)
Reset an HTTP profile (AT+UHTTP=profile). The HTTP profile parameters are not saved in the non volati...
Definition: Iridium_9604_Internet.cpp:44
IRIDIUM_9604_error_t getSatelliteInfo(IRIDIUM_9604_sat_info_t *info)
Read the satellite system information (AT+USATINFO). Only available in the satellite RAT.
Definition: Iridium_9604_Satellite.cpp:136
IRIDIUM_9604_error_t autoTimeZone(bool enable)
Enable or disable the automatic time zone update from the network (AT+CTZU).
Definition: Iridium_9604_General.cpp:604
IRIDIUM_9604_error_t sendCustomCommandWithResponse(const char *command, const char *expectedResponse, char *responseDest, unsigned long commandTimeout=IRIDIUM_9604_STANDARD_RESPONSE_TIMEOUT, bool at=true)
Send a custom AT command and wait for the expected response.
Definition: Iridium_9604.cpp:678
IRIDIUM_9604_error_t setSIMstateReportingMode(int mode)
Set the SIM state reporting mode (AT+USIMSTAT). Bit 0 reports the (U)SIM initialization status (state...
Definition: Iridium_9604_Network.cpp:422
IRIDIUM_9604_error_t gpsGetState(bool *on, int *aiding=nullptr, int *systems=nullptr)
Read the GNSS state (AT+UGPS?).
Definition: Iridium_9604_GNSS.cpp:164
void hwEmergencyShutdown(void)
Abrupt emergency hardware shutdown: hold PWR_ON low for IRIDIUM_9604_EMERGENCY_SHUTDOWN_PULSE_PERIOD ...
Definition: Iridium_9604.cpp:905
void setFTPCommandCallback(void(*ftpCommandRequestCallback)(int command, int result))
Set the callback for the FTP command result URC (+UUFTPCR).
Definition: Iridium_9604.cpp:526
int _resetPin
The RESET_N pin. -1 if not connected.
Definition: Iridium_9604.h:2504
unsigned long getSBDATTimeout(void)
Read the AT command timeout used for SBD sessions.
Definition: Iridium_9604.h:2380
IRIDIUM_9604_error_t gpsSetAiding(gnss_aiding_mode_t gnss_aiding, gnss_system_t gnss_sys=(gnss_system_t)(GNSS_SYSTEM_GPS|GNSS_SYSTEM_SBAS))
Power the GNSS on with the chosen aiding mode and GNSS systems (AT+UGPS=1,<aid_mode>,...
Definition: Iridium_9604_GNSS.cpp:214
IRIDIUM_9604_pdp_type
The PDP types for setAPN() / getAPN().
Definition: Iridium_9604.h:630
@ PDP_TYPE_NONIP
Definition: Iridium_9604.h:633
@ PDP_TYPE_INVALID
Definition: Iridium_9604.h:631
@ PDP_TYPE_IPV4V6
Definition: Iridium_9604.h:634
@ PDP_TYPE_IPV6
Definition: Iridium_9604.h:635
@ PDP_TYPE_IP
Definition: Iridium_9604.h:632
IRIDIUM_9604_error_t setGpioMode(IRIDIUM_9604_gpio_t gpio, IRIDIUM_9604_gpio_mode_t mode, int value=0)
Set the mode of a GPIO pin (AT+UGPIOC).
Definition: Iridium_9604_General.cpp:620
IRIDIUM_9604_error_t ping(sfe_string_t remote_host, int retry=4, int p_size=32, unsigned long timeout=5000, int ttl=32)
Ping a remote host (AT+UPING). The results are delivered by the +UUPING URC: see setPingCallback().
Definition: Iridium_9604_Internet.cpp:24
IRIDIUM_9604_error_t socketDirectLinkCharacterTrigger(int socket, int characterTrigger)
Set the direct link character trigger (AT+UDCONF=7).
Definition: Iridium_9604_Sockets.cpp:845
bool _checkCallbacksReentrant
Prevent reentry of checkCallbacks.
Definition: Iridium_9604.h:2522
IRIDIUM_9604_error_t sendUBX(const char *ubxHex, char *responseHex=nullptr, size_t responseHexSize=0, unsigned long timeout=IRIDIUM_9604_10_SEC_TIMEOUT+1000)
Send a UBX message to the GNSS, as a hex string, and return its response (AT+UGUBX).
Definition: Iridium_9604_GNSS.cpp:276
sfe_string_t getSubscriberNo(void)
Read the subscriber number (AT+CNUM).
Definition: Iridium_9604_General.cpp:210
int _cmeErrorIndex
extendedErrorCheck: the number of IRIDIUM_9604_RESPONSE_CME_ERROR characters matched.
Definition: Iridium_9604.h:2517
IRIDIUM_9604_error_t getSBDSessionTimeout(int *timeout)
Read the SBD session timeout (AT+SBDST?).
Definition: Iridium_9604_Satellite.cpp:1058
void setSatelliteSVBeamCallback(void(*svBeamCallback)(IRIDIUM_9604_sv_beam_coords_t coords))
Set the callback for the +CIEV SV and beam coordinates indication. Enable it with setIndicatorEventRe...
Definition: Iridium_9604_Satellite.cpp:286
char * _iridiumRXBuffer
Allocated in DevIridium9604::begin.
Definition: Iridium_9604.h:2526
SparkFun_Iridium_9604::urcCallback_t urcCallback_t
The generic URC callback type. Cast your callback to this for setURCCallback().
Definition: Iridium_9604.h:71
void enableDebugging(sfe_print_t &debugPort=SparkFun_Iridium_9604::sfeStdout)
Turn on the debug messages.
Definition: Iridium_9604.cpp:163
IRIDIUM_9604_error_t setGNSSTimeZone(int timeZone)
Set the time zone used when the module clock is set from the GNSS (AT+UGTMR=<time_zone>).
Definition: Iridium_9604_GNSS.cpp:684
IRIDIUM_9604_error_t getFTPprotocolError(int *error_code, int *error_code2)
Read the most recent FTP protocol error (AT+UFTPER).
Definition: Iridium_9604_Internet.cpp:805
sfe_string_t getSatelliteSerialNumber(void)
Read the satellite serial number (AT+USATSN).
Definition: Iridium_9604_Satellite.cpp:123
SparkFun_Iridium_9604::nmeaMessage nmeaMessage
The NMEA message class (SparkFun_Iridium_9604::nmeaMessage).
Definition: Iridium_9604.h:69
IRIDIUM_9604_error_t readSBDText(char *text, size_t maxLength)
Read the mobile terminated buffer (AT+SBDR) as NULL-terminated text.
Definition: Iridium_9604_Satellite.cpp:1024
IRIDIUM_9604_error_t satelliteRFScan(int16_t *results, int *numResults, unsigned long timeout=IRIDIUM_9604_3_MIN_TIMEOUT)
Perform a satellite RF scan (AT+RFSCAN): the RSSI of all 252 channels. From the Iridium 9604 Addition...
Definition: Iridium_9604_Satellite.cpp:1265
IRIDIUM_9604_error_t getMQTTprotocolError(int *error_code, int *error_code2)
Read the most recent MQTT protocol error (AT+UMQTTER).
Definition: Iridium_9604_Internet.cpp:686
IRIDIUM_9604_error_t setFlowControl(IRIDIUM_9604_flow_control_t value=IRIDIUM_9604_ENABLE_FLOW_CONTROL)
Enable or disable RTS/CTS hardware flow control (AT&K).
Definition: Iridium_9604_General.cpp:824
IRIDIUM_9604_error_t writeSBDText(const char *text, int *status=nullptr)
Write text to the mobile originated buffer (AT+SBDW). The library HEX-encodes the text.
Definition: Iridium_9604_Satellite.cpp:1214
void pruneBacklog(void)
Remove everything except the URCs from the backlog.
Definition: Iridium_9604.cpp:1537
void sendCommand(const char *command, bool at)
Send an AT command. Processes any waiting serial data (URCs) into the backlog first.
Definition: Iridium_9604.cpp:1189
IRIDIUM_9604_error_t activatePDPcontext(bool status, int cid=-1)
Activate or deactivate a PDP context (AT+CGACT).
Definition: Iridium_9604_Network.cpp:766
IRIDIUM_9604_error_t disableAllNMEA(void)
Disable the output of all 13 NMEA messages.
Definition: Iridium_9604.h:1857
IRIDIUM_9604_error_t setSBDDeliveryShortCode(uint8_t dsc)
Set the SBD delivery short code (AT+SBDDSC). See IRIDIUM_9604_SBDDSC_HOLD_MT_DELIVERY etc.
Definition: Iridium_9604_Satellite.cpp:536
IRIDIUM_9604_error_t sendReceiveSBD(const uint8_t *txData, size_t txLength, bool txIsText, uint8_t *rxBuffer, size_t *rxLength)
The common code for the high-level SBD send / receive methods.
Definition: Iridium_9604_Satellite.cpp:1420
int waitForSatelliteSignalQuality(unsigned long timeout=60000)
Wait (calling bufferedPoll()) for the first +CIEV signal quality indication. Enables the indicator ev...
Definition: Iridium_9604_Satellite.cpp:252
IRIDIUM_9604_error_t registerOperator(struct operator_stats oper)
Manually register with a network operator (AT+COPS=1).
Definition: Iridium_9604_Network.cpp:647
IRIDIUM_9604_error_t socketReadUDP(int socket, int length, char *readDest, sfe_ip_address_t *remoteIPAddress=nullptr, int *remotePort=nullptr, int *bytesRead=nullptr)
Read data from a UDP socket (AT+USORF), plus the remote IP address and port. Large reads are split in...
Definition: Iridium_9604_Sockets.cpp:531
IRIDIUM_9604_error_t socketRead(int socket, int length, char *readDest, int *bytesRead=nullptr)
Read data from a TCP socket (AT+USORD). Large reads are split into multiple AT commands.
Definition: Iridium_9604_Sockets.cpp:316
char * _pruneBuffer
A temporary buffer used by pruneBacklog().
Definition: Iridium_9604.h:2527
IRIDIUM_9604_error_t setErrorReporting(uint8_t mode=2)
Configure how the module reports errors (AT+CMEE).
Definition: Iridium_9604_General.cpp:39
bool _sbdExtended
true for +SBDIX / +SBDIXA; false for +SBDI.
Definition: Iridium_9604.h:2555
void disableAtDebugging(void)
Turn off the AT command debug messages.
Definition: Iridium_9604.cpp:189
IRIDIUM_9604_error_t setFTPserver(const sfe_string_t &serverName)
Set the FTP server name (AT+UFTP=1).
Definition: Iridium_9604_Internet.cpp:726
IRIDIUM_9604_error_t setGNSSAidingIndication(bool enable=true)
Enable or disable the assisted GNSS indication URC (AT+UGIND). See setGNSSAidingCallback().
Definition: Iridium_9604_GNSS.cpp:262
IRIDIUM_9604_error_t setMQTTserver(const sfe_string_t &serverName, int port)
Set the MQTT broker name and port (AT+UMQTT=2).
Definition: Iridium_9604_Internet.cpp:379
SparkFun_Iridium_9604::sfe_print_t sfe_print_t
The print type: Print on Arduino; SfeOutput on ESP-IDF.
Definition: Iridium_9604.h:68
IRIDIUM_9604_error_t socketListen(int socket, unsigned int port)
Listen for incoming connections on a socket (AT+USOLI). See setSocketListenCallback().
Definition: Iridium_9604_Sockets.cpp:769
virtual size_t write(uint8_t c)
Write one byte directly to the module serial port.
Definition: Iridium_9604.cpp:559
bool poll(void)
The original poll function. Process one line of serial data from the module. It is 'blocking': it doe...
Definition: Iridium_9604.cpp:379
IRIDIUM_9604_error_t sendHTTPPOSTdata(int profile, sfe_string_t path, sfe_string_t responseFilename, sfe_string_t data, IRIDIUM_9604_http_content_types_t httpContentType)
Send an HTTP POST request with data (AT+UHTTPC=profile,5). The response is written to a file in the m...
Definition: Iridium_9604_Internet.cpp:257
IRIDIUM_9604_error_t reset(void)
Reset the module (AT+CFUN=16) and wait for it to restart. Bounded by IRIDIUM_9604_RESET_TIMEOUT.
Definition: Iridium_9604.cpp:607
void urcIndicatorEvent(int indicator, int value)
urcHandlerInterface: record the latest +CIEV indicator value.
Definition: Iridium_9604.cpp:589
IRIDIUM_9604_error_t getOperator(sfe_string_t *oper)
Read the current network operator (AT+COPS?).
Definition: Iridium_9604_Network.cpp:683
const unsigned long _rxWindowMillis
1ms is not quite long enough for a single char at 9600 baud. millis roll over much less often than mi...
Definition: Iridium_9604.h:2525
static const uint8_t IRIDIUM_9604_SBD_STATE_IN_PROGRESS
_sbdState: the session command has been sent. Waiting for the result
Definition: Iridium_9604.h:2550
IRIDIUM_9604_error_t socketClose(int socket, unsigned long timeout=IRIDIUM_9604_2_MIN_TIMEOUT)
Close a socket (AT+USOCL).
Definition: Iridium_9604_Sockets.cpp:117
bool setURCCallback(const char *urcPrefix, urcCallback_t callback, uint8_t index=0)
Register (or clear) a callback for a URC - generically. The typed helpers (setSocketReadCallback() et...
Definition: Iridium_9604.cpp:464
IRIDIUM_9604_error_t setSMSMessageFormat(IRIDIUM_9604_message_format_t textMode=IRIDIUM_9604_MESSAGE_FORMAT_TEXT)
Set the SMS message format (AT+CMGF).
Definition: Iridium_9604_SMS.cpp:24
IRIDIUM_9604_error_t _sbdCompleteStatus
The status for the callback.
Definition: Iridium_9604.h:2562
bool setNmeaCallbackPtr(const char *msgId, void(*callbackPointerPtr)(nmeaCallbackDataCommon_t *))
Register (or clear, with nullptr) the callback for an NMEA message. The callback is called by checkCa...
Definition: Iridium_9604_GNSS.cpp:802
IRIDIUM_9604_error_t disconnectFTP(void)
Disconnect from the FTP server (AT+UFTPC=0).
Definition: Iridium_9604_Internet.cpp:777
void urcProcessNMEA(const char *sentence, size_t length)
urcHandlerInterface: process one NMEA sentence from a +UUGNMEA URC.
Definition: Iridium_9604.h:2487
void setSocketListenCallback(void(*socketListenCallback)(int, sfe_ip_address_t, unsigned int, int, sfe_ip_address_t, unsigned int))
Set the callback for the socket listen URC (+UUSOLI). Called when a remote client connects to a liste...
Definition: Iridium_9604.cpp:475
IRIDIUM_9604_error_t setEpsRegistrationCallback(void(*epsRegistrationCallback)(IRIDIUM_9604_registration_status_t status, unsigned int tac, unsigned int ci, int Act))
Set the callback for the EPS network registration status URC (+CEREG) and enable the URC (AT+CEREG=2)...
Definition: Iridium_9604.cpp:545
void setSocketReadCallback(void(*socketReadCallback)(int, sfe_string_t))
Set the original socket read callback - called when a +UUSORD or +UUSORF URC is received....
Definition: Iridium_9604.cpp:480
IRIDIUM_9604_error_t disconnectMQTT(void)
Disconnect from the MQTT broker (AT+UMQTTC=0).
Definition: Iridium_9604_Internet.cpp:437
static const size_t _lastErrorTextSize
The size of _lastErrorText.
Definition: Iridium_9604.h:2514
IRIDIUM_9604_error_t cancelSBDSession(void)
Cancel the non-blocking SBD session (the equivalent of ISBDCallback returning false in the SparkFun I...
Definition: Iridium_9604_Satellite.cpp:854
void setHTTPCommandCallback(void(*httpCommandRequestCallback)(int profile, int command, int result))
Set the callback for the HTTP command result URC (+UUHTTPCR).
Definition: Iridium_9604.cpp:516
bool _sbdComplete
The session is complete: call the callback.
Definition: Iridium_9604.h:2561
IRIDIUM_9604_registration_status_t registration(bool eps=true)
Read the network registration status (AT+CEREG? or AT+CREG?).
Definition: Iridium_9604_Network.cpp:124
IRIDIUM_9604_error_t deleteReadSentUnsentSMSmessages(void)
Delete all the read, sent and unsent SMS messages from preferred storage (AT+CMGD=1,...
Definition: Iridium_9604.h:832
IRIDIUM_9604_error_t setRAT(IRIDIUM_9604_rat_t rat, bool autoReboot=true)
Select the Radio Access Technology (AT+URAT): LTE Cat M1 or satellite. New for the 9604.
Definition: Iridium_9604_General.cpp:846
IRIDIUM_9604_gpio_mode_t getGpioMode(IRIDIUM_9604_gpio_t gpio)
Read the mode of a GPIO pin (AT+UGPIOC?).
Definition: Iridium_9604_General.cpp:644
size_t hwWriteData(const char *buff, int len)
Write a buffer to the module, through the communication bus.
Definition: Iridium_9604.cpp:1391
IRIDIUM_9604_error_t socketDirectLinkMode(int socket)
Switch a socket into direct link (transparent) mode (AT+USODL).
Definition: Iridium_9604_Sockets.cpp:786
IRIDIUM_9604_gpio_t
GPIO pin map.
Definition: Iridium_9604.h:860
@ GPIO6
Definition: Iridium_9604.h:866
@ GPIO4
Definition: Iridium_9604.h:864
@ GPIO1
Definition: Iridium_9604.h:861
@ GPIO2
Definition: Iridium_9604.h:862
@ GPIO3
Definition: Iridium_9604.h:863
@ GPIO5
Definition: Iridium_9604.h:865
IRIDIUM_9604_error_t at(void)
Send "AT" and check for "OK".
Definition: Iridium_9604.cpp:597
char * _iridiumResponseBacklog
The backlog: data (URCs) received while waiting for an AT command response.
Definition: Iridium_9604.h:2528
IRIDIUM_9604_error_t setFTPtimeouts(const unsigned int timeout, const unsigned int cmd_linger, const unsigned int data_linger)
Set the FTP inactivity timeout and the command and data linger times (AT+UFTP).
Definition: Iridium_9604_Internet.cpp:736
IRIDIUM_9604_error_t setMQTTcredentials(const sfe_string_t &userName, const sfe_string_t &pwd)
Set the MQTT user name and password (AT+UMQTT=4).
Definition: Iridium_9604_Internet.cpp:393
IRIDIUM_9604_error_t sbdSessionExtended(IRIDIUM_9604_sbd_session_t *result, bool answeringRingAlert=false, const char *location=nullptr)
Initiate an extended SBD session (AT+SBDIX, or AT+SBDIXA when answering a ring alert)....
Definition: Iridium_9604_Satellite.cpp:876
char readChar(void)
Read one character from the module.
Definition: Iridium_9604.cpp:1444
IRIDIUM_9604_error_t sendCommandWithResponse(const char *command, const char *expectedResponse, char *responseDest, unsigned long commandTimeout, int destSize=minimumResponseAllocation, bool at=true)
Send an AT command and wait for the expected response. Any other data (URCs) is added to the backlog.
Definition: Iridium_9604.cpp:1039
bool _sbdHighLevel
true if the session was started by sendReceiveSBD: check the MO / MT status and read the MT message.
Definition: Iridium_9604.h:2556
IRIDIUM_9604_error_t socketDirectLinkDataLengthTrigger(int socket, int dataLengthTrigger)
Set the direct link data length trigger (AT+UDCONF=6).
Definition: Iridium_9604_Sockets.cpp:824
IRIDIUM_9604_gnss_system_t gnss_system_t
The GNSS system type. (Retained for SARA-R5 compatibility.)
Definition: Iridium_9604.h:1590
char _lastErrorText[_lastErrorTextSize]
The <err> from the most recent +CME ERROR / +CMS ERROR response.
Definition: Iridium_9604.h:2515
IRIDIUM_9604_error_t sbdSessionInternal(const char *command, const char *responseTag, IRIDIUM_9604_sbd_session_t *result)
Send an SBD session command (+SBDI / +SBDIX / +SBDIXA) and parse the result.
Definition: Iridium_9604_Satellite.cpp:627
void setSIMstateReportCallback(void(*simStateRequestCallback)(IRIDIUM_9604_sim_states_t state))
Set the callback for the SIM state URC (+UUSIMSTAT). See setSIMstateReportingMode().
Definition: Iridium_9604.cpp:501
IRIDIUM_9604_sbd_session_t getLastSBDSession(void)
The result of the most recent SBD session (sbdSession(), sbdSessionExtended() or the send / receive m...
Definition: Iridium_9604.h:2352
IRIDIUM_9604_error_t configSecurityProfileString(int secprofile, IRIDIUM_9604_sec_profile_parameter_t parameter, sfe_string_t value)
Configure a security profile parameter with a string value (AT+USECPRF).
Definition: Iridium_9604_Internet.cpp:883
sfe_string_t getIMSI(void)
Read the SIM International Mobile Subscriber Identity (AT+CIMI).
Definition: Iridium_9604_General.cpp:162
void setGpsReadCallback(void(*gpsRequestCallback)(ClockData time, PositionData gps, SpeedData spd, unsigned long uncertainty))
Set the callback for the +UULOC location URC (see gpsRequest()).
Definition: Iridium_9604.cpp:495
IRIDIUM_9604_error_t getPDPcontextState(int cid, bool *active)
Read whether a PDP context is active (AT+CGACT?).
Definition: Iridium_9604_Network.cpp:848
IRIDIUM_9604_error_t readSMSmessage(int location, sfe_string_t *unread, sfe_string_t *from, sfe_string_t *dateTime, sfe_string_t *message)
Read an SMS message (AT+CMGR). Reading an empty location returns IRIDIUM_9604_ERROR_UNEXPECTED_RESPON...
Definition: Iridium_9604_SMS.cpp:151
sfe_string_t getCapabilities(void)
Read the module's capabilities list (AT+GCAP).
Definition: Iridium_9604_General.cpp:237
IRIDIUM_9604_pin_write_callback_t _resetPinWriteCallback
The RESET_N pin write callback. nullptr = use _resetPin.
Definition: Iridium_9604.h:2507
void setPowerOnPinWriteCallback(IRIDIUM_9604_pin_write_callback_t callback)
Set a callback to write the 9604 PWR_ON pin - in place of the GPIO pin passed to the constructor.
Definition: Iridium_9604.h:169
IRIDIUM_9604_error_t getFileContents(sfe_string_t filename, sfe_string_t *contents)
Read the contents of a file from the module's file system (AT+URDFILE). OK for text files,...
Definition: Iridium_9604_FileSystem.cpp:85
sfe_string_t getNmeaMessageBlockField(nmeaMessage *theMessage, uint16_t blockIndex, const char *fieldName)
Get one field from a repeated block of the stored copy of an NMEA message (e.g. GSV),...
Definition: Iridium_9604_GNSS.cpp:863
int _satelliteSignalQuality
From +CIEV:0.
Definition: Iridium_9604.h:2543
uint8_t _maxInitTries
The maximum number of initialization attempts.
Definition: Iridium_9604.h:2512
IRIDIUM_9604_sbd_session_t _lastSBDSession
The result of the most recent SBD session.
Definition: Iridium_9604.h:2545
sfe_string_t getNmeaMessageFieldCallback(nmeaMessage *theMessage, const char *fieldName)
Get one field of an NMEA message, by name, from inside an NMEA callback.
Definition: Iridium_9604_GNSS.cpp:828
nmeaMessage * getNmeaMessageByName(const char *msgId)
Find an NMEA message object by its message ID.
Definition: Iridium_9604.h:1989
sfe_string_t getManufacturerID(void)
Read the manufacturer identification (AT+CGMI).
Definition: Iridium_9604_General.cpp:57
void(* _socketReadCallback)(int, sfe_string_t)
The original socket read callback.
Definition: Iridium_9604.h:2537
IRIDIUM_9604_error_t setNMEAoutput(const char *msgId, uint8_t rate=1, uint8_t output=IRIDIUM_9604_NMEA_OUTPUT_URC)
Configure the output of one NMEA message (AT+UGNMEA). New for the 9604.
Definition: Iridium_9604_GNSS.cpp:432
IRIDIUM_9604_error_t getLastSBDSessionStatus(void)
The status of the most recent SBD session - the status passed to the callback.
Definition: Iridium_9604.h:2427
int _satelliteServiceAvailable
From +CIEV:1.
Definition: Iridium_9604.h:2544
sfe_ip_address_t lastRemoteIP(void)
The remote IP address from the most recent socket listen (+UUSOLI) URC.
Definition: Iridium_9604_Sockets.cpp:1320
IRIDIUM_9604_pin_write_callback_t _powerOnPinWriteCallback
The PWR_ON pin write callback. nullptr = use _powerPin.
Definition: Iridium_9604.h:2506
uint8_t * _sbdRxBuffer
sendReceiveSBD: where to store the MT message.
Definition: Iridium_9604.h:2558
size_t hwWrite(const char c)
Write one byte to the module, through the communication bus.
Definition: Iridium_9604.cpp:1406
IRIDIUM_9604_error_t getDefaultPDPcontext(int *cid, int *preferredProtocol=nullptr)
Read the PDP context used by the internal TCP/IP stack (AT+UDCONF=19).
Definition: Iridium_9604_Network.cpp:789
IRIDIUM_9604_error_t urcSocketReadIndicationUDP(int socket, int length)
urcHandlerInterface: read the UDP data indicated by a +UUSORF URC and pass it to the socket read call...
Definition: Iridium_9604.h:2473
int _partialLineLength
The length of _partialLine.
Definition: Iridium_9604.h:2534
IRIDIUM_9604_error_t querySocketStatusTCP(int socket, IRIDIUM_9604_tcp_socket_status_t *status)
Query the status of a TCP socket (AT+USOCTL=socket,10).
Definition: Iridium_9604_Sockets.cpp:1169
bool isGPSon(void)
Check if the GNSS is powered on (AT+UGPS?).
Definition: Iridium_9604_GNSS.cpp:25
static const uint8_t IRIDIUM_9604_SBD_STATE_IDLE
_sbdState: no session in progress
Definition: Iridium_9604.h:2549
sfe_ip_address_t _lastLocalIP
The local IP address from the most recent +UUSOLI URC.
Definition: Iridium_9604.h:2511
IRIDIUM_9604_error_t socketWriteUDP(int socket, const char *address, int port, const char *str, int len=-1)
Write data to a UDP socket (AT+USOST). OK for binary data if len is provided.
Definition: Iridium_9604_Sockets.cpp:254
void checkCallbacks(void)
Call any NMEA callbacks which are waiting. Called automatically by bufferedPoll().
Definition: Iridium_9604.cpp:436
IRIDIUM_9604_error_t ftpGetFile(const sfe_string_t &filename)
Download a file from the FTP server into the module's file system (AT+UFTPC=4).
Definition: Iridium_9604_Internet.cpp:787
bool getNMEAfield(const char *msgId, const char *field, sfe_string_t &value)
Get one field of an NMEA message, by name. Calls getNMEA() first.
Definition: Iridium_9604_GNSS.cpp:787
IRIDIUM_9604_error_t connectFTP(void)
Connect to the FTP server (AT+UFTPC=1). The result is delivered by the +UUFTPCR URC: see setFTPComman...
Definition: Iridium_9604_Internet.cpp:767
IRIDIUM_9604_error_t getNMEAoutput(const char *msgId, uint8_t *rate, uint8_t *output)
Read the output configuration of one NMEA message (AT+UGNMEA?).
Definition: Iridium_9604_GNSS.cpp:481
IRIDIUM_9604_gpio_mode_t
GPIO pin modes.
Definition: Iridium_9604.h:872
@ LAST_GASP_ENABLE
Definition: Iridium_9604.h:892
@ KHZ_32768_OUT
Definition: Iridium_9604.h:904
@ UART_INTERFACE
Definition: Iridium_9604.h:889
@ FAST_POWER_OFF
Definition: Iridium_9604.h:897
@ TIMESTAMP
Definition: Iridium_9604.h:896
@ RING_INDICATION
Definition: Iridium_9604.h:891
@ UPSV_CONTROL
New for the 9604.
Definition: Iridium_9604.h:906
@ GNSS_DATA_READY
Definition: Iridium_9604.h:878
@ SATELLITE_GNSS_RX_TX_INDICATION
New for the 9604: Satellite / GNSS Rx/Tx indication.
Definition: Iridium_9604.h:908
@ MASTER_CLOCK_GENRATION
Definition: Iridium_9604.h:888
@ GNSS_SUPPLY_ENABLE
Definition: Iridium_9604.h:877
@ EXT_GNSS_TIME_PULSE
Definition: Iridium_9604.h:901
@ SATELLITE_GNSS_RX_INDICATION
New for the 9604: Satellite / GNSS Rx indication.
Definition: Iridium_9604.h:907
@ EXTERNAL_GNSS_ANTENNA
Definition: Iridium_9604.h:893
@ SPI_SERIAL_INTERFACE
Definition: Iridium_9604.h:887
@ DTR_MODE
Definition: Iridium_9604.h:903
@ GPIO_MODE_INVALID
Definition: Iridium_9604.h:873
@ MODULE_STATUS_INDICATION
Definition: Iridium_9604.h:884
@ ANTENNA_TUNING
Definition: Iridium_9604.h:900
@ MODULE_OPERATING_MODE_INDICATION
Definition: Iridium_9604.h:885
@ NETWORK_STATUS
Definition: Iridium_9604.h:876
@ JAMMING_DETECTION
Definition: Iridium_9604.h:880
@ SAFE_MEMORY_POWER_OFF
New for the 9604.
Definition: Iridium_9604.h:905
@ TIME_PULSE_OUTPUT
Definition: Iridium_9604.h:895
@ GPIO_OUTPUT
Definition: Iridium_9604.h:874
@ I2S_DIGITAL_AUDIO_INTERFACE
Definition: Iridium_9604.h:886
@ LWM2M_PULSE
Definition: Iridium_9604.h:898
@ HEADSET_DETECTION
Definition: Iridium_9604.h:882
@ GNSS_RTC_SHARING
Definition: Iridium_9604.h:879
@ TIME_PULSE_GNSS
Definition: Iridium_9604.h:894
@ WIFI_ENABLE
Definition: Iridium_9604.h:890
@ GSM_TX_BURST_INDICATION
Definition: Iridium_9604.h:883
@ HARDWARE_FLOW_CONTROL
Definition: Iridium_9604.h:899
@ PAD_DISABLED
Definition: Iridium_9604.h:909
@ EXT_GNSS_TIMESTAMP
Definition: Iridium_9604.h:902
@ GPIO_INPUT
Definition: Iridium_9604.h:875
@ SIM_CARD_DETECTION
Definition: Iridium_9604.h:881
IRIDIUM_9604_error_t getSBDAutoRegistration(IRIDIUM_9604_sbdareg_mode_t *mode)
Read the SBD automatic registration mode (AT+SBDAREG?).
Definition: Iridium_9604_Satellite.cpp:402
void setSocketCloseCallback(void(*socketCloseCallback)(int))
Set the callback for the socket close URC (+UUSOCL).
Definition: Iridium_9604.cpp:490
IRIDIUM_9604_error_t unsubscribeMQTTtopic(const sfe_string_t &topic)
Unsubscribe from an MQTT topic (AT+UMQTTC=5).
Definition: Iridium_9604_Internet.cpp:465
sfe_string_t getCCID(void)
Read the SIM card identification (AT+CCID).
Definition: Iridium_9604_General.cpp:183
bool processNMEA(const char *sentence, size_t length)
Process one NMEA sentence: check the checksum, store it and queue it for the callback....
Definition: Iridium_9604_GNSS.cpp:695
SparkFun_Iridium_9604::urcHandlerVector urcHandlers
The URC handler objects - one per registered URC handler.
Definition: Iridium_9604.h:2498
IRIDIUM_9604_error_t deleteReadSMSmessages(void)
Delete all the read SMS messages from preferred storage (AT+CMGD=1,1).
Definition: Iridium_9604.h:820
sfe_string_t getSatelliteIMEI(void)
Read the 15 digit satellite (SBD) IMEI (AT+USATSN).
Definition: Iridium_9604_Satellite.cpp:114
IRIDIUM_9604_error_t getSBDDeliveryShortCode(uint8_t *dsc)
Read the SBD delivery short code (AT+SBDDSC?).
Definition: Iridium_9604_Satellite.cpp:574
void checkSBDSession(void)
Non-blocking SBD session: check for a timeout; read the MT message (sendReceiveSBD) and call the call...
Definition: Iridium_9604_Satellite.cpp:798
void hwReset(void)
Reset (reboot) the module: hold RESET_N low for IRIDIUM_9604_RESET_PULSE_PERIOD (200 ms),...
Definition: Iridium_9604.cpp:890
IRIDIUM_9604_error_t enableEcho(bool enable=true)
Enable or disable the command echo (ATE1 / ATE0). The library disables echo during begin().
Definition: Iridium_9604_General.cpp:24
IRIDIUM_9604_error_t parseSocketListenIndication(int listeningSocket, sfe_ip_address_t localIP, unsigned int listeningPort, int socket, sfe_ip_address_t remoteIP, unsigned int port)
Process a +UUSOLI URC: record the IP addresses and call the socket listen callback.
Definition: Iridium_9604.cpp:1362
IRIDIUM_9604_error_t getUtimeIndication(IRIDIUM_9604_utime_urc_configuration_t *config)
Read the time indication URC configuration (AT+UTIMEIND?).
Definition: Iridium_9604_General.cpp:491
bool havePowerOnPin(void)
Check if the PWR_ON pin can be written: GPIO pin or callback.
Definition: Iridium_9604.h:2659
sfe_string_t getNmeaMessageBlockFieldCallback(nmeaMessage *theMessage, uint16_t blockIndex, const char *fieldName)
Get one field from a repeated block of an NMEA message (e.g. GSV), by name, from inside an NMEA callb...
Definition: Iridium_9604_GNSS.cpp:851
The following abstract class is used as an interface for the platform-specific implementations....
Definition: sfe_bus.h:37
Debug printing: replaces the SARA-R5 library _debugPort prints. A base class of DevIridium9604 and th...
Definition: sfe_debug.h:38
The base class for the NMEA messages. Each message stores its latest copy and a ring buffer of copies...
Definition: nmeaMessage.h:88
The collection of NMEA message objects.
Definition: nmeaMessageVector.h:59
nmeaMessage * find(const char *msgId)
Find the registered message object for a given NMEA message identifier.
Definition: nmeaMessageVector.h:89
The collection of registered URC handlers. Replaces the SARA-R5 processURCEvent().
Definition: urcHandlerVector.h:61
void(* urcCallback_t)(void)
The generic URC callback type. Cast your callback to this for setURCCallback().
Definition: urcHandler.h:59
The date and time.
Definition: Iridium_9604_typedefs.h:186
Satellite system information (+USATINFO)
Definition: Iridium_9604_typedefs.h:570
The result of an SBD session (+SBDI / +SBDIX)
Definition: Iridium_9604_typedefs.h:663
int mtQueued
<MT queued>: count of MT messages waiting at the gateway
Definition: Iridium_9604_typedefs.h:669
The result of +SBDSX.
Definition: Iridium_9604_typedefs.h:696
The +CIEV:3 SV and beam coordinates.
Definition: Iridium_9604_typedefs.h:600
A position.
Definition: Iridium_9604_typedefs.h:193
Forward declaration - see nmeaCallbackDataCommon_t below.
Definition: nmeaMessage.h:80
A speed and course.
Definition: Iridium_9604_typedefs.h:204
The extended signal quality (+CESQ).
Definition: Iridium_9604_typedefs.h:221
A network operator - from getOperators().
Definition: Iridium_9604_typedefs.h:212