Re: HEADS UP: IFF_NEEDSGIANT consumers to be disabled, removed

From: Ed Schouten <ed_at_80386.nl>
Date: Tue, 17 Feb 2009 12:56:51 +0100
Hello Michael,

* Michael Butler <imb_at_protected-networks.net> wrote:
> I have NETGRAPH_BLUETOOTH et al defined in my kernel which automagically
> creates /dev/ubt0. With the appropriate entries in
> /etc/bluetooth/[hosts|hcsecd.conf], I simply do ..
> 
> imb_at_toshi:/home/imb> less bin/gps-connect.sh
> #!/bin/sh
> /usr/bin/rfcomm_sppd -b -a QstarzGPS -t /dev/ttyp9
> 
>  .. to bring it out to a device where roadnav or gspdrive can read it.
> 
> Should I be doing something else in this script now?

Well, this is not related to IFF_NEEDSGIANT and everything's fine, but
there is something else I don't like about this approach in general (the
way rfcomm_sppd works), namely that you `hardcode' a PTY name on the
command line. There is never a guarantee ttyp9 is available for use,
because another user can use it to log in with SSH, for example.

Can you try this patch?

	http://80386.nl/pub/rfcomm_sppd.diff

This changes the -t switch to take no argument and let the pseudo-
terminal be allocated with posix_openpt(). Unfortunately I don't know
how practical this is for rfcomm_sppd. So let me get this straight: when
you use rfcomm_sppd -t, the application itself will not give any output
and will close immediately (because it is run in the background).  Maybe
we could change it to just printf() the pseudo-terminal name, so you can
do something like this:

	TTYNAME="`rfcomm_sppd -b -a QstarzGPS -t`"
	# Use $TTYNAME here

Any opinions on the subject? (Other people as well?)

-- 
 Ed Schouten <ed_at_80386.nl>
 WWW: http://80386.nl/

Received on Tue Feb 17 2009 - 10:56:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC