C routines for sending commands and reading response?

Has anyone already developed a library of C function calls to issue AT commands to an XBee / Pro module and to look for responses (OK, ERROR, returned values, etc.)?

Thanks.

Dave

basically, you need c code to open a serial connection. Or use hyperterminal/x-ctu etc…

here’s something that may be helpful (haven’t tested it):

http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html

Thanks very much for responding.

I was bascially asking if anyone had built a set of handlers for the AT commands issued via serial interface to the modules. For instance, if your program issues the command “ATNI”, the module could (potentially) reply with “OK” or “ERROR” or nothing (if the command did not wait long enough after issuing the “+++”). If it responded with “ERROR”, the routine could automatically reattempt the command after a period of time (or some other action). If there was no response after waiting for a certqain duration, the handler could reissue the “+++” and attempt the command again, etc. The responses may be application-specific enough to not have standard response handlers, though.

I am building a C library for ARM7 based Mcu witch implements API structure in 3 modes: Local AT command, Remote AT command and Data Transfer, all using API structure.

If you have some C skills you wont find any problem in changing the code to use on linux or windows.

I am not an very experienced programmer so the code is vy simple, and it is not finished yet.

email-me if you’d like: felipelav at gmail