Author Topic: Java/ J2ME mobile orbiter  (Read 119632 times)

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #165 on: June 19, 2008, 12:28:31 am »
This is great. Keep up the good work.
Have you though about touch screens and how to handle them?
yes, the infrastructure is in place. I just need to add some lines and somebody with a device to test.

Quote
If you want I have a compiled libBDCommon.so for AMD64 that I can provide you with so everyone that wish to evaluate javaMO can do it.
cool, please mail it to me

Quote
Will create a keyboard map with keycodes.jar to see what differs form ordinary phones.
good idea! Please also provide the device id.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #166 on: June 19, 2008, 08:58:37 am »
Hari.

This is what I have got from the P1i mobile so far.
Will try to create a wiki page with the information.
It look like the keyboard use normal ASCII codes except for special buttons.



KeyCodes.jar on Sony Ericsson P1i.

KeyCodes.jar report below row as phone model:
SonyEricssonP1i/R6G04



Sony Ericsson P1i

|-------------------|
|                   |
|                   |
|                   |
|                   |
|                   |
|                   |
|                   |
|  Display          |
|                   |
|                   |
|  Touchscreen      |
|                   |
|                   |
|                   |
|                   |
|                   |
|-------------------|

  Keyboard Layout   Key Functions
|---|---|---|---|---|
|   |   |   |   |   | | !/QW | 1ER | 2TY | 3UI | :?OP |
|---|---|---|---|---|
|---|---|---|---|---|
|   |   |   |   |   | | ()AS | 4DF | 5GH | 6JK | 'L Backspace |
|---|---|---|---|---|
|---|---|---|---|---|
|   |   |   |   |   | | +-,Z | 7XC | 8VB | 9NM | @ OK . Return |
|---|---|---|---|---|
|---|---|---|---|---|
|   |   |   |   |   | | Shift | LArrow * | 0 Spacebar | # RArrow | Alt |
|---|---|---|---|---|


This phone have a special keyboard where each key represent two key depending
if up push the left or rigth side of the button.
Keycodes are represented like XXX;YYY
where XXX represent leftside keystroke and yyy is right-side keystroke.


No shift or alt pressed
|---------|---------|---------|---------|---------|
| 113;119 | 101;114 | 116;121 | 117;105 | 111;112 |
|---------|---------|---------|---------|---------|
|---------|---------|---------|---------|---------|
|  97;115 | 100;102 | 103;104 | 106;107 | 108;-8  |
|---------|---------|---------|---------|---------|
|---------|---------|---------|---------|---------|
|  44;122 | 120;99  | 118;98  | 110;109 |  46;13  |
|---------|---------|---------|---------|---------|
| nomap   |    -3   |  32     | -4      | nomap   | This row do not have "left/right" buttons. Ordinary buttons.
|---------|---------|---------|---------|---------|



Shift  & key (Press Shift, release shift button, then key)
|---------|---------|---------|---------|---------|
|  81;87  |  69;82  |  84;89  |  85;73  |  79;80  |
|---------|---------|---------|---------|---------|
|---------|---------|---------|---------|---------|
|  65;83  |  68;70  |  71;72  |  74;75  |  76;-8  |
|---------|---------|---------|---------|---------|
|---------|---------|---------|---------|---------|
|  44;90  |  88;67  |  86;66  |  78;77  |  46;13  |
|---------|---------|---------|---------|---------|
| nomap   |    -3   |  32     | -4      | nomap   | This row do not have "left/right" buttons. Ordinary buttons.
|---------|---------|---------|---------|---------|


Alt & key (Press Alt, release alt button, then key)
|---------|---------|---------|---------|---------|
|  33;47  |  49;49| |  50;50  |  51;51  |  58;63  |
|---------|---------|---------|---------|---------|
|---------|---------|---------|---------|---------|
|  40;41  |  52;52  |  53;53  |  54;54  |  39;-8  |
|---------|---------|---------|---------|---------|
|---------|---------|---------|---------|---------|
|  43;45  |  55;55  |  56;56  |  57;57  |  64;-10 |
|---------|---------|---------|---------|---------|
| nomap   |    42   |  48     |   35    | nomap   | This row do not have "left/right" buttons. Ordinary buttons.
|---------|---------|---------|---------|---------|




special buttons.
Back button on left side of phone: -11
Scroll button on left side: Up=-1; Down=-2

Camera button on right side: -25
Email button on right side: Nomap



There seem to be a touch area activted on the screen when I run KeyCodes.jar
I don´t know if it is something that is implemented within keycodes or if it
is a phone feature.
KeyCodes app display on all parts of screen except in the menu areas.
So The "tap" functionality is inside keycodes app area somehow.
Don´t know how to explain it better since english is not my native language.
|-------------------|
| OS menus etc.     |
|-------------------|
| Keycodes.jar      |
|                   |
|                   |
|                   |
|                   |
|                   |
|-------------------|
|         |         |
|         |         |
|    -6   |   -7    |
|         |         |
|         |         |
|-------------------|
| OS menus etc.     |
|-------------------|

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #167 on: June 19, 2008, 09:00:02 am »
Hari.
I will happily test touch functionality.


Please PM me your email and I will send libBDCOmmon.so to you.

/niz23

sambuca

  • Guru
  • ****
  • Posts: 449
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #168 on: June 19, 2008, 10:06:24 am »
Hari, and others

I have also got the JavaMO built and installed. Again, thanks for the great work!

I tried this on a Sony Ericsson W580 and a K800i. As others have mentioned, there is some issues with key codes. I was able to navigate the orbiter menus using the numeric keys, but the 'Select' and 'Back' functions were missing (I tried all keys on the phone). So this kind of reduces it usefulness (for now)  ;) .
Both phones were the same wrt. keys, which is expected since they both are somewhat similar SE phones.

But I would like to make a humble suggestion:
Shouldn't key code mapping be a part of the device template?
This allows for easier addition of new phones (with potentially different key mappings). In this scenario, the key codes would be sent as raw data from the JavaMO to the bluetooth dongle device, which would do the translation using the loaded device configuration.
The JavaMO would be the same for all Java phones (at least in theory).
Maybe the correct device template could be automatically selected based on the MAC address of the phone.

I realise that this would require some changes to existing software, but in my mind it would be a much more flexible approach. I suppose the existing orbiter software would have to be changed to send the raw keycodes, and the bluetooth device extended to load configuration and do the conversion of key code to LMCE orbiter actions.

Please have in mind that this is only a suggestion based on my limited understanding of how it works. If it is not possible, or very hard to do, just forget this message  ;)

Best regards,
sambuca

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #169 on: June 19, 2008, 02:48:11 pm »
Hari.
I will happily test touch functionality.
i've done the basic routines but they are untested as I have no J2ME phone with touchscreen. You can get the compiled java app from the svn.charonmedia.org/svn/home/hari/javamo/output/.
You prolly have to switch the UI variant from symbian to UI1.

Quote
Please PM me your email and I will send libBDCOmmon.so to you.
hari@vt100.at

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #170 on: June 19, 2008, 02:50:55 pm »
I tried this on a Sony Ericsson W580 and a K800i. As others have mentioned, there is some issues with key codes. I was able to navigate the orbiter menus using the numeric keys, but the 'Select' and 'Back' functions were missing (I tried all keys on the phone). So this kind of reduces it usefulness (for now)  ;) .
Both phones were the same wrt. keys, which is expected since they both are somewhat similar SE phones.
did you already post the results from the Keycodes run? I will implement all given keycodes with a phone ID over the next days.

Quote
But I would like to make a humble suggestion:
Shouldn't key code mapping be a part of the device template?
yeah, good idea, but the actual Bluetooth_Dongle does not handle that. Let's see after a few more keycodes dumps how many variants of actual users we've got. After that I'll decide if it's worth the hassle to adapt the Bluetooth_Dongle (keep in mind that we have to be downwards compatible with the symbian mo).

best regads,
Hari
rock your home - http://www.agocontrol.com home automation

sambuca

  • Guru
  • ****
  • Posts: 449
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #171 on: June 19, 2008, 05:58:43 pm »
did you already post the results from the Keycodes run? I will implement all given keycodes with a phone ID over the next days.
No, I didn't, but I suspect my key codes to be identical to what niz23 posted a while back. It also being from a similar Sony Ericsson phone.
Do you detect key mappings based on a specific phone ID, or do you select it from a wider range, for instance a phone series like "SonyEricsson W-series", "Nokia N-series" etc.?

Quote
But I would like to make a humble suggestion:
Shouldn't key code mapping be a part of the device template?
yeah, good idea, but the actual Bluetooth_Dongle does not handle that. Let's see after a few more keycodes dumps how many variants of actual users we've got. After that I'll decide if it's worth the hassle to adapt the Bluetooth_Dongle (keep in mind that we have to be downwards compatible with the symbian mo).
Yes, it was merely a suggestion of a more generic solution. As you say, it might not be needed if the number of phone key mappings are limited.

Best regards,
sambuca

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #172 on: June 26, 2008, 06:32:28 pm »
What is the lowest resolution anyone has tried with this?
If anyone thinks it would run and be usable on a 128x160 screen, I just may buy me a new toy and see if I can get it to go!

tolkeinknoxy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #173 on: June 26, 2008, 09:44:14 pm »
Im having some problems getting javamo working:

Hardware:
Nokia 6300 (with V 06.01 firmware)
Bluetooth Dongle
Core/Hybrid Linuxmce 7.10 i386

Ive copied to the core in /usr/pluto/lib the file libBDCommon.so from http://vt100.at/javamo/ . I rebooted the core. I sent from my laptop over bluetooth to my phone the .jar and .jad files and the manifest.mf file. I then loaded the app on my phone and it says 'waiting for connection'. My core picked up the phone and presents the usual phone adding menu. I select Symbian and it sends a file to my phone. I reject the file and the core says sending failed. I tell it not to send again. I then reboot the core. It generates some orbiter screens and then loads into its UI. The phone still says 'waiting for connection'. If i leave the app and enter back into it, it stills says 'waiting for connection'. Have i missed something or is javamo incomptabile with my phone?
Thanks

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #174 on: June 26, 2008, 10:08:15 pm »
I'd assume your phone is supported as you don't get a jsr082 error. Look into the Bluetooth_Dongle_Launcher logfile in /var/log/pluto. Maybe that gives a hint what's going wrong.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

tolkeinknoxy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #175 on: June 26, 2008, 10:30:38 pm »
I dont have a Bluetooth_Dongle_Launcher in the /var/log/pluto folder on the core. Could this be hinting at an underlying problem on my core? I do have 76_LaunchBluetooth_Dongle.sh.log in that folder though.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #176 on: June 26, 2008, 10:37:06 pm »
I dont have a Bluetooth_Dongle_Launcher in the /var/log/pluto folder on the core. Could this be hinting at an underlying problem on my core? I do have 76_LaunchBluetooth_Dongle.sh.log in that folder though.
take that :) It was a fuzzy hint..

br, Hari
rock your home - http://www.agocontrol.com home automation

tolkeinknoxy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #177 on: June 26, 2008, 10:46:56 pm »
Ah cool thanks. Got the log file copied up to my laptop. This is the contents:

== ATTEMPT FRESH START ==
1   06/26/08 21:40:57   /usr/pluto/bin/Spawn_Device.sh 76 (spawning-device)   16558 Dev: 76; Already Running list: 15,16,17,18,20,29,21,22,
== FRESH START ==
1   06/26/08 21:40:57   /usr/pluto/bin/Spawn_Device.sh 76 (spawning-device)   device: 76 ip: localhost cmd_line: LaunchBluetooth_Dongle.sh
0   06/26/08 21:40:57   76 (spawning-device)   Entering 76
========== NEW LOG SECTION ==========
1   06/26/08 21:40:57   76 (spawning-device)   Starting... 1
1   06/26/08 21:40:57   76 (spawning-device)   Found /usr/pluto/bin/LaunchBluetooth_Dongle.sh
05   06/26/08 21:41:04.098      Inquiry started <0xb6814b90>
05   06/26/08 21:41:22.280      Detected device mac: 00:05:C9:2E:DC:9C link quality: 0 <0xb5011b90>
05   06/26/08 21:41:22.285      Ignoring MAC: 00:05:C9:2E:DC:9C <0xb5812b90>
05   06/26/08 21:41:22.470      Inquiry complete
 <0xb6814b90>
05   06/26/08 21:41:22.471      Inquiry started <0xb6814b90>
05   06/26/08 21:41:22.471      Detected device mac: 00:1E:3A:30:5D:6F link quality: 0 <0xb5011b90>
05   06/26/08 21:41:22.474      About to connect to PlutoMO. We'll suspend scanning... <0xb5812b90>
05   06/26/08 21:41:22.474      Suspending scanning... <0xb5812b90>
Return code: 139
3   06/26/08 21:41:22   76 (spawning-device)   Device died... count=1/50 dev=76
Thu Jun 26 21:41:22 BST 2008 died
========== NEW LOG SECTION ==========
1   06/26/08 21:41:32   76 (spawning-device)   Starting... 2
1   06/26/08 21:41:32   76 (spawning-device)   Found /usr/pluto/bin/LaunchBluetooth_Dongle.sh
05   06/26/08 21:41:38.014      Inquiry started <0xb685db90>
05   06/26/08 21:41:51.074      Detected device mac: 00:1E:3A:30:5D:6F link quality: 0 <0xb505ab90>
05   06/26/08 21:41:51.077      About to connect to PlutoMO. We'll suspend scanning... <0xb585bb90>
05   06/26/08 21:41:51.077      Suspending scanning... <0xb585bb90>
Return code: 139
3   06/26/08 21:41:51   76 (spawning-device)   Device died... count=2/50 dev=76
Thu Jun 26 21:41:51 BST 2008 died

The Device died keeps going on and on until i stop the app on my phone. So im guessing something is trying to connect but having problems?..

tolkeinknoxy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #178 on: June 26, 2008, 10:52:37 pm »
actually the device died error dosnt stop it keeps on going. All the time that it picks up my phone regardless if its running javamo or not. The log fills up quite quickly!

tolkeinknoxy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #179 on: June 26, 2008, 11:09:31 pm »
Solved! Plugged in a different bluetooth dongle and it connected imediadatly. Seems like the previous dongle although worked in linux and could pick up devices could not connect to devices. Unlike this dongle