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