Brunovf1 / xbee-arduino

Automatically exported from code.google.com/p/xbee-arduino
GNU General Public License v3.0
0 stars 0 forks source link

Error using AtCommandRequest #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm trying to configure my XBee (Series 2) through AtCommandRequest.
The problem is when I use the command to set the sleep mode to another value, 
the xbee returns error code 3 (UNEXPECTED_START_BYTE).
The XBee is an end device, so there's no problem using the sleep mode.

The code I'm using to set the atCommandRequest it's this:

#####
uint8_t atsm_cmd[]={'S','M'};
uint8_t value[]={'1'};
uint8_t length=1;

AtCommandRequest atRequest = AtCommandRequest(atsm_cmd, value, length);
####

Anyway I'll attach my code.

Thanks.

Original issue reported on code.google.com by jotap.simoes on 16 Mar 2012 at 3:45

Attachments:

GoogleCodeExporter commented 9 years ago
My previous code had an error, here's the new version

Original comment by jotap.simoes on 16 Mar 2012 at 4:19

Attachments:

GoogleCodeExporter commented 9 years ago
Solved the problem the error was uint8_t value[]={'1'};

and it should be uint8_t value[]={1};

Original comment by jotap.simoes on 19 Mar 2012 at 6:00

GoogleCodeExporter commented 9 years ago

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 6:46

GoogleCodeExporter commented 9 years ago
Woooow!! Thanks for the question and answers....!
I posted a similar problem here: 
http://arduino.stackexchange.com/questions/8791/at-command-xbee-from-atmega-to-d
isable-dio5-associated-led/8820#8820

Original comment by jumper...@gmail.com on 23 Feb 2015 at 12:16