vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.91k stars 709 forks source link

Xbee API mode #300

Open sdiaz-qkt opened 5 years ago

sdiaz-qkt commented 5 years ago

Hi, this is not really an issue but I was just wondering if there is a way to use this library with an Xbee 3g cellular in API mode.

Thank you.

SRGDamia1 commented 5 years ago

This library uses a combination of transparent and command mode for the XBee's. At one point I looked into using API mode to enable multiple TCP connections, but the API mode is so much more complicated that I decided it would be an enormous amount of effort for very little gain.

The 3G global XBee is based on a u-blox SARA U201 chip, which this library also supports. So you also have the option of putting the 3G XBee into bypass mode (using XCTU or some other means) and then using TINY_GSM_MODEM_UBLOX instead of TINY_GSM_MODEM_XBEE. Doing that will also give you the full number of TCP connections possible for the U201 (6, I think). If you had an LTE-M XBee you could do the same thing. Digi has all kinds of ominous warnings against using Bypass mode, but my experience has actually been that the boards running in Bypass mode connect to the Hologram network faster and stay attached better.

Was there another reason you wanted to use API mode? Are you trying to integrate with a radio network already running in API mode? I've never tried to put the cellular modules together with the radios modules so I'm curious how it has worked for you if you've tried.