Need Help with Xbee XBP24-B packet transmission
don007
Posts: 1
I have Xbee XBP24-B module and i am using it with Arduino Uno.i want to make a packet with following configuration. it is like a structure or 2D string array. now making this kind of message is not a problem. This is a 10 field message and i think Xbee only allows uint8_t type to be sent over the air using ZBTxRequest message. So is there any API or way to send a structure of string type over the air?
1 = string field (2)
2 = string field (4)
3 = string field (8 )
4 = string field (8 )
5 = string field (8 )
6 = string field (8 )
7 = string field (10)
8 = string field (10)
9 = string field (10)
10 = string field (10)
much appreciated!!!
1 = string field (2)
2 = string field (4)
3 = string field (8 )
4 = string field (8 )
5 = string field (8 )
6 = string field (8 )
7 = string field (10)
8 = string field (10)
9 = string field (10)
10 = string field (10)
much appreciated!!!
Comments
One way to do this, particularly if you have a structure already, is to define a union type where one variant is your packet and the other is a single string long enough to hold the entire packet. You then set up a loop that goes through the packet-sized string and transmits one byte at a time. Another scheme is to set up a pointer to a string, initialize it to the address of the first byte of your packet, then go through a loop transmitting one byte at a time from the address in the pointer and incrementing the pointer each byte.