Xbee - Garbage Characters

I'm using AltSoftSerial and the XBee libraries to transmit GPS coordinates. The problem is when I try to transmit: "GPS String" my other Xbee receives a bunch of additional charters:

GPS Stringr~ ÿÿÿþ

I'm not sure why I'm receiving them, but the code is outlined below:

// Xbee - Takes up to 10% of the memory
#include <XBee.h>

#include <AltSoftSerial.h>

//// create the XBee object
XBee xbee = XBee();  //Takes up ~10% of dynamic memory 
XBeeAddress64 Broadcast = XBeeAddress64(0x00000000, 0x0000ffff);
////The Serial connection from the Xbee
AltSoftSerial altSerial;


//  //Setup Serial for Xbee
//  //Setup Serial to Xbee - I may be able to live without the xbee object and just use the selectSerial object...


  sendXbee("GPS String");


void sendXbee(const char* command){
  ZBTxRequest zbtx = ZBTxRequest(Broadcast, (uint8_t *)command, strlen(command));

My best guess is that the sendXbee function is building the transmitted packets incorrectly.

One more side note/question: I've also tried to transmit some gps coordinates and get a bunch of garbage charters too:

          Serial.print(gps.location.lat(), 6);
          Serial.print(gps.location.lng(), 6);

Any help is much appreciated. :slight_smile:

-FlyDangerous o7

I figured it out... The Xbee Library for Arduino doesn't support Xbee S3B.

Took my Xbee to AT Mode and wrote directly to the serial port. No issues.

If API mode is needed I did find an article here: https://forum.arduino.cc/index.php?topic=378133.15