api.lua is a tool for controling xbee RF modules XBee (S2) 9lua-5.4 is required. You need to have one XBee S2 cordinator and other XBee S2 device. getdataB getdataB.rc getdataC getdataC.rc are examples that are running for me. getdataX where X is A,B,C,... which is a label of my XBee hebe# setup # select: # getdataB # getdataB.rc # getdataC # getdataC.rc # att.lua /mnt/consoles/usb6 # api.lua /mnt/consoles/usb6 # api.lua -p /mnt/consoles/usb6 | dump.lua hebe# api.lua /mnt/consoles/usb6 > ATID 7E 00 04 08 01 49 44 69 * 7E 00 0D 88 01 49 44 00 00 00 00 00 00 00 00 01 E8 > dest 0013A200:40A74509 > ATID 7E 00 0F 17 03 00 13 A2 00 40 A7 45 09 FF FE 02 49 44 6F * 7E 00 17 97 03 00 13 A2 00 40 A7 45 09 3E 8D 49 44 00 00 00 00 00 00 00 00 01 22 > ATIS 7E 00 0F 17 04 00 13 A2 00 40 A7 45 09 FF FE 02 49 53 5F * 7E 00 17 97 04 00 13 A2 00 40 A7 45 09 3E 8D 49 53 00 01 00 10 01 00 00 02 22 DD > load mylib.lua > _ATIS 1682473127 3.141 0010 01 0000 0.643 > QUIT hebe# ">" at the beginning of line is a prompt. A command follows the prompt. and follows sent data in next line for example: 7E 00 04 08 01 49 44 69 which means 8 bytes sequence in space seperated "%02X" print format. "*" at the beginning of line is a response data from end device. By > dest 0013A200:40A74509 comand destination is changed to XBee with eMAC 0013A200:40A74509 Thus followed ATID command is to the XBee. "00 10 01 00 00 02 22" represents analog data from xbeeC. However the data format is not human readable. _ATIS in mylib.lua shows more useful and human readable form: 1682473127 3.141 0010 01 0000 0.643 1682473127: observed time in unix time. 3.141; voltage of Vcc 0010: digital mask (D4 is set to digital input) 01: analog mask (D0 is set to analog input) 0000: digital data (all digital input is LOW) 0.643: analog data at D0 (1.2*0.643V) > load mylib.lua load mylib.lua. The _ATIS is in mylib.lua. You can add more function to mylib.lua and add more ability to your XBee. NOTE: Executing setup command is limited on a single window. Otherwise you will see message such as: nusb/serial: getdev: '/dev/usb/ep6.0/data' device or object already in use nusb/serial: /dev/usb/ep6.2: openep: maxpkt: must configure before using NOTE: If you are not familiar to XBeee, xbee.txt might be a help.