[asterisk-dev] Sync problem
Kevin P. Fleming
kpfleming at digium.com
Wed Aug 4 07:10:21 CDT 2010
On 08/04/2010 02:17 AM, Muhammad Ali wrote:
> The point where i think things are going wrong is, when am not
> transmitting anything (not executing *write)* i get 0xFF on the receive
> side, even when the channels are in "*clear*" state. Can this be
> controller/ disabled ( i am assuming buffer policy set to "*when full*"
> might help but want to make sure)?
No. This is TDM, there is *always* data being transferred, and if the
transmit buffer empties, default data will be sent instead. This is not
a packet network, it's a continuous stream of data.
> Secondly, when i try the *ioctl *for ZT_IOMUX for ZT_IOMUX_READ it
> always returns as soon as its called which means it does not wait for my
> write to happen (maybe this is because of 0xFF always on the line).
>
> So how can i sense if there is actual write on the wire and not 0xFF so
> i may wait for actual data to start before depleting my buffers.
You can't; you will have to use some sort of framing indication in the
data stream itself for you receiver to be able to locate packets of data
and extract them from the stream.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming at digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list