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

[bluetooth-dev] new release




Hi All,
Finally we got a new release for you. See attached readme 
for details.

http://www.developer.axis.com/download/bluetooth/bluetooth_20001031.tgz

Known problem : 
* If using Ericsson modules with firmware P9A or earlier it has
been confirmed that there are occasionally garbage data on the
uart (especially when running at higher speeds). This causes HCI
to loose track of the data packets and consequently the stack
malfunctions. Firmware P9B worked best for us.

Unfortunately we haven't had a lot of time to test the code on a
standard linux machine, therefore there might still be some bugs 
left when running it in kernel mode. Especially when it comes to
detecting erroneous data on the uart. To avoid any unwanted 'side
effects' on your computer please use the userstack.

Perhaps CRS:s extra layer on top of HCI could solve this, is there 
anyone that has tried adding this to the stack successfully ?

As usual, please send any bugreports or comments to 
bluetooth-dev@xxxxxxx.

brgds
AXIS Bluetooth Team




Bluetooth Driver for Linux Kernel v2.0 and v2.2
-----------------------------------------------

These files are work in progress. For more information on Bluetooth 
on Linux see http://developer.axis.com where you can find the newest 
versions of the software.

========================================================================

What has happened lately
------------------------

Oct 30 2000

Finally, a new release!

There has been quite a few changes and it is hard to include everything
in this text. However, we will try to make a quick introduction of the 
new functionality.


*** Kernel Stack ***

- We now support the use of several tty:s (currently 7, ttyBT0-ttyBT6) and 
  the control of the stack has been moved to a dedicated tty called ttyBTC 
  (minor 7)
- Improved interface between user mode tty and kernel.
- More ioctls for HCI commands
- Improved SDP which now uses a user mode database for queries.
- Added functionality for choosing different HW (init stuff)
- Added scheduling of cmd queueing for USB
- Lots of bug fixes

*** Comment ***

    As of today we have no client functionality in SDP due to changes
    in the design. However, as server Serial/LAN/DialUP profile is 
    supported. This will be fixed soon.

*** User Mode Applications ***

- New SDP server database application using XML files. 
  See /apps/sdp_server/README for details.
- Command line history
- Now pppd works together with the user mode stack (using pty:s)
- Using syslog for most debug (see /var/log/messages)


Please let us know if there are any unclear issues or errors in this README. 
Comments are appreciated and if there are someone that feels an urge of 
making it more complete please contact us or send us a text fragment and we 
will happily include it !

There are still patches left to include but due to heavy workload we have not
had time to add them all. However, in the future if a patch is sent to us
reasonably fast (within 2 weeks) after a new release we should be able to 
merge it in the stack.

Finally, we would also like to thank all contributors on the stack for 
comments and patches etc. Once we get our open CVS up and running this stack 
should be very useful for any bluetooth developer !!

Keep up the good work !

Best regards 
Bluetooth Team,
Axis Communications

========================================================================

How to build and install the AXIS Bluetooth Stack
-------------------------------------------------

# Unpack the archive:

tar xvfz <name of archive>

# Create the bluetooth stack module and all applications (both for use
  with the kernel version of the stack and the user mode version):

cd bluetooth
source init_env
make

# Install the applications in /usr/local/bin and the SDP configuration
  file in /etc (must be done as root):

make install

# If the BT device nodes have not been created previously then do (as root):

make devs

# Insert the module into the kernel (must be done as root):

insmod src/bt.o

# To get debug messages in kernel start another window and issue:

tail -f /var/log/messages 

(or whatever file is set in /etc/syslog.conf)

========================================================================

BTD APPLICATION 
---------------

     Both short and long options may be used whatever suits best.

     syntax:  ./btd [options]

     options: 

              -u, --physdev <uart device>
              sets which uart device that will be used by the stack
              default: ttyS2
	      
              -b, --btdev <bluetooth device>
              sets which bluetooth device that will be used from application
              default: ttyBT0
	      
              -s, --speed <speed>
              sets uart speed
              9600, 19200, 38400, 57600, 115200, 230400, 460800
              default: 115200 baud
                 
              "-r server", --server
	      sets application role to server
	      "-r client", --client
              sets application role to client)
              default: server
              
              -i, --hwinit <HW initialisation> 
              hw specific initialization
              ericsson, digi (DigiAnswer PC card), csr, usb, none
              default: ericsson

              -m, --cmdmode
              enters command line mode
              default: skip command line mode

              -n, --local-name
              prefix used for the local bluetooth device name
              default: nothing

              -d, --local <local ip>
              Sets local ipadress in pppd options

              -D, --remote <remote ip>
              Sets remote ipaddress in pppd options
              
              -R, --reset
              reset bluetooth hardware before use
              default: no reset

              -e, --modem
              Use modem emulation (used when emulate modem in windows dialup. 
              Can also be done from command line mode. 
	      default: on

	      -S, --unixsock use local unix socket instead of phys port
	      Used together with hci emulation to test stack locally
	      (user mode stack only)
	      
	      -T, --tcpsock <ipaddr:port> use tcp socket instead of 
	      phys port. Used together with hci emulation to test 
	      stack over any TCP/IP based network
	      Server listens on <:port>, client tries to connect to 
	      <ipaddr:port>. (user mode stack only)

	      
     e.g if using ericsson module at 460800 baud and acting as server
     ./btd --speed 460800 --hwinit ericsson

     if using HW that req no init and acting client with command line interface
     ./btd -r client --hwinit none

     if using non-default devices
     ./btd --physdev /dev/ttyS2 --btdev /dev/ttyBT3 [options...]

     if using the stack in user mode over a local UNIX socket.
     Do the following in separate windows
     Server: ./btd --cmdmode --unixsock
     Client: ./btd --cmdmode --unixsock --client

     if using the stack in user mode over a TCP socket.
     Do the following on separate computers connected to the 
     same network
     Server: ./btd --cmdmode --tcpsock <:port>
     Client: ./btd --cmdmode --tcpsocket <ipaddr:port> --client


What do the menu options do?
----------------------------

con <xx:xx:xx:xx:xx:xx> <line> <srv channel> <profile>
 
 Connect to BT device with BD_ADDR <xx:xx:xx:xx:xx:xx> on line 
 <line> with RFCOMM server channel <srv channel> <profile (not used)>

 Profile is one of:
  0 - Serial profile
  1 - Lan profile
  
 /* FIXME -- currently there are no client functionality in SDP due to 
    adoptions to the new SDP server using XML. Thus we do not able to 
    connect profiles as client. */
  
disc <line>

  Disconnect the connection with line <line>, 
  
send <nbr bytes> <nbr repeats>
 
 Just send chunks of data. <nbr bytes> are sent <nbr repeats> 
 times. Data is sent using the RFCOMM protocol layer

me <1/0>
 
  Turn modem emulation on/off. Modem emulation is used on the 
  server side to fool a windows client that it is talking to a 
  modem. The emulation answers OK to all AT*\r\n sequences. 
  When it receives ATD*\r\n it quits and starts ppp instead.

setbd <xx:xx:xx:xx:xx:xx>
 
  Set the BT device BD_ADDR to <xx:xx:xx:xx:xx:xx>
  (Currently Ericsson specific)

readbd
 
  Get the BT device BD_ADDR
  
reset

  Reset the BT device.

ppp
 
  Quit btd and start ppp to the peer instead.
  
quit

  Just quit.

========================================================================

How to setup a session between two units
----------------------------------------

Server side:

1. btd --reset --speed 115200 -i ericsson

Client side:

1. btd --reset --speed 115200 - i ericsson -r client
2. Connect to the other unit by doing
   connect <bd address> 0

========================================================================

How to use the stack in user mode instead of in the kernel
----------------------------------------------------------

1) Build the applications according to the instructions above.

1) Start the SDP server as 'sdp_user /etc/sdp.xml &'.

3) Then run btduser (as root) with the same options as with the standard
   btd application (see above).

========================================================================

How to setup a session without any bluetooth hardware
-----------------------------------------------------

To make the stack work without any hardware HCI_EMULATION must be switched
on in the file btconfig.h and the stack must be recompiled.
You will see a note in the debug messages when starting the stack if hci
emulation really is used or not.

********
* Note *
********

The HCI emulation as of today simply converts some hci commands to the 
corresponding events and simply forwards all acl/sco data.
If you get messages from the stack that something fails when initiating the
stack it is because those hci commands are not supported in the hci emulator.
Anyone that wants are welcome to improve it and send us a patch. For example,
there could be network delays/ packet losses included and different kinds of
hardware can be simulated.


There are three ways depending on how you want to test the stack.
The first one works both when running the stack in kernel and when running
it in user mode. The other two (2 and 3 below) works only in user mode.

See above for details on command options

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1) Using a serial cable (null modem)

Connect 2 Linux PC with a null modem cable, and start the btd application
as server as one side and btd as client on the other side.

Server side:
1. start btd with the option
   btd --physdev <phys device> --speed <speed> --cmdmode 
   --local <local ip> --remote <remote ip>

Client side:
1. start btd with the option
   btd --physdev <phys device> --speed <speed> --client --hwinit none

2. When the menu shows and server also are setup and initialized type:
   connect 11:22:33:44:55:66 <line 0> <srv ch> <profile> 
   (BD address is ignored)
   If connection was successful you will now receive a handle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2) Using a local unix socket on one computer

Server side:
1. btd --cmdmode --hwinit none

Client side:
1. btd --client --hwinit none

2. When the menu shows and server also are setup and initialized type:
   connect 11:22:33:44:55:66 <line 0> <srv ch> <profile> 
   (BD address is ignored)
   If connection was successful you will now receive a handle

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

3) Using a network tcp socket between two computers

     if using the stack in user mode over a TCP socket.
     Do the following on separate computers connected to a network

Server side:
1. btd --tcpsock <:port>
 
Client side:
1. Client: ./btd --tcpsocket <ipaddr:port> --client

2. When the menu shows and server also are setup and initialized type:
   connect 11:22:33:44:55:66 <line 0> <srv ch> <profile> 
   (BD address is ignored)

========================================================================

It does not work, what am I doing wrong? 
----------------------------------------

FIXME --  add FAQ 

For debug when running in kernel look in /var/log/messages, /var/log/debug or
whatever file is specified in /etc/syslog.conf

If you think you have found a bug please switch on all debug in btdebug.c 
(or switch on the define BTD_GLUE_DEBUG in btd.c) and send the logs to
bluetooth-dev@xxxxxxx.

========================================================================