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

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #180 on: July 05, 2008, 05:29:07 am »
Strange - I have the same problem:

Code: [Select]
linuxmce@dcerouter:~$ tail -f /var/log/pluto/37_LaunchBluetooth_Dongle.sh.log
05      07/05/08 13:22:51.920           Suspending scanning... <0xb57e2b90>
05      07/05/08 13:22:51.920           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb0fd9b90>
05      07/05/08 13:22:51.946           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb37deb90>
Return code: 139
3       07/05/08 13:22:52       37 (spawning-device)    Device died... count=2/50 dev=37
Sat Jul  5 13:22:52 EST 2008 died
========== NEW LOG SECTION ==========
1       07/05/08 13:23:02       37 (spawning-device)    Starting... 3
1       07/05/08 13:23:02       37 (spawning-device)    Found /usr/pluto/bin/LaunchBluetooth_Dongle.sh
05      07/05/08 13:23:07.618           Inquiry started <0xb678eb90>
05      07/05/08 13:23:20.870           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb4f8bb90>
05      07/05/08 13:23:20.870           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb478ab90>
05      07/05/08 13:23:20.870           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb3f89b90>
05      07/05/08 13:23:20.871           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb3f89b90>
05      07/05/08 13:23:20.872           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb478ab90>
05      07/05/08 13:23:20.872           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb4f8bb90>
05      07/05/08 13:23:20.872           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb3788b90>
05      07/05/08 13:23:20.872           Inquiry complete
 <0xb678eb90>
05      07/05/08 13:23:20.873           Inquiry started <0xb678eb90>
05      07/05/08 13:23:20.873           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb3788b90>
05      07/05/08 13:23:20.873           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb4f8bb90>
05      07/05/08 13:23:20.873           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xb478ab90>
05      07/05/08 13:23:20.877           About to connect to PlutoMO. We'll suspend scanning... <0xb578cb90>
05      07/05/08 13:23:20.877           Suspending scanning... <0xb578cb90>
Return code: 139
3       07/05/08 13:23:21       37 (spawning-device)    Device died... count=3/50 dev=37
Sat Jul  5 13:23:21 EST 2008 died

Just keeps dying. The Bluetooth dongle is listed in lsusb as Broadcom Corp. BCM2035 Bluetooth. Is replacing it with a different dongle the only solution? Seems to work fine otherwise....

Incidentally - it didn't seem to have this problem of dying (in the log file) initially. That was before I replaced the libBDcommon.so library and rebooted. After rebooting, then these device failures started....
« Last Edit: July 05, 2008, 05:31:01 am by colinjones »

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Java/ J2ME mobile orbiter
« Reply #181 on: July 10, 2008, 08:26:25 pm »
Hello,

I have a bluetooth dongle in my media director, my phone got detected, and specified as a Symbian S60 phone. In the webadmin I later disabled resending the application.

I compiled the latest svn co, copied the file to my Nokia E61, and start the application.

The application sits there and says "Waiting for connection"

The protocol for the MD looks like this.
Code: [Select]
dcerouter_78648:/usr/pluto/diskless/31/var/log/pluto# tail -f 77_LaunchBluetooth_Dongle.sh.log
05 07/10/08 20:24:09.253 Inquiry started <0xb67d6b90>
05 07/10/08 20:24:22.065 Inquiry complete
 <0xb67d6b90>
05 07/10/08 20:24:22.066 Inquiry started <0xb67d6b90>
05 07/10/08 20:24:34.878 Inquiry complete
 <0xb67d6b90>
05 07/10/08 20:24:34.954 Inquiry started <0xb67d6b90>
05 07/10/08 20:24:47.754 Inquiry complete
 <0xb67d6b90>
05 07/10/08 20:24:47.754 Inquiry started <0xb67d6b90>

Any pointers where I should start digging?

rgds
Oliver

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #182 on: July 29, 2008, 12:45:16 pm »
Hi all

I have a Nokia E65 and I have succesfully installed JavaMO following the instructions found on this thread and on wiki pages. I have a minor issue with the red button, the one that usually stops calls and should also stop media player. Whenever I press that button the JavaMO closes without throwing any error. It simply exits.
Is this a known issue, or it's related to something wrong I could have done?

Second question. On the wiki page there is a nice picture of a Nokia E65 with JavaMO running with a UI1 skin  (http://wiki.linuxmce.org/index.php/Image:Javamo-e65-ui1.jpg) . I was able to reproduce the same situation, i.e. I have UI1 on my E65. Using the cursor I'm also able to highlight the different buttons on the orbiter, but so far I've not found any way to "press" any button, i.e. once I select "Video" I can't go to the media listing. I've tried to press anything on my phone with no result.

Is the UI1 skin supposed to work normally also on Nokia E65, or is it just something still in development?
In case it is supposed to work, can anyone give me a hint or point me in some direction in order to find out what the problem is?

TIA

Regards
Marco

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Java/ J2ME mobile orbiter
« Reply #183 on: August 01, 2008, 11:32:19 am »
Hi Marco,

Actually it's my picture :) I played with JavaMO in LinuxMCE 0710 Beta 4 I think. At that time it should be built from the sources. As I remember I was able to navigate. But I'm not sure how. Maybe just by pressing central button ('OK') or maybe I used digits to go in sub-menu.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #184 on: August 01, 2008, 12:56:36 pm »
Hi Michael and thanks for your reply.

Actually I've tried to press any possible button on the phone (the central "Ok" button, all digit buttons, even the buttons on the right side of the phone) with no luck.

Anyway I think you gave me a good hint ... i.e to have a look at what lies in charonmedia.

As a starter I've noticed that here (http://svn.charonmedia.org/svn/home/hari/javamo/output/) there is a more recent JavaMO (version 0.2.0, instead of 0.1.1 pointed from wiki pages).

I've already replaced the old version with the new one on my mobile, but nothing has changed.
Next weekend I'll give a try on compiling the libBDCommon.so part and see what happens.

Thanks again

Obviously .. if you happen to recall how you got it to work, your note are always welcome  :)

Marco

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #185 on: August 01, 2008, 05:46:44 pm »
this is mostly for sure a mapping problem with the keys. Run the keycodes application and post your keys. There is a translation method in the JavaMO main class. You could tweak that. The source compiles with standard make, you need to have a java sdk and the wireless toolkit from sun installed (tweak the paths in the makefile, wiki instructions available on the JavaMO page)

There is a bit of a backlog. The basic work for a nice JavaMO is already done. It needs better keypress handling (supporting different phones, repeated key handling). Pointer support for touchscreens is already implemented in the latest svn rev.

I'm pretty busy with Z-Wave at the moment, but sadly enough nobody feels like doing a bit of J2ME polishing...
The Bluetooth_Dongle code would also need some research. We could prerender datagrids with todays resolutions of phones.

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

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #186 on: August 01, 2008, 05:49:59 pm »
Well, funny enough...

I had a discussion with aaron.b on this subject while I was doing my EPG experiments....

it turns out, if the datagrid has more than one column, it's sent as a rendered screen, otherwise the text elements are stripped out and sent as a list.

This was used in an early EPG data grid proof of concept running on the mobile phone.

-Thom

gruffnuff

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #187 on: August 01, 2008, 06:47:04 pm »
what is the financial work involved to get a certificate that the java phones would like?

-Thom


I'm sorry to revive a posting from April 2008, and am new to the , but reading through the remainder of the thread it seemed that this didn't get a definitive answer, and it's info we will want as we go through this to work on as many phones as possible around the world.

Option A: Adding your own cert
Basically, for a large % of the JavaME phones out on the market, you can't add your own cert to the root cert on the device, which means you have to sign with a certificate chained off the root cert baked onto the phone. Even in some of the devices where you can, it's inconsistent since some operators block it, others don't, others didn't bake the root certs on, etc (see http://www.spindriftpages.net/blog/dave/2006/06/18/midlet-jar-signing-a-tutorial-revised/... So the add-your-own-cert route doesn't really work consistently -- plus we'd get into distribution issues (you have to get the cert out to people, they have to put it into their certificate chain, etc.).

Option B: Getting someone with the root cert to sign it for you
This means getting the cell phone carriers to sign a midlet. Good luck. Some cell providers do make this somewhat simpler through their developer programs (Vodafone, Sprint, Orange) but you still have to pass through some hoops. Plus this only ends up working on their phones.

Option C: Java Verified cert
This might be desirable if we (a) get the MIDlet to a point where it is completely stable and released and (b) we are willing to deal with the fact that any changes to the midlet invalidate the signature and (c) it involves paying someone to test the application and validate it works. It's not expensive (about USD$120 per midlet), and the suite checks that the MIDlet doesn't misbehave in very known conditions that cause MIDlets to misbehave (incoming calls, incoming SMS, reduced memory conditions, low battery,poor coverage, etc.). I'd be willing to pay for a couple of cycles of certification if it meant we would get a solid codebase. But this also means that once we get a signature, we have to get into a release-cycle mode of thinking. This option is not very consistent with the FOSS mindset in general -- but mobile devices are really not in the FOSS universe in any event. The benefit of doing this is that once you have the midlet signed with Java Verified, you know it will install with full permissions on any phone that has a Java Verified root cert.

The good news
The good news, however, is that the vast majority of JavaME phones out there that support JSR 82 don't block Bluetooth access from untrusted midlets completely -- they usually are set to prompt only once in midlet execution permission, and a very large number of them let the user override this setting to let the midlet have permanent permission. This varies device-by-device. So it means we probably don't have to pursue this avenue. Most I've seen enable it without difficulty by default.

BTW -- I'm saying "we" here a lot. Hari -- you've done a great job with this. Please count me in for development assistance -- I've been working with Java ME developer communities for years and can weave my way around a MIDlet pretty well. I'll spend some time looking through the most recent code from svn and see if there are any common MIDlet gotchas we can foresee.

Cheers

- jf


« Last Edit: August 01, 2008, 06:49:15 pm by gruffnuff »

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #188 on: August 01, 2008, 06:58:09 pm »
[...]
ack.

Quote
Please count me in for development assistance -- I've been working with Java ME developer communities for years and can weave my way around a MIDlet pretty well. I'll spend some time looking through the most recent code from svn and see if there are any common MIDlet gotchas we can foresee.
Awesome!! That would be great.

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

Techstyle

  • Addicted
  • *
  • Posts: 674
    • View Profile
    • Techstyle UK Ltd.
Re: Java/ J2ME mobile orbiter
« Reply #189 on: August 09, 2008, 05:00:59 pm »
I am new to Linux, sorry!!

I get this:

Bareword "libBDCommon" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "so" not allowed while "strict subs" in use at (eval 1) line 1.

when trying to 'rename libBDCommon.so libBDComon.so.old'

Can anybody help?

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Java/ J2ME mobile orbiter
« Reply #190 on: August 09, 2008, 06:07:59 pm »
I am new to Linux, sorry!!

I get this:

Bareword "libBDCommon" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "so" not allowed while "strict subs" in use at (eval 1) line 1.

when trying to 'rename libBDCommon.so libBDComon.so.old'

Can anybody help?

Quote
sudo mv libBDCommon.so libBDComon.so.old
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Java/ J2ME mobile orbiter
« Reply #191 on: August 09, 2008, 08:12:47 pm »
The BD doesn't work on my RC2 at all. Here is a log:

Code: [Select]
========== NEW LOG SECTION ==========
1       08/09/08 21:08:23       69 (spawning-device)    Starting... 14
1       08/09/08 21:08:23       69 (spawning-device)    Found /usr/pluto/bin/LaunchBluetooth_Dongle.sh
10      08/09/08 21:08:23.076           Device: 69 starting.  Connecting to: localhost <0x2aada724e4b0>
10      08/09/08 21:08:23.123           Start scanning size m_mapPhoneDevice_Detected size: 0 <0x2aada724e4b0>
10      08/09/08 21:08:23.124           pthread_create returned with 0 <0x2aada724e4b0>
10      08/09/08 21:08:23.124           HandleDetectionThread started <0x40804950>
10      08/09/08 21:08:23.124           InternalSendCommand id 331 out parm conf -1 resp 0x84a7a0 <0x2aada724e4b0>
10      08/09/08 21:08:23.124           Socket::SendMessage type 1 id 331 from 69 to -2001 <0x2aada724e4b0>
10      08/09/08 21:08:23.125           Requesthandler 0x840cf0 (device: 69) runThread now running <0x41806950>
10      08/09/08 21:08:23.164           InternalSendCommand out done id 331 conf -1 resp 0x84a7a0 0x84a630 0 type 1 id 331 to -2001 <0x2aada724e4b0>
10      08/09/08 21:08:23.165           InternalSendCommand out id 331 parm exiting conf -1 resp 0x84a7a0 <0x2aada724e4b0>
10      08/09/08 21:08:23.165           Set EA to 1 <0x2aada724e4b0>
10      08/09/08 21:08:23.165           Connect OK <0x2aada724e4b0>
10      08/09/08 21:08:28.167           Start of scan loop <0x40804950>
10      08/09/08 21:08:28.167           Attached to BT adapter: hci0    00:00:00:00:00:00
 <0x40804950>
Return code: 1
3       08/09/08 21:08:49       69 (spawning-device)    Device died... count=14/50 dev=69
Sat Aug  9 21:08:49 EEST 2008 died

It happens with both original libBDCommon.so and from Hari. 
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #192 on: August 11, 2008, 11:21:18 am »
this is mostly for sure a mapping problem with the keys. Run the keycodes application and post your keys. There is a translation method in the JavaMO main class. You could tweak that. The source compiles with standard make, you need to have a java sdk and the wireless toolkit from sun installed (tweak the paths in the makefile, wiki instructions available on the JavaMO page)

There is a bit of a backlog. The basic work for a nice JavaMO is already done. It needs better keypress handling (supporting different phones, repeated key handling). Pointer support for touchscreens is already implemented in the latest svn rev.

I'm pretty busy with Z-Wave at the moment, but sadly enough nobody feels like doing a bit of J2ME polishing...
The Bluetooth_Dongle code would also need some research. We could prerender datagrids with todays resolutions of phones.

best regards,
Hari

I downloaded keycode application and ran it on my E65, but it fails to show the keycode of those keys that are giving troubles ...
It looks like they are intercepted by phone and not passed to keycode.jar

I've googled around and it seems like there are not that much keycode - scancode applications, nor I found any keycode table for E65.
The only thing I've found is something called jbak tools, that is a native S60 applications that among others offers a keycode function. Unfortunately I could not have it working on my phone (needs to be signed, but the open signed site won't sign it ... did not figure out why ...).

So I'm pretty clueless.

My fear is that if keycodes (that is a J2ME app) can't catch some keypress, so also JavaMO won't be able to catch them as well, and this may be due to some J2ME limitations.
Therefore JavaMO would be pretty useless on that class of mobile phones.

Can my assumption be somehow correct?

TIA
Marco

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Java/ J2ME mobile orbiter
« Reply #193 on: August 11, 2008, 12:28:59 pm »
It looks like they are intercepted by phone and not passed to keycode.jar

[...]

My fear is that if keycodes (that is a J2ME app) can't catch some keypress, so also JavaMO won't be able to catch them as well, and this may be due to some J2ME limitations.

This is no j2me limitation, it is the implementation on the nokia phones. SE ones pass nearly every key to java, the nokias don't. So you e.g. don't get keypresses for the red "hang up" key or the multimedia buttons.
The original mobile orbiter variant was done for the symbian app on the phone. With c++ you can catch every key on the nokias.

Quote
Therefore JavaMO would be pretty useless on that class of mobile phones.
We need a slightly optimized variation/skin for those. Many phones feature a touchscreen, too. Maybe we can get more keys with python on the Nokias. Posde is working on that.

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

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Re: Java/ J2ME mobile orbiter
« Reply #194 on: August 11, 2008, 07:37:03 pm »
It looks like they are intercepted by phone and not passed to keycode.jar

[...]

My fear is that if keycodes (that is a J2ME app) can't catch some keypress, so also JavaMO won't be able to catch them as well, and this may be due to some J2ME limitations.

This is no j2me limitation, it is the implementation on the nokia phones. SE ones pass nearly every key to java, the nokias don't. So you e.g. don't get keypresses for the red "hang up" key or the multimedia buttons.
The original mobile orbiter variant was done for the symbian app on the phone. With c++ you can catch every key on the nokias.

Glad to hear that I was wrong... and most of all that I'm not (yet) supposed to throw away my six month old E65 and my wife's brand new N82 ...
Quote
Quote
Therefore JavaMO would be pretty useless on that class of mobile phones.
We need a slightly optimized variation/skin for those. Many phones feature a touchscreen, too. Maybe we can get more keys with python on the Nokias. Posde is working on that.

br, Hari
I got the point.
Probably it's really time to seriously try to make HADesigner working on my laptop ...

Thanks a lot for your clear reply

Regards
Marco