[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] Relationship between components



On Mon, 12 Feb 2001, Gordon McNutt wrote:

> > > bt.o _is_ the Bluetooth protocol stack.  It enables other user space
> > > programs to connect through it to talk to other devices.
> >
> > Is there any documentation available that describes how I talk to bt.o
> > without the aid of btd?  I know I can work out what's going on from reading
> > btd's source, I was just wondering if there was an easier way...
> 
> I've attached a start on a minimal app to setup bluetooth so that another app
> can open /dev/ttyBT* and use it like a char driver. It doesn't setup scan
> inquiry or initiate a connection, but it's a head start.

Hmm.  I've had a quick scan - what would be the practicality of developing a
library which implemented the setup, inquiry, and connection functions.

What I'm hoping to do with BlueTooth is to develop a program which will talk
to multiple other BT devices, quite possibly not over TCP/IP.  I'd like to
avoid running external programs, just for neatness' sake.

Do you think it's practical to try developing a library to take the place of
btd, and possibly moving portions of the stack out of kernel space?  At a
guess, I'd say that L2CAP would probably be best left in the kernel, but
surely the layers above don't need kernel features?

This would also help in porting to other platforms - less code to shoehorn
into new systems.

> > Except that, AFAIK, ppp.o provides a network port which you can route and
> > play with, whereas bt.o does not, and it wouldn't be recomended anyway
> > because TCP/IP over BT is only one (and not nearly the best) way of using
> > BT's abilities...
> >
> > Hence my current dilemma - talking to bt.o... <g>
> 
> An app can use /dev/ttyBT* like a char driver or a tty once it's setup over the
> physical connection to the hardware. This is what btd does before spawning pppd
> and telling it to use /dev/ttBT0. Each of the minor numbers will correspond to
> a different RFCOMM channel.

Ah, that's a help.  So if I execute btd with appropriate commands to make
several connections, I can then talk on /dev/ttyBT{0..n} (for n < 7, at
least on my install) via ordinary everyday serial functions.

A useful start.


-- 
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer
mjp16@xxxxxxx.au

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com