# packet data control

**URL:** <https://forums.digi.com/t/packet-data-control/19201>\
**Category:** XBee - 802.15.4\
**Tags:** serial, packet, xbee\
**Created:** [February 21, 2018, 3:57pm UTC](https://forums.digi.com/t/packet-data-control/19201 "2018-02-21T15:57:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tglaser92](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tglaser92](https://forums.digi.com/u/tglaser92)\
**Post date:** [February 21, 2018, 3:57pm UTC](https://forums.digi.com/t/packet-data-control/19201/1 "2018-02-21T15:57:57Z")

</div>

Hello,

I’m using S2C Xbee (802.14.5) to send sensor data gathered by a microprocessor to my computer (as serial data). The microprocessor and Xbee are communicating thru UART at a baud rate of 115200. The base station is an xbee on a ftdi-to-serial converter in API mode. Everything is working as I hoped, but to speed up the sensors sampling rate the Xbee needs to put multiple sensor readings into one packet…

Is there a command (like .println for example) that will cut off the packet and send it? I need to control how many readings and which types sensor readings are going into a packet, so that the data can be parsed on the other side correctly.

For example:

Current packet structure:  
(packet 1)  
I.51,.32,.45e  
S2,2,2,2e  
S2,2,2,2e  
S2,2  
(packet 2)  
,2,2e

Desired packet structure  
(packet 1)  
I.51,.32,.45e  
(packet 2)  
S2,2,2,2e  
S2,2,2,2e  
S2,2,2,2e

Where s & I are start bytes denoting the type of data and e is the stop byte.

Thanks in advance for your time and help!

Best,  
Twain
