User Manual

Table Of Contents
Chapter 5. Obexsender
5.3.7. 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 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!):
1. 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-‘"
2. Make the script executable by giving command chmod a+rx /usr/local/bin/copier at the
command line interface.
3. 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
4. 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.
5.4. Monitoring Obexsender
Obexsender creates log about its operation to a specified log file. By default, no log file is speci-
fied, 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:
57