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

Need An Example For AT Command With Value and ValueLength. #62

Open limbongofficial opened 6 years ago

limbongofficial commented 6 years ago

I still cannot access the value. Would you update the atcommand for more detail... especially in value and value legth.

TaDDu commented 6 years ago

You need to clear the command value.

void clearCommandValue () Clears the optional commandValue and commandValueLength so that a query may be sent.

atRequest.setCommand(assocCmd); atRequest.setCommandValue(assocValue); atRequest.setCommandValueLength(assocLength);
sendAtCommand(); atRequest.clearCommandValue()

limbongofficial commented 6 years ago

i did, but somehow... i found IA command parameter error. i didnt set any IA. Somehow, the IA default parameter is gone, after everytime i do Remote AT Command Or AT Command using api. do you know any suggestion?

TaDDu commented 6 years ago

Have you tested your modules can communicate using x-ctu? are you using api mode 1 or 2? What is your module and firmware version?

limbongofficial commented 6 years ago

Hai TaDDu.. my firmware is based on 9000 version (XB S2C Pro) API MODE 2. After I send AP Command And Remote AP Command, the IA Parameter will be set 'NULL' (no HEX number at all). Is it a bug or not? since 3 xbee of mine have same problem. The other problem is the response is got code 92 but the status is OK