mirror of
				https://github.com/KevinMidboe/TinyGSM.git
				synced 2025-10-29 18:00:18 +00:00 
			
		
		
		
	Fixed XBee mux array compiler warning, updated readme
This commit is contained in:
		
							
								
								
									
										37
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								README.md
									
									
									
									
									
								
							@@ -35,29 +35,29 @@ TinyGSM also pulls data gently from the modem (whenever possible), so it can ope
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## Features
 | 
					## Features
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Feature \ Modem              | SIM800 | SIM8x8 | A6/A7/A20 | M590 | ESP8266
 | 
					Feature \ Modem              | SIM800 | SIM8x8 | A6/A7/A20 | M590 | ESP8266 | XBee
 | 
				
			||||||
---                          | ---    | ---    | ---       | ---  | ---
 | 
					---                          | ---    | ---    | ---       | ---  | ---     |
 | 
				
			||||||
**Data connections**
 | 
					**Data connections**
 | 
				
			||||||
TCP (HTTP, MQTT, Blynk, ...) | ✔      | ✔      | ✔         | ✔    | ✔
 | 
					TCP (HTTP, MQTT, Blynk, ...) | ✔      | ✔      | ✔         | ✔    | ✔       | ✔
 | 
				
			||||||
UDP                          |        |        |           |      | 
 | 
					UDP                          |        |        |           |      |         | ◌
 | 
				
			||||||
SSL/TLS (HTTPS)              | ✔¹     | ✔¹     | 🅧        | 🅧   | ◌
 | 
					SSL/TLS (HTTPS)              | ✔¹     | ✔¹     | 🅧        | 🅧   | ◌       |
 | 
				
			||||||
**USSD**
 | 
					**USSD**
 | 
				
			||||||
Sending USSD requests        | ✔      | ✔      | ✔         | ✔    | 
 | 
					Sending USSD requests        | ✔      | ✔      | ✔         | ✔    |         |
 | 
				
			||||||
Decoding 7,8,16-bit response | ✔      | ✔      | ✔         | ✔    | 
 | 
					Decoding 7,8,16-bit response | ✔      | ✔      | ✔         | ✔    |         |
 | 
				
			||||||
**SMS**
 | 
					**SMS**
 | 
				
			||||||
Sending                      | ✔      | ✔      | ✔         | ✔    | 
 | 
					Sending                      | ✔      | ✔      | ✔         | ✔    |         | ✔
 | 
				
			||||||
Sending Unicode              | ✔      | ✔      | ◌         | 🅧   | 
 | 
					Sending Unicode              | ✔      | ✔      | ◌         | 🅧   |         |
 | 
				
			||||||
Reading                      |        |        |           |      | 
 | 
					Reading                      |        |        |           |      |         |
 | 
				
			||||||
Incoming message event       |        |        |           | ?    | 
 | 
					Incoming message event       |        |        |           | ?    |         |
 | 
				
			||||||
**Calls**
 | 
					**Calls**
 | 
				
			||||||
Dial, hangup                 | ✔      | ✔      | ✔         | 🅧   | 
 | 
					Dial, hangup                 | ✔      | ✔      | ✔         | 🅧   |         | 🅧
 | 
				
			||||||
Receiving calls              | ✔      | ✔      | ✔         | 🅧   | 
 | 
					Receiving calls              | ✔      | ✔      | ✔         | 🅧   |         | 🅧
 | 
				
			||||||
Incoming event (RING)        | ◌      | ◌      | ◌         | 🅧   | 
 | 
					Incoming event (RING)        | ◌      | ◌      | ◌         | 🅧   |         | 🅧
 | 
				
			||||||
DTMF sending                 | ◌      | ◌      | ◌         | 🅧   | 
 | 
					DTMF sending                 | ◌      | ◌      | ◌         | 🅧   |         | 🅧
 | 
				
			||||||
DTMF decoding                | ◌      | ◌      | 🅧        | 🅧   | 
 | 
					DTMF decoding                | ◌      | ◌      | 🅧        | 🅧   |         | 🅧
 | 
				
			||||||
**Location**
 | 
					**Location**
 | 
				
			||||||
GSM location service         | ✔      | ✔      | 🅧        | 🅧   | 
 | 
					GSM location service         | ✔      | ✔      | 🅧        | 🅧   |         | 🅧
 | 
				
			||||||
GPS/GNSS                     | 🅧     | ✔²     | ◌¹        | 🅧   | 
 | 
					GPS/GNSS                     | 🅧     | ✔²     | ◌¹        | 🅧   |         | 🅧
 | 
				
			||||||
 | 
					
 | 
				
			||||||
✔ - implemented  ◌ - planned  🅧 - not available for this modem  
 | 
					✔ - implemented  ◌ - planned  🅧 - not available for this modem  
 | 
				
			||||||
¹ - only some device models or firmware revisions have this feature  
 | 
					¹ - only some device models or firmware revisions have this feature  
 | 
				
			||||||
@@ -70,6 +70,7 @@ GPS/GNSS                     | 🅧     | ✔²     | ◌¹        | 🅧   |
 | 
				
			|||||||
- [x] AI-Thinker A6, A6C, A7
 | 
					- [x] AI-Thinker A6, A6C, A7
 | 
				
			||||||
- [x] Neoway M590
 | 
					- [x] Neoway M590
 | 
				
			||||||
- [x] ESP8266 (AT commands interface, similar to GSM modems)
 | 
					- [x] ESP8266 (AT commands interface, similar to GSM modems)
 | 
				
			||||||
 | 
					- [x] Digi XBee WiFi and Cellular (using XBee command mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Supported modules
 | 
					### Supported modules
 | 
				
			||||||
- [x] GPRSbee
 | 
					- [x] GPRSbee
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,6 +15,8 @@
 | 
				
			|||||||
  #define TINY_GSM_RX_BUFFER 256
 | 
					  #define TINY_GSM_RX_BUFFER 256
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define TINY_GSM_MUX_COUNT 1  // Multi-plexing isn't supported using command mode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <TinyGsmCommon.h>
 | 
					#include <TinyGsmCommon.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define GSM_NL "\r"
 | 
					#define GSM_NL "\r"
 | 
				
			||||||
@@ -59,11 +61,11 @@ class GsmClient : public Client
 | 
				
			|||||||
public:
 | 
					public:
 | 
				
			||||||
  GsmClient() {}
 | 
					  GsmClient() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GsmClient(TinyGsm& modem, uint8_t mux = 1) {
 | 
					  GsmClient(TinyGsm& modem, uint8_t mux = 0) {
 | 
				
			||||||
    init(&modem, mux);
 | 
					    init(&modem, mux);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bool init(TinyGsm* modem, uint8_t mux = 1) {
 | 
					  bool init(TinyGsm* modem, uint8_t mux = 0) {
 | 
				
			||||||
    this->at = modem;
 | 
					    this->at = modem;
 | 
				
			||||||
    this->mux = mux;
 | 
					    this->mux = mux;
 | 
				
			||||||
    sock_connected = false;
 | 
					    sock_connected = false;
 | 
				
			||||||
@@ -438,7 +440,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
  int modemConnect(const char* host, uint16_t port, uint8_t mux = 1) {
 | 
					  int modemConnect(const char* host, uint16_t port, uint8_t mux = 0) {
 | 
				
			||||||
    sendAT(GF("LA"), host);
 | 
					    sendAT(GF("LA"), host);
 | 
				
			||||||
    String strIP; strIP.reserve(16);
 | 
					    String strIP; strIP.reserve(16);
 | 
				
			||||||
    // wait for the response
 | 
					    // wait for the response
 | 
				
			||||||
@@ -460,7 +462,7 @@ private:
 | 
				
			|||||||
    return modemConnect(res, port);
 | 
					    return modemConnect(res, port);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  int modemConnect(IPAddress ip, uint16_t port, uint8_t mux = 1) {
 | 
					  int modemConnect(IPAddress ip, uint16_t port, uint8_t mux = 0) {
 | 
				
			||||||
    String host; host.reserve(16);
 | 
					    String host; host.reserve(16);
 | 
				
			||||||
    host += ip[0];
 | 
					    host += ip[0];
 | 
				
			||||||
    host += ".";
 | 
					    host += ".";
 | 
				
			||||||
@@ -478,13 +480,13 @@ private:
 | 
				
			|||||||
    return rsp;
 | 
					    return rsp;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  int modemSend(const void* buff, size_t len, uint8_t mux = 1) {
 | 
					  int modemSend(const void* buff, size_t len, uint8_t mux = 0) {
 | 
				
			||||||
    stream.write((uint8_t*)buff, len);
 | 
					    stream.write((uint8_t*)buff, len);
 | 
				
			||||||
    stream.flush();
 | 
					    stream.flush();
 | 
				
			||||||
    return len;
 | 
					    return len;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bool modemGetConnected(uint8_t mux = 1) {
 | 
					  bool modemGetConnected(uint8_t mux = 0) {
 | 
				
			||||||
    commandMode();
 | 
					    commandMode();
 | 
				
			||||||
    if (beeType == S6B) sendAT(GF("AI"));
 | 
					    if (beeType == S6B) sendAT(GF("AI"));
 | 
				
			||||||
    else sendAT(GF("CI"));
 | 
					    else sendAT(GF("CI"));
 | 
				
			||||||
@@ -625,9 +627,7 @@ private:
 | 
				
			|||||||
  int           guardTime;
 | 
					  int           guardTime;
 | 
				
			||||||
  XBeeType      beeType;
 | 
					  XBeeType      beeType;
 | 
				
			||||||
  Stream&       stream;
 | 
					  Stream&       stream;
 | 
				
			||||||
  GsmClient*    sockets[1];
 | 
					  GsmClient*    sockets[TINY_GSM_MUX_COUNT];
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef TinyGsm::GsmClient TinyGsmClient;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user