obex-maven-plugin

Overview

The obex-maven-plugin is maven2 plugin to install j2me MIDlet application on OBEX Bluetooth enabled phone via OBEX Object Push.

The obex-maven-plugin will send JAR file to the phone. Once transferred your phone will ask you to install the application.

This plugin work on Windows, Mac OS X and Linux. See BlueCove for supported Bluetooth stacks and OS.

For command line tool that do the same see bluecove-obex-install.

Usage

Simple example pom.xml

<project>
    ...
    <build>
        <plugins>

            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>obex-maven-plugin</artifactId>
            </plugin>

        </plugins>
    </build>
</project>

You need to add Bluetooth connection settings as server in your $home/.m2/settings.xml

url is Bluetooth address of your device plus after colon ":" optional RFCOMM channel number for OBEX Object Push Service. If RFCOMM channel number omitted then plugin will find service before each transfer. It would be fasted if you run Service Search command mvn obex:search once and write down the number in settings.xml

For OBEX over TCP/IP use url tcpobex://host-name:port#

<settings>
    <servers>
        ....
        <server>
            <id>obex-device</id>
            <configuration>
                <alias>Sony Ericson test Device</alias>
                <url>0019639c4007:6</url>
            </configuration>
        </server>
        <server>
            <id>obex-device1</id>
            <configuration>
                <alias>Nokia test Device</alias>
                <url>00123755ae71:9</url>
            </configuration>
        </server>
        <server>
            <!-- The same as obex-device1 only allow to specify the BT stack used: bluesoleil, widcomm, winsock -->
            <id>obex-device2</id>
            <configuration>
                <alias>Nokia test Device</alias>
                <url>00123755ae71:9</url>
                <!-- see -Dbluecove.stack=widcomm -->
                <stack>widcomm</stack>
            </configuration>
        </server>
        <server>
            <id>obex-device4</id>
            <configuration>
                <alias>obexftpd</alias>
                <url>tcpobex://linux1:650</url>
            </configuration>
        </server>
    </servers>

    <profiles>
        ....
    </profiles>
</settings>

Running Service Search and Device Discovery commands

# Find OBEX Object Push on default cell phone
mvn obex:search

# Find all Bluetooth devices that support OBEX Object Push
mvn obex:discovery

Running Deploy command

# Install on default cell phone
mvn obex:deploy

# Install on cell phone #1 in settings.xml
mvn obex:deploy -Dobex.c=1
# or
mvn obex:d1

# Install on cell phone #3 in settings.xml
mvn obex:deploy -Dobex.c=3
# or
mvn obex:d3

# Install on default device, device #1 and device#2 in settings.xml
mvn obex:deploy -Dobex.c=,1,2

Deploy more files, example pom.xml

<project>
    ...
    <build>
        <plugins>

            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>obex-maven-plugin</artifactId>
                <configuration>
                    <files>
                        <file>midlet.jad</file>
                        <file>other-stuff.png</file>
                    </files>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>