Logo

» About

» Downloads

» GitHub

» GitLab

Mottek Blog

» Mottek

» Archive

2024 2023 2022 2020 2019 2018 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004 2003

RSS

Blunt

Blunt is a Bluetooth protocol stack for NewtonOS 2.1 devices.

  • Version: 1.0
  • Author: Eckhart Köppen
  • License: LGPL 2.0
  • Download via SourceForge

Overview

Blunt implements a basic Bluetooth protocol stack for NewtonOS 2.1 devices. It provides two services: Connecting to a serial Bluetooth port and object exchange. The serial port functionaltity can be used to connect via PPP to the Internet by using a cell phone or desktop computer. The object exchange functionality allows sending of data from any Newton application and receiving of items from the Inbox application. Serial connectivity is integrated into the Newton Internet Enabler via the NIE Nitro & Blunt Support module, object exchange is part of Neo.

Hardware Compatibility

Blunt has been tested on US and German MP2100 MessagePads. It requires a Bluetooth PCMCIA card with the following characteristics: PCMCIA Type II card (no CardBus card), UART interface, HCI protocol support. This should cover those cards which are supported via a UART driver under Linux or BSD. It has been tested with the following hardware:

  • PICO Bluetooth PCMCIA card
  • Taiyo Yuden internal UART modules
  • AmbiCom Air2Net BT2000CF CompactFlash card (new model with purple antenna). ‘‘Note: It seems there are two revisions of this card, and only revision A is working at the moment.’’
  • AmbiCom Air2Net BT2000E CompactFlash card (older model, black antenna)

Not working is the following hardware:

  • Belkin Bluetooth PC Card (a CardBus card)
  • 3com Wireless PC Card (incompatible serial chip)
  • IBM Bluetooth PC Card (incompatible serial chip)

Might work at some point:

  • Conceptronic Bluetooth PCMCIA card (requires special serial chip initialization or firmware reprogramming)
  • Xircom Bluetooth PCMCIA card (requires special serial chip initialization or firmware reprogramming)

Installation

Blunt consists of two core packages: a device specific protocol package (BluntMP2x00US.pkg, BluntMP2100D.pkg or BlunteMate.pkg) and Bluetooth Setup.pkg for the setup application. In addition to that, you need to install the NIE Nitro & Blunt Support module and Neo to use Blunt for PPP or OBEX. There is no restriction as to where the packages are installed (internal or memory cards).

Setup

The first step in using Blunt after installing the packages is to launch the Bluetooth Setup application and set the device name, the card location and the communication speed. The device name is the name under which the Newton visible during discovery. The card location is usually one of the PC card slots. The card can be tested by tapping “Test” which will reset the card and wait for a predefined response. If the test is successful, the next steps are discovery and pairing. Note that testing does not work for the Air2Net cards, but it is also not required.

Discovery

To be able to connect and send items to a peer device, the peer devices need to be discovered. This is done by tapping the “Discover” button in the overview of the Bluetooth Setup application. After discovery, new devices should be visible in the overview.

Pairing

Some services require further authentication from the peer device. To authenticate, tapping the “Pair” action menu item opens a slip where a PIN code can be entered. The same PIN code has to be entered on the peer device in the pairing process. Pairing can be initiated by the peer device after the pairing slip has been opened on the Newton and “Accept” has been tapped. Alternatively, pairing can also be initiated from the Newton by tapping “Initiate” instead. This is in many cases preferred because devices might perform other actions which Blunt does not handle, causing the pairing process to fail.

Service Discovery

For each device, the available services have to be queried separately. Getting the services on a remote device is an option under the action menu for each discovered device. Note that some devices require pairing before discovery if authentication is turned on. In these cases, perform pairing before getting the services is mandatory.

The services which are currently used by Blunt are serial port services and OBEX services. Serial port services can be advertised by a device under various titles. The detailed view of each device allows setting of a specific serial port service to be used as the default port for PPP connections (Modem Port). The same is true for OBEX connections, here, usually the OBEX Push service should be chosen as the OBEX Port.

Setup Walkthrough

This is an example setup process:

  • Install the Blunt core package, the Bluetooth Setup package, Neo and the NIE Nitro & Blunt Support Module
  • Insert the Bluetooth card
  • Open the Bluetooth Setup application
  • Set the card parameters in the preferences view
  • Tap “Test” to verify that the card is recognized
  • Make sure that the other device is discoverable and does not require authentication
  • Close the preferences view, and tap “Discover” in the overview of the Bluetooth Setup application
  • Switch to the detailed view for each discovered device
  • Chose “Pair” from the action menu. Enter a PIN code and tap “Initate”
  • If necessary, initiate pairing from the peer device
  • Chose “Get Services” from the action menu
  • Check which services are used for PPP and OBEX connections
  • If wanted, authentication can now be turned on for the other device

After these steps, the discovered devices are ready for further use. The setup steps have to be repeated only to discover new devices and establish pairing

Usage

The basic use cases are sending data, receiving data and establishing internet connections.

Sending Data

Data can be sent from any application to a previously discovered peer device. Sending and receiving data requires Neo to be installed. Sending via Bluetooth is a new option in the route slip when chosing OBEX as the transfer. The route slip requires that a peer device is selected to which the data will be sent. Otherwise, sending is similar to any other transport.

Receiving Data

Receiving items is initiated from the Inbox application on the Newton. Bluetooth reception is a new option under the “Receive” menu. Tapping “BtOBEX” starts the receiving process. When the Newton is looking for a sender, it is also discoverable. Items will be saved in the Inbox along with their original MIME type, allowing them to be put away using IC/VC.

Internet Connections

After installing the NIE Nitro & Blunt Support package, new Internet Setups can be created which use Bluetooth as the connection method. The basic setup is similar to any other serial setup, i.e. the configuration method should be set to PPP and a login script might be necessary to dial when using a cell phone as a modem. The Nitro page describes the process in more detail.

Changes

  • Version 1.0: Removed the timeout for discovery
  • Version 0.7.7: Bug fix when accepting pairing
  • Version 0.7.6: Bug fix for stalled connections
  • Version 0.7.5: Bug fixes for Bluetooth Setup and crashes with SimpleMail (needs NIE Nitro & Blunt Module version 0.2.3 or newer)
  • Version 0.7: Added driver for AmbiCom/Pretex Air2Net BT2000E cards
  • Version 0.6: Added support for SonyEricsson phones
  • Version 0.5: Added driver code for Air2Net BT2000 cards. Important: When upgrading from version 0.4, select a driver to be used in Bluetooth Setup!

Bugs and To Do List

  • There is a potential conflict with Syspatch
  • In certain circumstances, the Newton might restart during data transfer
  • The service discovery protocol implementation is incomplete
  • Busy communication ports require a reboot