digidotcom / xbee_ansic_library

A collection of portable ANSI C code for communicating with Digi International's XBee wireless radio modules in API mode.
204 stars 116 forks source link

Wating for remote incoming packet function #23

Closed theanhhoang closed 4 years ago

theanhhoang commented 4 years ago

Hi, I am testing the library with sample code. However, I have not found any sample code that waiting for a remote incoming packet and then do the callback. Is any function in the library that does this job? Thanks!

tomlogic commented 4 years ago

Take a look at the "transparent client" sample (samples/common/transparent_client.c), available on both POSIX and Win32 platforms. It shows two different methods, one for when ATAO=0 (using a frame handler for all 0x90 frames) and one for ATAO != 0 that uses an endpoint/cluster table for dispatching messages based on the destination endpoint and cluster.