Re: Bluetooth stack for FreeBSD (Netgraph)

From: Maksim Yevmenkin <m_evmenkin_at_yahoo.com>
Date: Tue, 9 Sep 2003 10:02:03 -0700 (PDT)
Tobias,

> > After a very long delay (sorry!) I'm pleased to announce that I'm still
> around
> > and new a snapshot can be downloaded from
> 
> kickass! I will try it out later today

:)

> > Here is the list of things I'm planing to do next:
> > 
> > o Prepare patches for FreeBSD source tree
> > o Write SDP server. For now continue use Linux BlueZ SDP server. 
> > o Add support for SCO (voice/video) links
> > o Better rc scripts
> > o Think about non-Netgraph portable version
> 
> I could take over the rc-script part if it'd be any help for you and
> if it's not too urgent.

tag! you are it :) 

i just would like to take this opportunity and share with you some ideas
for rc scripts. what i would like to see is the system that allows you
to configure common parameters for all Bluetooth devices. then for each
individual device user should be able to provide overrides (if needed).
the examples of such overrides are:

- switch role for incoming connections (write_node_role_switch HCI command)
- default page_scan_mode and page_scan_period_mode
- default packet mask (write_node_packet_mask HCI command)
- visible device name (change_local_name HCI command)
- should device be visible (write_scan_enable HCI command)
- etc.

the problem here is how to identify the device. the name of the device (i.e.
ubt0, btccc0) might not be good enough. what it tells you is device type
and instance. one idea is to use device BD_ADDR, i.e. the script will do
something like

# 1 - common part (for all devices)
reset
read_bd_addr (and save it)
read_local_supported_features
read_buffer_size

# 2- use device BD_ADDR to select set of user overrides and apply them here
# ...

# 3- common part (for all devices)
initialize

i hope that make sense. i also think all Bluetooth start/stop scritps should
be executed by devd(8), usdb(8) etc. when device is attached/detached. 

the other part of the rc scripts is the Bluetooth services, i.e. things like
sdpd, rfcomm_pppd, OBEX server etc. one problem here is that user might want
to run server application on specific BD_ADDR and in this case device with
that BD_ADDR must be attached (otherwise server application would not start).
perhaps the list of servers should be attached to BD_ADDR as well? Note that
it is fine to run server on ANY address. the server would start even if there
is no device attached.

thanks,
max

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Received on Tue Sep 09 2003 - 08:02:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC