Difference between revisions of "Java Mobile Orbiter"

From LinuxMCE
Jump to: navigation, search
m
 
(38 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category: Hardware]]
+
{{versioninfo|810Status=PnP, manual setup of screen size|810UpdatedDate=12th May 2010|810UpdatedBy=sambuca}}
 
[[Category: Phones]]
 
[[Category: Phones]]
 
[[Category: Orbiters]]
 
[[Category: Orbiters]]
  
[[Image:N73-Javamo.jpg|right]]
+
[[Image:N73-Javamo.jpg|thumb|200px|JavaMO on the Nokia N73]]
 +
[[Image:Javamo p1 ui1.jpg|thumb|200px|UI1 with touchscreen on the P1]]
 +
[[Image:Javamo-e65-ui1.jpg|thumb|200px|UI1 on the Nokia E65]]
  
 
= Introduction =
 
= Introduction =
The JavaMO is a lightweight [[Mobile_Orbiter]] client. It receives rendered pictures from the [[Bluetooth_Dongle]] [[Orbiter]] and sends keystrokes back. The protocol used over Bluetooth is [[BD_-_Bidirectional_command_processor|BD]].
+
The JavaMO is a lightweight [[Mobile_Orbiter|Mobile Orbiter]] client. It receives rendered pictures from the [[Bluetooth_Dongle|Bluetooth dongle]] [[Orbiter]] and sends keystrokes and pointer events back. The protocol used over Bluetooth is [[BD_-_Bidirectional_command_processor|BD]].
  
JavaMO is under active development. An alpha version can be found on the charonmedia svn tree.
+
JavaMO has full support for local/in-house use when connected to a MD , but has limited support for out-of-house mode, when it connects via the Internet. For instance, because of a limitation of Java, it cannot intercept phone calls from LMCE like the Symbian orbiter can.
  
= Installation =
+
JavaMO is included in 810.
For most phones you need the jad and the jar file. Copy both to the phone and select the jad from the file or application manager.
+
  
= Classes =
+
= 810 Installation =
The JavaMO consists of multiple java classes:
+
 
* BDCommand
+
When your phone is detected, LMCE will ask what type of phone it is. Select "Generic Java phone". The JavaMO should be transferred to your phone, and you have to accept it on the phone when asked about receiving files.
* BDCommandProcessor
+
If this fails, you need to download the application from the website mentioned above.
* JavaMO
+
 
* SerializeClass
+
== Screen Size, UI Variant ==
* BTServer
+
There is no automatic screen size detection of the phone yet, so you also need to perform these steps to get the best setup for your phone.
 +
Go to the Orbiter in the pluto-admin web interface (select Orbiters in the Wizard on the left)
 +
Adapt the PK_UI, PK_Size and resolution values to match your phones display. If you have no touchscreen on the phone stick with symbian for PK_UI, otherwise choose the normal variant.
 +
 
 +
= Phone Specifics =
 +
== Compatible Phones ==
 +
To check if your phone is compatible, you might want look in the [http://devices.j2mepolish.org/interactivedb/searchdevices.faces device list of J2MEPolish]. Just click on the JSR-082 bluetooth capability and click search.
 +
 
 +
== Keys ==
 +
The JavaMO detectes the phone model and uses key mappings defined for that model. This maps available keys on the phone to the keys LMCE expects.
 +
 
 +
You can hide the orbiter by holding the end call key, this will take you to the JavaMO menu. Handy if you want to view the log or exit the application.
 +
 
 +
== Custom key mappings ==
 +
=== Sony Ericsson ===
 +
'''Phone key      - LMCE key'''
 +
Volume down    - End call
 +
Volume up      - Phone pencil
 +
Joystick select - Enter
 +
 
 +
=== Nokia E61 ===
 +
The Nokia E61 has a full keyboard. To select the numbers you have to '''hold''' down the blue function key, and press the number together with it.
  
 
= See also =
 
= See also =
[[Mobile_Orbiter]]
+
[[Mobile_Orbiter|Mobile Orbiter]]
[[LinuxMCE_Orbiter_Symbian_Programmer%27s_Guide]]
+
 
 +
[[LinuxMCE_Orbiter_Symbian_Programmer%27s_Guide|LinuxMCE Orbiter Symbian Programmer's Guide]]
 +
 
 +
[http://forum.linuxmce.org/index.php?topic=2893 Forum thread re JavaMO]
 +
 
 +
= 710 Installation =
 +
== Phone ==
 +
For most phones you need the jad and the jar file. Copy both to the phone and select the jad from the file or application manager.
 +
== Core/MD ==
 +
You have to exchange the libBDCommon.so with the provided one on all 0710 cores or MD's with a Bluetooth_Dongle. Download the replacement libBDCommon.so from http://vt100.at/javamo/ . In /usr/pluto/lib rename libBDCommon.so to libBDCommon.so.old, then copy the new version you downloaded into this directory and reboot.
 +
 
 +
== LMCE 710 Plug and Play detection ==
 +
When LMCE asks you for the type of phone select "Symbian S60". The application push will fail. Thats ok. Just answer no to the question if LMCE should resend it.
 +
 
 +
== Screen Size, UI Variant ==
 +
Go to the Orbiter in the pluto-admin web interface (select Orbiters in the Wizard on the left)
 +
Adapt the PK_UI, PK_Size and resolution values to match your phones display. If you have no touchscreen on the phone stick with symbian for PK_UI, otherwise choose the normal variant.
 +
 
 +
= JavaMO development guide =
 +
 
 +
Haris initial alpha version can be found on http://vt100.at/javamo/. A beta version can be found at [http://hob.dyndns.org/javamo sambucas site].
 +
 
 +
== Preparations ==
 +
=== Checkout ===
 +
Checkout the source from the svn tree:
 +
<pre>
 +
svn co http://svn.linuxmce.org/svn/people/hari/javamo/
 +
cd javamo
 +
</pre>
 +
 
 +
=== Installing Java ===
 +
First we install the Java SDK. I used version 6 update 6. Download it from the sun download center: http://java.sun.com/javase/downloads/index.jsp
 +
<pre>
 +
chmod +x ./jdk-6u6-linux-i586.bin
 +
./jdk-6u6-linux-i586.bin
 +
</pre>
 +
That gives us the directory "jdk1.6.0_06".
 +
 
 +
Now install the wireless toolkit version 2.5.2: http://java.sun.com/products/sjwtoolkit/download.html
 +
<pre>
 +
./sun_java_wireless_toolkit-2_5_2-linux.bin
 +
</pre>
 +
Specify the _full_ path to the "jdk1.6.0_06/bin" directory (this example assumes javamo was checked out to "/home/hari/src/javamo"):
 +
<pre>
 +
Enter a path to the Java 2 SDK: /home/hari/src/javamo/jdk1.6.0_06/bin
 +
</pre>
 +
After the installation you should have the following subdirectories in the javamo directory:
 +
* jdk1.6.0_06
 +
* WTK2.5.2
 +
 
 +
== Building the application ==
 +
just run "make":
 +
<pre>
 +
make
 +
</pre>
 +
You will find the "JavaMO.jad" and "JavaMO.jar" file in the "output" directory if the compile succeeds.
 +
== Install the application on the phone ==
 +
That strongly depends on the type of phone and sometimes your mobile carrier.
 +
 
 +
===Nokia Symbian devices===
 +
For Nokia Symbian Series with a memory card you can use the "install" target in the "Makefile". Just adapt the Bluetooth address of the phone in the "Makefile" and run:
 +
<pre>
 +
make install
 +
</pre>
 +
Then go to the file browser on the phone, switch to the memory card and select the "JavaMO.jad" file. Make sure you have enabled the installation of unsigned applications in the application manager.
 +
 
 +
===Developers in the United States===
 +
If you are developing in the United States, the process to install JavaMO on your phone depends heavily on the operator you have for your mobile.
 +
 
 +
If you have a Sprint or Nextel phone, you can install the MIDlet over the air using [http://developer.sprint.com/site/global/develop/upload_your_content/p_upload_your_content.jsp | Sprint ADP's OTA content uploader]. 
 +
 
 +
On a Nextel phone, you can also install it using a cable downloading the [https://developer.motorola.com/docstools/idenjal/| iDEN Java Application Loader]. There are mechanisms for cable-loading an application onto a variety of Sprint CDMA phones, but these vary greatly in their reliability/ease of access.
 +
 
 +
If you are working with a Verizon phone, you will need to have a BREW developer license and toolkit to load an application onto the device. Chances are you don't have this.
 +
 
 +
If you are working with an AT&T or T-Mobile GSM phone, you should put the JAD and JAR files in a publicly accessible web server, then point the web browser of your phone to the JAD file -- it should begin the download automatically.
  
= Links =
+
== Building the documentation ==
http://forum.linuxmce.org/index.php?topic=2893
+
<pre>
 +
make javadoc
 +
</pre>
 +
Direct your browser to the file "doc/index.html"
 +
== On device debugging with a Nokia N and E series phone and Linux ==
 +
To get the output from the application running on the phone on a computer screen, do the following:
 +
* Register with Nokia and get the Symbian SDK
 +
* Transfer the "EcmtAgent_MIDP.SIS" application on the phone and run it, uses bluetooth per default
 +
* Go to system - application manager on the phone and install the "RedMIDlet.jar" (shows "not installed")
 +
* Go to the application folder and run the "Sdt.out.redir" application
 +
* do a "sdptool browse" on your notebook with a supported bluetooth dongle (hci device must be up) to find out the rfcomm port. You should see something like this:
 +
<pre>
 +
Service Name: EcmtAgent
 +
Service Description: Bluetooth bearer for EcmtAgent
 +
Service RecHandle: 0x10043
 +
Service Class ID List:
 +
  "Serial Port" (0x1101)
 +
Protocol Descriptor List:
 +
  "L2CAP" (0x0100)
 +
    PSM: 3
 +
  "RFCOMM" (0x0003)
 +
    Channel: 3
 +
Language Base Attr List:
 +
  code_ISO639: 0x656e
 +
  encoding:    0x6a
 +
  base_offset: 0x100
 +
</pre>
 +
* run a command like the following after substitution of the Bluetooth address and the rfcomm channel:
 +
<pre>
 +
while $a; do rfcomm release /dev/rfcomm0 ; rfcomm bind /dev/rfcomm0 00:17:C4:C3:36:24 3 ; cat /dev/rfcomm0 ; done
 +
</pre>
 +
Example output (process list, system info and the javamo console output):
 +
<pre>
 +
0x000004380x10204578CPU 191985135 1 DRIVES C 46539776 23182336;D 5629952 5627904;E 2030960640 30343168;Z 20971520 0; RAM 5627904 46137344 20971520 APPLICATIONS JavaMO 692 -1 -1 -1 2654876;EiksrvBackdrop 97 -1 -1 -1 106830749;Menü 163 -1 -1 -1 5559722;EcmtAgent 601 -1 -1 -1 1263824;Standby-Modus 150 -1 -1 -1 16982482;Sdt.out_redir 648 -1 -1 -1 243194;Telefon 146 -1 -1 -1 11353271;Protokoll 394 -1 -1 -1 1592987;Kontakte 330 -1 -1 -1 1927398;MultimediaList 161 -1 -1 -1 510864;SysAp 122 -1 -1 -1 4535278; 77 -1 -1 -1 9002;Anykey 148 -1 -1 -1 290618;blinkingled 240 -1 -1 -1 266265;Player 266 -1 -1 -1 331695;Autolock 238 -1 -1 -1 103759;Galerie 310 -1 -1 -1 1241149;screensaver 154 -1 -1 -1 16530914;akncapserver 97 -1 -1 -1 106830749;btnotifappserver 108 -1 -1 -1 684661;Securitynotifierappserver 106 -1 -1 -1 311309;VolumePopup 266 -1 -1 -1 331695;MPlayerInfoPopup 266 -1 -1 -1 331695;VolumePopup 150 -1 -1 -1 16982482;CTSecDlgAppServer 110 -1 -1 -1 63354;SyncMLNotifierAppServer 114 -1 -1 -1 59234;cconndlgappserver 116 -1 -1 -1 62744;locnotifierappserver 104 -1 -1 -1 63476;0x000000780x1020456c
 +
ReceiveLong: long result: 102
 +
Got BD_CP_SHOW_IMAGE
 +
</pre>
 +
== Java J2ME simulator with real bluetooth hardware access over bluez ==
 +
* Get the mpowerplayer SDK: http://mpowerplayer.com/?cat=6
 +
* Install it
 +
* Either buy (http://www.avetana-gmbh.de) or compile (http://sourceforge.net/projects/avetanabt/) the avetana bluetooth stack
 +
* put the "AvetanaBluetooth.jar" file in the mpp-sdk top level directory
 +
* adapt the path to the mpp installation in the javamo Makefile
 +
* run "make bluezsim" to run JavaMO in the sim with bluez access over JSR082

Latest revision as of 16:58, 12 May 2010

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 PnP, manual setup of screen size 12th May 2010 sambuca
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information
JavaMO on the Nokia N73
UI1 with touchscreen on the P1
UI1 on the Nokia E65

Introduction

The JavaMO is a lightweight Mobile Orbiter client. It receives rendered pictures from the Bluetooth dongle Orbiter and sends keystrokes and pointer events back. The protocol used over Bluetooth is BD.

JavaMO has full support for local/in-house use when connected to a MD , but has limited support for out-of-house mode, when it connects via the Internet. For instance, because of a limitation of Java, it cannot intercept phone calls from LMCE like the Symbian orbiter can.

JavaMO is included in 810.

810 Installation

When your phone is detected, LMCE will ask what type of phone it is. Select "Generic Java phone". The JavaMO should be transferred to your phone, and you have to accept it on the phone when asked about receiving files. If this fails, you need to download the application from the website mentioned above.

Screen Size, UI Variant

There is no automatic screen size detection of the phone yet, so you also need to perform these steps to get the best setup for your phone. Go to the Orbiter in the pluto-admin web interface (select Orbiters in the Wizard on the left) Adapt the PK_UI, PK_Size and resolution values to match your phones display. If you have no touchscreen on the phone stick with symbian for PK_UI, otherwise choose the normal variant.

Phone Specifics

Compatible Phones

To check if your phone is compatible, you might want look in the device list of J2MEPolish. Just click on the JSR-082 bluetooth capability and click search.

Keys

The JavaMO detectes the phone model and uses key mappings defined for that model. This maps available keys on the phone to the keys LMCE expects.

You can hide the orbiter by holding the end call key, this will take you to the JavaMO menu. Handy if you want to view the log or exit the application.

Custom key mappings

Sony Ericsson

Phone key       - LMCE key
Volume down     - End call
Volume up       - Phone pencil
Joystick select - Enter

Nokia E61

The Nokia E61 has a full keyboard. To select the numbers you have to hold down the blue function key, and press the number together with it.

See also

Mobile Orbiter

LinuxMCE Orbiter Symbian Programmer's Guide

Forum thread re JavaMO

710 Installation

Phone

For most phones you need the jad and the jar file. Copy both to the phone and select the jad from the file or application manager.

Core/MD

You have to exchange the libBDCommon.so with the provided one on all 0710 cores or MD's with a Bluetooth_Dongle. Download the replacement libBDCommon.so from http://vt100.at/javamo/ . In /usr/pluto/lib rename libBDCommon.so to libBDCommon.so.old, then copy the new version you downloaded into this directory and reboot.

LMCE 710 Plug and Play detection

When LMCE asks you for the type of phone select "Symbian S60". The application push will fail. Thats ok. Just answer no to the question if LMCE should resend it.

Screen Size, UI Variant

Go to the Orbiter in the pluto-admin web interface (select Orbiters in the Wizard on the left) Adapt the PK_UI, PK_Size and resolution values to match your phones display. If you have no touchscreen on the phone stick with symbian for PK_UI, otherwise choose the normal variant.

JavaMO development guide

Haris initial alpha version can be found on http://vt100.at/javamo/. A beta version can be found at sambucas site.

Preparations

Checkout

Checkout the source from the svn tree:

svn co http://svn.linuxmce.org/svn/people/hari/javamo/
cd javamo

Installing Java

First we install the Java SDK. I used version 6 update 6. Download it from the sun download center: http://java.sun.com/javase/downloads/index.jsp

chmod +x ./jdk-6u6-linux-i586.bin
./jdk-6u6-linux-i586.bin

That gives us the directory "jdk1.6.0_06".

Now install the wireless toolkit version 2.5.2: http://java.sun.com/products/sjwtoolkit/download.html

./sun_java_wireless_toolkit-2_5_2-linux.bin

Specify the _full_ path to the "jdk1.6.0_06/bin" directory (this example assumes javamo was checked out to "/home/hari/src/javamo"):

Enter a path to the Java 2 SDK: /home/hari/src/javamo/jdk1.6.0_06/bin

After the installation you should have the following subdirectories in the javamo directory:

  • jdk1.6.0_06
  • WTK2.5.2

Building the application

just run "make":

make

You will find the "JavaMO.jad" and "JavaMO.jar" file in the "output" directory if the compile succeeds.

Install the application on the phone

That strongly depends on the type of phone and sometimes your mobile carrier.

Nokia Symbian devices

For Nokia Symbian Series with a memory card you can use the "install" target in the "Makefile". Just adapt the Bluetooth address of the phone in the "Makefile" and run:

make install

Then go to the file browser on the phone, switch to the memory card and select the "JavaMO.jad" file. Make sure you have enabled the installation of unsigned applications in the application manager.

Developers in the United States

If you are developing in the United States, the process to install JavaMO on your phone depends heavily on the operator you have for your mobile.

If you have a Sprint or Nextel phone, you can install the MIDlet over the air using | Sprint ADP's OTA content uploader.

On a Nextel phone, you can also install it using a cable downloading the iDEN Java Application Loader. There are mechanisms for cable-loading an application onto a variety of Sprint CDMA phones, but these vary greatly in their reliability/ease of access.

If you are working with a Verizon phone, you will need to have a BREW developer license and toolkit to load an application onto the device. Chances are you don't have this.

If you are working with an AT&T or T-Mobile GSM phone, you should put the JAD and JAR files in a publicly accessible web server, then point the web browser of your phone to the JAD file -- it should begin the download automatically.

Building the documentation

make javadoc

Direct your browser to the file "doc/index.html"

On device debugging with a Nokia N and E series phone and Linux

To get the output from the application running on the phone on a computer screen, do the following:

  • Register with Nokia and get the Symbian SDK
  • Transfer the "EcmtAgent_MIDP.SIS" application on the phone and run it, uses bluetooth per default
  • Go to system - application manager on the phone and install the "RedMIDlet.jar" (shows "not installed")
  • Go to the application folder and run the "Sdt.out.redir" application
  • do a "sdptool browse" on your notebook with a supported bluetooth dongle (hci device must be up) to find out the rfcomm port. You should see something like this:
Service Name: EcmtAgent
Service Description: Bluetooth bearer for EcmtAgent
Service RecHandle: 0x10043
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 3
  "RFCOMM" (0x0003)
    Channel: 3
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
  • run a command like the following after substitution of the Bluetooth address and the rfcomm channel:
while $a; do rfcomm release /dev/rfcomm0 ; rfcomm bind /dev/rfcomm0 00:17:C4:C3:36:24 3 ; cat /dev/rfcomm0 ; done

Example output (process list, system info and the javamo console output):

0x000004380x10204578CPU 191985135 1 DRIVES C 46539776 23182336;D 5629952 5627904;E 2030960640 30343168;Z 20971520 0; RAM 5627904 46137344 20971520 APPLICATIONS JavaMO 692 -1 -1 -1 2654876;EiksrvBackdrop 97 -1 -1 -1 106830749;Menü 163 -1 -1 -1 5559722;EcmtAgent 601 -1 -1 -1 1263824;Standby-Modus 150 -1 -1 -1 16982482;Sdt.out_redir 648 -1 -1 -1 243194;Telefon 146 -1 -1 -1 11353271;Protokoll 394 -1 -1 -1 1592987;Kontakte 330 -1 -1 -1 1927398;MultimediaList 161 -1 -1 -1 510864;SysAp 122 -1 -1 -1 4535278; 77 -1 -1 -1 9002;Anykey 148 -1 -1 -1 290618;blinkingled 240 -1 -1 -1 266265;Player 266 -1 -1 -1 331695;Autolock 238 -1 -1 -1 103759;Galerie 310 -1 -1 -1 1241149;screensaver 154 -1 -1 -1 16530914;akncapserver 97 -1 -1 -1 106830749;btnotifappserver 108 -1 -1 -1 684661;Securitynotifierappserver 106 -1 -1 -1 311309;VolumePopup 266 -1 -1 -1 331695;MPlayerInfoPopup 266 -1 -1 -1 331695;VolumePopup 150 -1 -1 -1 16982482;CTSecDlgAppServer 110 -1 -1 -1 63354;SyncMLNotifierAppServer 114 -1 -1 -1 59234;cconndlgappserver 116 -1 -1 -1 62744;locnotifierappserver 104 -1 -1 -1 63476;0x000000780x1020456c
ReceiveLong: long result: 102
Got BD_CP_SHOW_IMAGE

Java J2ME simulator with real bluetooth hardware access over bluez