List Info

Thread: Re: cvs commit: src/usr.bin/bluetooth/rfcomm_sppd rfcomm_sppd.1 rfcomm_sppd.c




Re: cvs commit: src/usr.bin/bluetooth/rfcomm_sppd rfcomm_sppd.1 rfcomm_sppd.c
user name
2008-05-15 08:57:59
[moving to freebsd-bluetooth]

On 5/15/08, Daniel O'Connor <doconnorgsoft.com.au> wrote:
> On Thu, 15 May 2008, Maksim Yevmenkin wrote:
>  >   Modified files:
>  >     usr.bin/bluetooth/rfcomm_sppd rfcomm_sppd.1
rfcomm_sppd.c
>  >   Log:
>  >   Make -t <tty> optional in server mode. If
not specified use
>  > stdin/stdout. Document this. Do not require
channel number in server
>  > mode. If not specified - bind to ''wildcard''
channel zero. Real
>  > channel number will be obtained automatically and
registered with
>  > local sdpd(8). While I'm here fix serial port
service registration.
>
> How hard would it be to have a '-t auto' and have it
print out the pty
>  it just allocated? It would make it much easier for
scripts to work if
>  that was possible.
>
>  (Maybe just call openpty()?)

not hard at all. however, how would rfcomm_sppd(1) print tty
name if,
say, it was asked to run in background? perhaps it would be
better to
teach rfcomm_sppd(1) to work with nmdm(4)?

thanks,
max
_______________________________________________
freebsd-bluetoothfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-blu
etooth
To unsubscribe, send any mail to
"freebsd-bluetooth-unsubscribefreebsd.org"

Re: cvs commit: src/usr.bin/bluetooth/rfcomm_sppd rfcomm_sppd.1 rfcomm_sppd.c
country flaguser name
China
2008-05-18 05:21:52
On Thu, 15 May 2008, Maksim Yevmenkin wrote: > > How hard would it be to have a '-t auto' and have it print out the > > pty it just allocated? It would make it much easier for scripts to > > work if that was possible. > > > > (Maybe just call openpty()?) > > not hard at all. however, how would rfcomm_sppd(1) print tty name if, > say, it was asked to run in background? perhaps it would be better to > teach rfcomm_sppd(1) to work with nmdm(4)? I don't think nmdm would make a difference in this respect. I am thinking of an operating mode where a script or daemon runs when a device associates and sets up channels the user has configured. So the script runs rfcomm_sppd and groks the output to find what PTY has been allocated and creates a symlink to a human understandable name (eg /dev/gps0 or whatever) I have attached a patch which uses openpty() and seems to work fine (tested quickly against my BT GPS unit & phone). If the patch doesn't make it you can get it from http://www.gsoft.com.au/~doconnor/rfcomm_sppd-pty.diff On a related note I find I have to 'kill -9' rfcomm_sppd sometimes if I have connected to the PTY and then disconnected, eg.. > sudo ./rfcomm_sppd -t -a GPS rfcomm_sppd[43683]: Starting on /dev/ttyp5 > sudo cu -l /dev/ttyp5 ~. ^Crfcomm_sppd[43683]: Signal 2 received. Total 1 signals received > sudo cu -l /dev/ttyp5 rfcomm_sppd[43683]: Completed on /dev/ttyp5 I can't reproduce it very often though - I have had it happen quite a bit in the past though. PS please CC me as I am not on the list. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )