Chapter 5. Obexsender

Obexsender is one of the built-in applications in Access Server. It is dedicated to Bluetooth proximity marketing, content distribution, location based services, and much more. Access Server plus Obexsender provide the user with a ready platform to start content distribution including all the necessary Bluetooth functions from discovering the devices to transmitting the content. The user needs to only focus on what, when, and to whom to send the content - rest is taken care of by Access Server and Obexsender.

The figure below illustrates a simplified Obexsender network:

Figure 5-1. Simplified Obexsender network

5.1. Key Features

5.2. Use Cases

This chapter describes some possible ObexSender use cases.

5.2.1. Content Push

This is the standard functionality in ObexSender. In content push mode, ObexSender is scanning for devices and pushing it to clients who belong to the target group (not opted out by filtering).

Figure 5-2. ObexSender Use Case: Content Push

5.2.2. Content Pull

ObexSender can also be configured into a content pull mode. In this mode, the transaction is initiated by the user. The user can send any file to the server or alternatively a file containing some specific string such as "MP3" or "NOKIA N73". The server parses the received file and as a response pushes a corresponding file to the user if such exists.

Figure 5-3. ObexSender Use Case: Content Pull

5.3. Configuration

This chapter contains basic ObexSender configuration instructions. The easiest and fastest way to configure ObexSender is through the WWW setup. For instructions about finding Access Server's IP address and using the WWW setup interface, see Section 2.2.

For details and default values of ObexSender configuration, please study the help texts in WWW Setup interface (also in Section B.4.2) and the ObexSender configuration file, which can be viewed and edited at SetupApplicationsObexSender settingsEdit configuration file.

Note: ObexSender will exit at startup by default, as it is not configured to do anything (there are no active send or reply rules in the default configuration).

5.3.1. Uploading Files

ObexSender needs content (files) to be send for users. These can easily be uploaded by navigating to SetupApplicationsObexSender settingsUpload a new file. All you need to do is browse for the file you want to upload and click Upload. You will see a confirmation note, for example "File /usr/local/obexsender/files/pic.jpg uploaded" .

At the moment, you can only upload to /usr/local/obexsender/files directory from ObexSender main menu. If you would like to upload to another directory, you can do it from SetupAdvanced settingsBrowse all files menu.

You can also use secure FTP to transfer files (normal FTP is disabled by default in Access Server for security reasons). For example WinSCP, available from http://www.winscp.org, is a good application for secure FTP file transmissions.

5.3.2. Configuring Content Rules

Specifying the content (files) to be sent by ObexSender is done by adding send and reply directives to ObexSender configuration file /etc/obexsender.conf. The file is editable at SetupApplicationsObexSender settingsEdit configuration file and also contains usage examples of both directives.

5.3.3. How to Store Files Sent to Access Server

By default, all files sent over Object Push to Access Server are stored to the /tmp/obex directory and deleted after they have been processed. It is however possible to save a copy of the file to another directory before it is deleted. This is configured by adding the --fork with cp command to the Optional parameters for server setting in SetupiWRAP SettingsBluetooth profiles Object push profile settings menu, following the example of parameters below:


--bdaddr $b --prefix $b-$P- --fork '/bin/cp $$t /tmp/$$p$$d-$$T'
          

Now, after reboot, all incoming files are copied to /tmp directory. The format of the files is bdaddr-btserverport-timestamp-filename.ext.

5.4. Monitoring ObexSender

ObexSender logs its operation using syslog or to a specified log file (configurable via WWW setup).

When you choose View log in the ObexSender menu, you can only see the summary of ObexSender action, i.e how many successes, failures and retries have occurred. When you select the date or Total in the summary view, you will see more details. You will see to which Bluetooth address the content was sent and if the transmission was a failure or success, or if transmission will be retried later.

5.5. Bluetooth Device Database

ObexSender uses special Bluetooth device database for recognizing Bluetooth devices. If you find devices that are not identified properly, please send output of command SetupApplicationsObexSender settingsInquiry and calculate hash to together with detailed information, or at least the exact model of device identified with its Bluetooth address and friendly name, of devices found with that command, but improperly identified by ObexSender. Bluegiga Technologies will then provide you with the latest Bluetooth device database.