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

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #120 on: April 21, 2008, 06:54:51 pm »
Hari.

BD only supports bluetooth on linux. There is some socket support for development and debugging, but thats windows only and was never ported.

The symbian orbiter simply opens rfcomm channel 19. Specifying a port is not possible with J2ME for security reasons. I had to add a SDP lookup to the Bluetooth_Dongle code. Did you also exchange those files? You can find them compiled in this thread, and the changes are in the pluto trunk.

best regards,
Hari

Got it working now.
Could start a DVD on my core from my Sony W810i. Very impressive work Hari.

One thing I don´t understand is that my Fiire dongle register as a Bluetooth device. Strange.
Let´s leave this discussion for now.


I bought a Level1 Bluetooth (v2) usb dongle.
It was automatically reqognized by my core, but needed a complete reboot before it worked from my mobile phone.

JavaMO connected to my core as soon as I started it. No problem at all.
(As a sceurity precausion my phone asked me if I wanted to start a bluetooth server).

There is a couple of problem I have identified so far.
My phone does not have to many button and there seem to be som key mapping problems.
And JAvaMO did not survive the "Orbiter Regen". It freezed, and I had to manually stop it on my phone.


I will get back as soon when I have done some more tests.


/niz23

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #121 on: April 21, 2008, 06:57:32 pm »
what is the financial work involved to get a certificate that the java phones would like?

-Thom

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #122 on: April 21, 2008, 07:47:09 pm »
My phone does not have to many button and there seem to be som key mapping problems.
same issue with the N73. Maybe you want to report which buttons map to which codes on your phone with the following utility:
http://vt100.at/files/KeyCodes.jad
http://vt100.at/files/KeyCodes.jar

Quote
And JAvaMO did not survive the "Orbiter Regen". It freezed, and I had to manually stop it on my phone.
ok, I'll have a look at that in a few days.

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

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #123 on: April 21, 2008, 07:48:44 pm »
what is the financial work involved to get a certificate that the java phones would like?
the problem is: many different CA's, even some provider brandings require special certificates for applications.

Maybe we could do a model/provider/CA matrix of our user's phones that require signing..

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

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #124 on: April 21, 2008, 08:22:27 pm »
Hari.
My phone does not have to many button and there seem to be som key mapping problems.
same issue with the N73. Maybe you want to report which buttons map to which codes on your phone with the following utility:
http://vt100.at/files/KeyCodes.jad
http://vt100.at/files/KeyCodes.jar

Quote
And JAvaMO did not survive the "Orbiter Regen". It freezed, and I had to manually stop it on my phone.
ok, I'll have a look at that in a few days.

best regards,
Hari

This is how keycodes.jar report my W810i keyboard.

Phone Model:
SonyEricssonW810i/R4EA031

Phone button names as below, represented in pure text. Not as named on phone.
I hope you understand. Otherwise I´ll create a jpg file.


  |   Display   |
  |------------|

  |--|      |--|
  | A|  Up  | B|
--|--|  |   |--|--
|E|  Le-X-Ri   |F|
--|--|  |   |--|--
  | C|  Do  | D|
  |--|      |--|

  |--| |--| |--|
  | 1| | 2| | 3|
  |--| |--| |--|

  |--| |--| |--|
  | 4| | 5| | 6|
  |--| |--| |--|

  |--| |--| |--|
  | 7| | 8| | 9|
  |--| |--| |--|

  |--| |--| |--|
  | *| | 0| | #|
  |--| |--| |--|



Keycodes
--------

Play/pause button (left side of lcd) "-23"
Zoom/volume + button (right side of lcd) "-36"
Zoom/volume - button (tight side of lcd) "-37"
Camera button "-26"


A "-6"
B "-7"
C "-11"
D "-8"
E "-22" (Walkman button, left)
F "" (Walkman button, right)
Up "-1"
Down "-2"
X(ok) "" -5 (Mid button in joystick)
Left "-3"
Right "-4"
1 "49"
2 "50"
3 "51"
4 "52"
5 "53"
6 "54"
7 "55"
8 "56"
9 "57"
0 "48"
* "42"
# "35"


/niz23

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #125 on: April 21, 2008, 11:12:03 pm »
niz23, you are lucky ;)

your phone supports plenty of distinct keys to map all PlutoMO buttons...

any preferences?

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

skerit

  • Veteran
  • ***
  • Posts: 56
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #126 on: April 21, 2008, 11:19:34 pm »
Skerit,

There is nothing to compile, the link has a compiled jar file and jad in it. you just need to get these to your phone and then also add a mobile orbiter to lmce.

I just let the phone get discovered, told it, it was a s60 phone which sets up the lmce stuff. Sent the jar/jad top the phone via bluetooth and installed it.
The only other change that I've done is change the resolution for the mobile orbiter to match my phone and then regenerate.
My phone is a N73 as well so there is not much use sending pictures.

Regards
Darren

My apologies, but in my previous post I was not referring to compiling the java program, but to applying the BD patch in LMCE, as hari said here:

ok..
the patch went into the trunk but I assume it was not copied to the 0710 release branch..
you need to patch BD and compile it yourself..

best regards,
Hari

I have no problems waiting until next beta release, I was just a bit curious as to how long it would take for it too arrive. Human nature and all.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #127 on: April 21, 2008, 11:47:09 pm »
hmm, it's in the trunk but not yet tagged for 0710..

let's ask danielk if it will be in the 0710 release..

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

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #128 on: April 22, 2008, 07:04:43 am »
niz23, you are lucky ;)

your phone supports plenty of distinct keys to map all PlutoMO buttons...

any preferences?

best regards,
Hari

Will do more tests this evening.
Had lot of problem yesterday. Don´t know if they are related to my phone or JavaMO at the moment.

Can successfully start a dvd or ripper dvd, but is unable to navigate the dvd menu correctly.


/niz23

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #129 on: April 22, 2008, 08:46:02 pm »
Hari.

I planned to test JavaMo more this evening, but unfortunately I cannot connect with JavaMO to my core anymore.
Sometimes I see "connect" in my phone but after a second or so it revert back to display "waiting for connection".

How can I diagnose what is wrong?
Which log files should I look in?

I suspect this problem have something to do with that I removed my mobile from from webadmin and then let lmce auto discover it again. Before it was autodiscovered I also removed the mobile orbiter that was automatically added earlier.

/niz23

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #130 on: April 22, 2008, 10:27:18 pm »
Hari.

Got it working again.

Had to remove the mobile orbiter that was auto added earlier.
Reboot.
Let lmce discover my phone again.
Reboot. Yes a reboot is needed otherwise JavaMO cannot connect.
Now it work. Had no time to do the test I wanted tonight.

When I add a phone, what trigger it to use JavaMO interface instead of normal UI1 (which I tried too. Didn´t work well)?
I tried some UI settings on the MO that was created for my phone and UI1 can be selected etc but how do I specify that JavaMO UI should be used for my MO?
What happen behind the scene when a phone i added?
*MO is created for phone type I select.
What else happen?

How to add a new option for "generic mobile" (instead of WinMobile & Symbian) edpecially for JavaMO?
With a generic phone lmce should not try to upload a file and automatically create a MO with correct phone resolution.


Sorry if these questions are simple. I´m just trying to understand what happen when a phone is added to lmce.

/niz23

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #131 on: April 22, 2008, 11:23:57 pm »
don't have looked into that in detail.
Basically the Bluetooth_Dongle is an orbiter utilizing the BD protocol and the UI1 PlutoMO variant. The screen is rendered by the Bluetooth_Dongle and transferred over BD. Keypresses are reported back. We need the following:

A new device template category mobile phone (derived from the Symbian phone and the windows smartphone). That will push the app to the phone (as far as thats possible with midp2.0, maybe we can only push the JAD and transfer the jar over the air (cellular)).
Next we need another BD command (see VIPShared) to report the screen size. The Bluetooth_Dongle can then adapt the size.
We also want some offline mode for the JavaMO utilizing the VIP Menu Container system (VMC) and wap requests ota.
Some configuration menu for mapping keys would be nice, too.

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

skerit

  • Veteran
  • ***
  • Posts: 56
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #132 on: April 24, 2008, 10:33:00 pm »
As the patch wasn't in the RC, I just couldn't wait anymore - but my compile is failing at one point:

Code: [Select]
linuxmce@dcerouter:/mnt/device/29/Orbiter Test/lmce-source/lmce/src/BD$ sudo make libBDCommon.so
g++ -c -I./ -I../../ -I../ -I/usr/include/mysql -I.. -I../DCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DMULTI_THREADED -DUSE_MYSQL -DVIPSERVER -DXBTSOCKET -DBLUETOOTH_DONGLE -DMULTI_THREADED -fPIC -Wall -g -D_GNU_SOURCE BDCommandProcessor_Linux_Bluetooth.cpp -o BDCommandProcessor_Linux_Bluetooth.o
[b]sdpbrowse.h: In function ‘int sdp_lookup_pluto_rfcomm_channel(bdaddr_t)’:
sdpbrowse.h:122: error: redefinition of ‘int sdp_lookup_pluto_rfcomm_channel(bdaddr_t)’
sdpbrowse.h:18: error: ‘int sdp_lookup_pluto_rfcomm_channel(bdaddr_t)’ previously defined here
BDCommandProcessor_Linux_Bluetooth.cpp: In constructor ‘BDCommandProcessor_Linux_Bluetooth::BDCommandProcessor_Linux_Bluetooth(std::string, std::string, PhoneDevice*)’:
BDCommandProcessor_Linux_Bluetooth.cpp:64: warning: unused variable ‘req’
make: *** [BDCommandProcessor_Linux_Bluetooth.o] Error 1[/b]

I followed rafik24's instructions (Well, after realizing I had to install the bluetooth-sources, but anyway) Now I can't find my mistake.

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #133 on: April 25, 2008, 09:00:55 am »
As the patch wasn't in the RC, I just couldn't wait anymore - but my compile is failing at one point:

Code: [Select]
linuxmce@dcerouter:/mnt/device/29/Orbiter Test/lmce-source/lmce/src/BD$ sudo make libBDCommon.so
g++ -c -I./ -I../../ -I../ -I/usr/include/mysql -I.. -I../DCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DMULTI_THREADED -DUSE_MYSQL -DVIPSERVER -DXBTSOCKET -DBLUETOOTH_DONGLE -DMULTI_THREADED -fPIC -Wall -g -D_GNU_SOURCE BDCommandProcessor_Linux_Bluetooth.cpp -o BDCommandProcessor_Linux_Bluetooth.o
[b]sdpbrowse.h: In function ‘int sdp_lookup_pluto_rfcomm_channel(bdaddr_t)’:
sdpbrowse.h:122: error: redefinition of ‘int sdp_lookup_pluto_rfcomm_channel(bdaddr_t)’
sdpbrowse.h:18: error: ‘int sdp_lookup_pluto_rfcomm_channel(bdaddr_t)’ previously defined here
BDCommandProcessor_Linux_Bluetooth.cpp: In constructor ‘BDCommandProcessor_Linux_Bluetooth::BDCommandProcessor_Linux_Bluetooth(std::string, std::string, PhoneDevice*)’:
BDCommandProcessor_Linux_Bluetooth.cpp:64: warning: unused variable ‘req’
make: *** [BDCommandProcessor_Linux_Bluetooth.o] Error 1[/b]

I followed rafik24's instructions (Well, after realizing I had to install the bluetooth-sources, but anyway) Now I can't find my mistake.

My JavaMO is working (with some problems on my W810) on a standard RC-1 without any bd patches.
Are you sure that the patches isn´t included in RC1?

The other question would be. Do JavaMO work at all without the patch?

/niz23


hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #134 on: April 25, 2008, 01:42:09 pm »
hmm, the patch is still not yet in the 0710 branch. I really assume it is not in. Maybe danielk22 could proof that?

It would work without patch if your phone assigns rfcomm port 19 to the JavaMO by coincidence.

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