andrewrapp / xbee-arduino

Arduino library for communicating with XBee radios in API mode
GNU General Public License v2.0
337 stars 163 forks source link

AtCommand on Series1 no response #61

Closed pmeloy closed 6 years ago

pmeloy commented 6 years ago

Just getting started with the XBee on a Leonardo so first step is just to talk to the XBee on the board I'm programming so I started with the AtCommand example.

Changed the software serial to hardware with my USB being Serial and XBee Serial1 (works fine that way with other programs). Made no other changes.

Uploaded that and never see any responses. Increased the delays to 10 seconds, still nothing.

Looked at XBee.h and discovered that the both #define SERIES_x were left defined so I commented out SERIES_2. Wouldn't compile after that due to a lot of callback methods not being defined so I assumed those were SERIES_2 and extended the #ifdefs to cover them. Still nothing.

pmeloy commented 6 years ago

Ok never mind. Didn't realize the example doesn't set the XBee into API mode. Added that in setup() and now it's working (without commenting out anything in the .h or .cpp)