Managing Profiles

Profiles are handled by the btsrv application. The /etc/affix/services configuration file has to be set up first. Each line of it specifies a service. The four fields of a line are the following:

Profile

profile the service is based on. Currently Serial Port, Dialup Networking, OBEX Object Push, OBEX File Transfer and LAN Access profiles are supported.

Flags

The only flags available are socket and tty. They are mutually exclusive and determine whether the command executed to handle an incoming request will use the RFCOMM socket interface or the virtual port device (/dev/btyXX) created for the connection.

Command

The command executed for an incoming request. The command will be started in a system shell (/bin/sh) with its standard input and output being the new socket or virtual port file depending on Flags. The standard error will be redirected to /dev/null if btsrv is running as a daemon otherwise it will remain the same as standard error of btsrv.

After creating the services file the btsdp program has to be started to create and handle the local SDP database. Finally the btsrv program has to be started which will listen for incoming requests and spawn the appropriate command to service the request.

Both btsdp and btsrv use the syslog to log messages with LOG_DAEMON facility if running as daemons. Otherwise they will use the standard error.