| Access Server: User's and Developer's Guide | ||
|---|---|---|
| <<< Previous | Next >>> | |
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:
Automatic device discovery and content push over a Bluetooth connection
18 simultaneous Bluetooth connections with one Access Server
Upload speed even up to 75KB/sec with Bluetooth 2.0+EDR
Content can be stored locally - with external memory even up to 2GB space
Wide networking support: Bluetooth, Ethernet, Wi-Fi, GPRS and EDGE
Secure remote connections over a Virtual Private Networking
Remote file system support
Lots of filtering options, such as device type, or distance from access server
Extensive logging
Interaction between several Access Servers
Content time stamping
This chapter describes some possible Obexsender use cases.
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).
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.
This chapter contains instructions from the most basic Obexsender configuration to the more advanced use cases.
The easiest and fastest way to configure Obexsender is through the WWW setup. To do this, your Access Server must be connected to the same network as your PC or, alternatively, you can also use a direct Ethernet cross cable or a Bluetooth PAN connection (see Section 3.2.5 for instructions on how to enable PAN). By default, Access Server uses DHCP, so if you connect it to your LAN, it must support DHCP as well.
Once you have successfully connected Access Server, start the "WRAPFinder" software. WRAPFinder lists all the Access servers in the same network as your PC.
If Access Server does not show immediately, you may need to push the Rescan button a couple of times.
Next, select the correct Access Server and press the Connect button in the WRAPFinder user interface. An internet browser window opens with the Access Server IP address in the address bar.
Click the Setup link. A login screen is opened. Enter a correct user name and password.
After a successful login, you get access to the WWW setup main page.
Note: At this point, you should check your access server software version. Obexsender works only with software version 2.2.0 and newer. At the bottom of the screen you should see a line saying:
Access Server, S/N 0511170051 (wrap-2-2) - Copyright © Bluegiga Technologies Inc, 2001-2006If the version is older than "wrap-2-2", you must first update your Access Server. Latest software releases and instructions can be found from www.bluegiga.com/techforum/
If you have software version 2.2.0 in your Access server, you need to update Obexsender to the latest version. It offers many new, useful and necessary features that include:
Retry delay, scan delay and reply delay
Dump delay
Possibility to save incoming files, i.e. remote requests
Watchdog support
Regexp and Unicode support
Other minor bug fixes and improvements
The rest of the manual concentrates on the latest Obexsender, but it also covers all the features offered by previous Obexsender. The main menu of latest (at the time of writing) Obexsender is shown in Figure 5-7
By default, the Obexsender application is enabled, so as a first task you should of course enable it if. This is quite simply done from the following page in the WWW setup (Figure 5-8): Access Server - Setup - Applications - Default bootup applications
Obexsender is enabled after a reboot. However, if you have not completed rest of the configuration, do not reboot Access Server yet.
Note: For Obexsender to start at all, you must define at least one file to be pushed to remote devices. You can do this in:
Access Server - Setup - Applications - ObexSender settings - Edit configuration file
For more information, see Section 5.3.6, chapter "Send these files in this order".
configuration. As a first step please go the to the WWW setup page in Setup → Applications → Obexsender settings.
On this page (Figure 5-7) you can configure the basic Obexsender settings. See Section B.4.3 for default values and detailed descriptions of the settings.
You can easily upload new content (files) for Obexsender by selecting Upload a new file in the Obexsender main menu. 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/Bike.jpg uploaded" .
At the moment, you can only upload to /usr/local/obexsender directory using WWW setup. If you would like to upload to another directory, you must use secure FTP to accomplish that. (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 that for secure FTP file transmissions.
Specifying the content (files) to be sent by ObexSender is done by editing the /etc/obexsender.conf file. The file also contains all configurable ObexSender settings (the settings covered earlier and some advanced settings).
In this section, we will only go through the settings that can not be configured using the WWW interface.
Note: Lines beginning with the hash character "#" are comments and ObexSender will ignore them.
Advanced Configuration Directives
Specify which iWRAPs are used for sending/inquiry. By default all basebands in this Access Server are in use.
Syntax: baseband <ip> <port> [password]
Example:
baseband 127.0.0.1 10101 |
Don't send to these Bluetooth devices. The default setting ignore 00:07:80: is recommended. It disables sending files to other Bluegiga Access Servers.
Syntax: ignore <bdaddr-prefix>
Example:
ignore 00:07:80: |
Always send to these devices when found (60s interval). Other timeout settings are ignored with these devices.
Syntax: tester <bdaddr>
Example:
tester 00:07:80:80:00:bf |
Obexserver's directory (for remote requests). This is the directory which ObexSender searches for remote requests. It should match the directory configured for Obexserver (/tmp/obex/ in default configuration.
Syntax: scandir <directory>
Example:
scandir /tmp/obex |
Specify full pathname(s) of file(s) to be sent, possibly at given time. If there are no files specified, ObexSender does not do inquiry. The files specified are sent in listed order.
Syntax: file <filename> [timestamp]
Example for sending tp1.gif first, then tp2.gif:
file /usr/local/obexsender/tp1.gif
file /usr/local/obexsender/tp2.gif
|
Timestamp can be specified as Weekday (Mon/Tue/Wed/Thu/Fri/Sat/Sun), Starthour-Endhour or WeekdayStarthour-Endhour:
Example for sending image.jpg on Fridays, image2.jpg every day between 8am and 2pm and image3 only on Tuesdays between 8am and 2pm:
file /usr/local/obexsender/image1.jpg Fri
file /usr/local/obexsender/image2.jpg 8-14
file /usr/local/obexsender/image2.jpg Tue8-14
|
This feature allows you to request specific content from ObexSender. Basic operation is that you send a file with needed information to Access Server and you will receive a corresponding file in return.
The keyword specified is matched for "<content of file from user> + <bd-ad-dr-es-ss>". Keyword is extended regular expression (regex) and case-non-sensitive.
Syntax: reply <keyword> <filename>
Example for replying with pic.gif if a GIF image is sent to Access Server (in fact this matches for the string "GIF" found in the image headers; you could use "VCF" for vCards, "JFIF" for JPEG images and so on):
reply GIF /usr/local/obexsender/pic.gif |
Example for replying only to a certain device (its Bluetooth address is already known), ignoring file content (pic.gif is sent back after device sends anything to Access Server):
reply 00:07:80:80:00:bf /usr/local/obexsender/pic.gif |
This setting applies if you're using REPLY-feature of ObexSender and you send a file to Access Server to receive specific content. Now, if the file you sent doesn't match to ObexSender configuration, the file will be deleted if this settings is set to "Yes". Otherwise the file is saved. Matching files are always deleted. Disable this if you have some other program doing ObjP/FTP. By default, this is enabled.
Syntax: delnomatch Yes|No
Example of disabling the functionality:
delnomatch No |
Determines the verbosity level of ObexSender logging. The Level can be from 0 to 4, defined by the count of lines with uncommented term verbose. Level 0 means that there will be minimal logging and level 4 that there will be maximum amount of logging.
| Warning |
Full verbose logging (4) should be used only for debugging purposes, since it creates a lot of logs and the flash memory can be filled rather quickly. |
Syntax: verbose
Example of setting maximum level of ObexSender logging:
verbose verbose verbose verbose |
You can choose to save the information about already served devices, so you can form a so-called "block list". If this block list is saved in flash memory, it will be preserved even if Access Server is rebooted. This basically ensures that remote devices don't receive the same content even if Access Server is rebooted.
Syntax: dumpfile <filename>
Example of dumpfile in default location:
dumpfile /usr/local/obexsender/ignore.dump |
Determines how often (in seconds) a dump file is updated. "0" disables this feature. We recommend to use a rather big value, for example 15min = 900s.
| Warning |
Using a small value here can physically burn the flash memory over time. |
Syntax: dumpdelay <seconds>
Example of setting dumpdelay with recommended value:
dumpdelay 900 |
This settings tells ObexSender to broadcast already served devices to other ObexSenders (specified using unicast IP address, broadcast IP address or interface name).
Syntax: broadcast <unicast-ip>|<broadcast-ip>|<interface>
Example of broadcasting to all ObexSender in the same network with the default interface (nap):
broadcast nap |
By default, all files sent over Object Push to Access Server are stored to the /tmp/obex folder and deleted after they have been processed. It is however possible to save the files to another directory. The following procedure shows how to automatically copy these files to an example folder /usr/local/remote_request. (NOTE: you must first create this folder!):
Create a copier script /usr/local/bin/copier. You can do it for example in the WWW setup -> Advanced settings -> Edit other configuration files and typing here /usr/local/bin/copier. Put the following script into the file:
#!/bin/sh
# to be called from obexsender: --fork /usr/local/bin/copier
# This directory must exist:
SAVEDIR="/usr/local/remote_request"
/bin/cp "$1" "${SAVEDIR}/$3`/bin/date "+%s"`-`echo $1 | /usr/bin/cut -f 2 -d-`"
|
Make the script executable by giving command chmod a+rx /usr/local/bin/copier at the command line interface.
Edit /etc/bluetooth.conf and append to the end of the file the following line (below the line is in two parts, combine these in the configuration file):
SET BLUETOOTH LISTEN 3 "/usr/sbin/obexserver --bdaddr $b --prefix $b-$P-
--fork /usr/local/bin/copier" 110
|
Save changes and restart Access Server.
Now all incoming files are copied to the /usr/local/remote_request directory. The format of the files is bdaddr-btserverport-timestamp-filename.ext.
Obexsender creates log about its operation to a specified log file. By default, no log file is specified, so you should do this first with instructions provided in Section 5.3.4.
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. See some example logging in the figure below:
If you want to see even more details about how Obexsender is performing, you can increase the verbosity level of logging. See Section 5.3.6, chapter "Be verbose (0-4)". Full verbose logging is usually needed in problem solving only.
Troubleshooting:
Obexsender is not sending anything?
Make sure you have at least one content file specified in the configuration file (obexsender.conf). See Section 5.3.6, topic "Send these files in this order".
Also check that Obexsender is activated, see Section 5.3.3.
Mobiles receive files only to 10-20 meters. Isn' t Obexsender supposed to work up to 100 meters?
Almost all mobile phones are so-called "Class 2" devices, which means that their maximum range is about 10 meters. In good conditions they can achieve even 30 meters.
If you know there are "Class 1" devices (range up to 100 meters) in the area, you can check the RSSI value you have set, which determines the operational range of Obexsender. See section Section 5.3.4.
Known issues:
If you enter a non-existing path in "Log file name" configuration, Obexsender will fail to start.
If you have entered a password for the iWRAP (Bluetooth) interface and the same password is not set in the Obexsender configuration, Obexsender will fail to start.
If several log files are defined in obexsender.conf, Obexsender will fail to start
| <<< Previous | Home | Next >>> |
| SPP-over-IP | Software Development Kit |