Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2001 13:33:45 +0100
From:      Gary Jennejohn <garyj@jennejohn.org>
To:        Leif Neland <leifn@neland.dk>, <freebsd-isdn@freebsd.org>
Subject:   Re: bidirectional /dev/i4btel0 ?
Message-ID:  <200111231519.fANFJep38061@peedub.muc.de>
In-Reply-To: <20011123124125.V38153-100000@arnold.neland.dk>
References:  <20011123124125.V38153-100000@arnold.neland.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 23 November 2001 13:04, Leif Neland wrote:
> Is it somehow possible to both be sending and recieving from
> /dev/i4btel0?
>
> I would like to send voice to the caller, while also recieving
> data, eventually decoding with dtmfdecode to make a
> voice-response system.
>
> dd of=${DEVICE} if=${LIBDIR}/leifans.al bs=2k  >/tmp/out.log
> 2>&1 & sleep 2
> dd if=${DEVICE} of=/tmp/answers.al bs=2k count=100
> >/tmp/in.log 2>&1
>
>
> Without "sleep" the last dd reports "device busy"
> With "sleep" the first dd reports "device busy"
>

Reception is taking longer than 2 seconds, so the first dd fails 
because of that.

> Would it be possible for a single program to open the device
> for reading and writing simultaneously?
>

Right now the tel device is exclusive open, so only one process 
at a time can have it open. However, I don't see anything which 
would indicate that opening it RW would fail.

However, the way that i4btelread and i4btelwrite are implemented 
it doesn't look like simultaneous reads and writes are possible. 
The kernel puts the process to sleep while waiting either to 
receive or send the data, so the process can only be doing one 
of the two at any given time.

Without rewriting the i4btel driver there's no way to do what 
you want, AFAICT.

-- 
Gary Jennejohn garyj@jennejohn.org gj@freebsd.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111231519.fANFJep38061>