i’m wondering if i can do away with building the API frame on a mcu and just send the data to the Xbee and let the Xbee wrap that data into an API frame to forward on to a coordinator?
i.e.:
0. from a mcu that is getting and calculating some data
then send that data to an end device Xbee,
have that Xbee wrap the data into an API frame
then from there to a coordinator
or, as i’m currently doing, the mcu program wraps the data in an API frame to Tx to the Xbee
not sure if i explained my question correctly but can’t think of a clearer way to ask it just now
If operating in transparent mode would be acceptable, you could just send the data directly. There’s no way to get the XBee to compose the API frame though. Even if there were, you’d still need to tell the XBee what API frame you wanted to send, and where to, and where the data starts and ends - in other words, it’d be no simpler than the existing API mechanism.
if i understand correctly your msg, you’re saying via the xbee config to set it at what API type, and whether to send packets as broadcast or point2point, yes? manually or remotely speaking.
as i experiment with say, various sensors on xbee AD pins without a pic, the xbee per its conf wraps that data in API packets and sends it on its way to a coordinator and i parse the needed info using an xbee python lib. the neat lil xbee does most all the work.
so i got to thinking that some of my pics might be able to get its data values to a connected xbee without wrapping it in a API frame.
it isn’t much of an issue as the pics and code does this just fine - once i learned the API format - thanks to your cookbook.
though, just from an academic and flexibility issue for some of my various hobby projects, i thought why not see how much i can off-load on the xbee and lessen the code for the pic’s on some projects.
i can finally wrap my head around the “transparent” and “API” mode differences with regards to my MCU’s and Tx’ing data to a connected Xbee.
i guess there is a place for each but “transparent” mode saves considerable time on MCU code versus i can just buffer or not buffer sensor data and TX it to the Xbee.
the receiving xbee is going to wrap that data in an API frame anyways when sending it to a coordinator anyways, right?
a little more overhead on the MCU for an API frame versus “data” in the usart stream.
all this time and going back and forth with the digi manuals and i think i’m beginning to wrap my head around this.
Bottom line: the XBee will not compose your API frames for you. When it makes RF transmissions they do happen in frames, but not of the API kind.
Having said that, sample data as produced by IS, and things like modem status frames, are API frames that are produced by the XBee. However, for transmitting data that you’ve generated externally the only options are transparent mode or creating your own API frames.
Your idea of off-loading as much work as possible onto the XBee is an excellent one. Unfortunately in this case it’s not going to work