Hi,<div><br></div><div>I am reading and writing to grouped zap channels using "<b>open("/dev/zap/channel")</b>" interface. The scenario is as depicted in the diagram below;</div><div><br></div><div>[asterisk box 1] ========E1=======[asterisk box 2]</div>
<div><br></div><div>block size at both the transmit and receive ends is 2039. Both sides have same grouping of channels.</div><div>Buffer policy : immediate</div><div><br></div><div>The problem i am having is, the transmitter <b>write</b> operation is not in sync with receiver <b>read</b> operation.</div>
<div>Meaning to say, when i write from "end 1" the receiver might already in process of read operation. so my transmitted data might reach the "end 2" when half or some part of the buffer has already been read.</div>
<div><br></div><div>So suppose i am sending 1000 bytes of data, over 15 channels grouped together, and my receiver starts getting data when 75 % buffer has been read, i am left with 25% buffer but that is unable to receive the whole 1000 bytes .</div>
<div><br></div><div>The point where i think things are going wrong is, when am not transmitting anything (not executing <b>write)</b> i get 0xFF on the receive side, even when the channels are in "<b>clear</b>" state. Can this be controller/ disabled ( i am assuming buffer policy set to "<b>when full</b>" might help but want to make sure)?</div>
<div><br></div><div>Secondly, when i try the <b>ioctl </b>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).</div>
<div><br></div><div>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.</div><div><br></div><div>BR.</div><div><br></div><div>-- <br>ALi...<br>
(علی)<br><a href="http://m-ali.deviantart.com">http://m-ali.deviantart.com</a><br><br>
</div>