LinuxMCE Forums

General => Developers => Topic started by: david_a_dawson on October 19, 2007, 04:31:08 pm

Title: Java/ J2ME mobile orbiter
Post by: david_a_dawson on October 19, 2007, 04:31:08 pm
How do,

I've been watching the forums for a while and I've seen feature requests for a mobile java orbiter appear every so often, with the occasional 'Yes, that sounds great, I'll get on it!'  Does anyone know if this is in progress?

I'm a very experienced java dev, including j2me, and I'd be happy to help with the effort, or start the effort if it's dead at the mo.

I'm a bit hazy about the remote orbiter architecture, and my C/C++ is decidedly ropey, so I can start to do this if someone is willing to give me a few pointers . .

Cheers,

David.
Title: Re: Java/ J2ME mobile orbiter
Post by: sandos on October 19, 2007, 11:55:40 pm
I have not seen any ref to anyone actually developing a j2me orbiter, so I should you should just go ahead and do it!

Sounds like a great idea, I would most likely use it. I wonder how capable j2me is though in the multimedia department... I guess with modern phones it shouldn't be a problem.
Title: Re: Java/ J2ME mobile orbiter
Post by: 1audio on October 20, 2007, 09:19:59 am
The mobile orbiter is a big project. I committed to pay an Indian developer with Symbian experience to port the mobile orbiter to Symbian series 3 and after 6 months he petered out. It was too much for him. The Pluto guys can give a lot of help in what is required and how it works.

The biggest problem is that the Orbiter is based on moving graphics across to the device. OK across a network. Lousy with bluetooth and not good over gprs.

However I'm ready to support such an effort. I bought on Nokia e50 I'll never see again for this so I'm serious about my support.
Title: Re: Java/ J2ME mobile orbiter
Post by: darrenmason on October 22, 2007, 01:54:51 am
David,

The easiest approach would be to mimick the Symbian mobile orbiter code. This basically has the orbiter running on the CORE and effectively a proxy running on the mobile device. Communication between the two is through a Bluetooth channel that effectively is just a smart socket type interface.
I think the first step would be to replicate the BD library that is in the code using Java (JSR-82 support would be needed).
Once that is done then the orbiter functionality that runs on the mobile device is quite simplistic and should be limited to buttons and bitmap displaying.

I started to look at it at one stage but gave up because all the mobiles I have access to did not have JSR-82 support which I would consider critical.


1audio,
I didn't think that the mobile orbiter moved graphics across at runtime. I thought all the designer objects were rendered for the device and put into the .sis file. The runtime bluetooth communications seemed to be limited to COMMAND replication. I could be wrong though.

Regards
Darren

Title: Re: Java/ J2ME mobile orbiter
Post by: 1audio on October 22, 2007, 07:17:07 am
I was told that the limited memory of the cell phones required some graphics to be passed over the network. Some are cached but not all. And an Orbiter rebuild would require updated graphics to be sent to the phone. A more efficient solution would be nice for all of the Orbiters actually.
Title: Re: Java/ J2ME mobile orbiter
Post by: david_a_dawson on October 22, 2007, 11:09:14 am
hmm, interesting.  I'd kind of picked up that the symbian orbiters worked that way.  Providing a java clone of the current functionality would seem to be the most logical way forward.

I was wondering though, since java (and as you say, jsr 82)  capable phones range from wizz bang top of the range to quite basic low resolution devices, they might require a very low resolution UI.  Do we know if this is already handled well in the symbian orbiter?

David.
Title: Re: Java/ J2ME mobile orbiter
Post by: david_a_dawson on October 22, 2007, 11:21:56 am
1audio,  I had also wondered about the graphics, and since at least some phones will have low resolution, it might be worth having an option of a mainly text based UI, menus etc, which are very easy to throw together in j2me.

What do we think?
Title: Re: Java/ J2ME mobile orbiter
Post by: bulek on October 22, 2007, 01:24:11 pm
1audio,  I had also wondered about the graphics, and since at least some phones will have low resolution, it might be worth having an option of a mainly text based UI, menus etc, which are very easy to throw together in j2me.

What do we think?
There is maybe something similar to what you're looking for. Cisco phone is receiveing XML files describing menus - so maybe digging into that would help. It's somekind of customized Orbiter proxy that sends xml files to phone to display GUI and I guess it contains less (or even none) graphics....

In a long term it would be proper solution to have somekind of Text Orbiter proxy, that could deal with less graphic and more text oriented devices...

HTH,

regards,

Bulek.
Title: Re: Java/ J2ME mobile orbiter
Post by: david_a_dawson on October 22, 2007, 05:37:52 pm
There is maybe something similar to what you're looking for. Cisco phone is receiveing XML files describing menus - so maybe digging into that would help. It's somekind of customized Orbiter proxy that sends xml files to phone to display GUI and I guess it contains less (or even none) graphics....

In a long term it would be proper solution to have somekind of Text Orbiter proxy, that could deal with less graphic and more text oriented devices...

I agree, this sounds like a good model.  A generic xml orbiter proxy seems a useful thing to have, as you could have it used by different remotes with no change to the proxy.

This would also have the advantage of removing or at least reducing the need for regenerating the orbiter, and would make using the device that much more feasible over a gprs link.
I think it will still be preferable to transfer some graphics over the wire, but it may be possible to have a seperate graphics service running to give access to those and let the remote device request them when required.

In fact, taking that concept a bit further, if you had some kind of separate service running to serve up media to the orbiters, such as menu graphics, you could then have the xml orbiter proxy tell the device semantically what to render as an xml file, it could then runtime detect the best way (graphic/ text/ combo), then request the correctly scaled versions of the graphics from the DCE router media service, using these to construct the UI.

Something like this would give us a nice development path, create an xml orbiter proxy, create a j2me app that renders them menus as text; then add nicer graphics features in the future.

Has anyone looked at the cisco orbiter proxy code in detail?  would it be easily adaptable as a generic xml proxy?  I'm not very good at C++, so would anyone like the chance to make a huge contribution to lmce and join me in constructing this?

David.
Title: Re: Java/ J2ME mobile orbiter
Post by: darrenmason on October 23, 2007, 12:54:33 am
David,

I have never looked at the Cisco orbiter stuff, but some comments on using an XML based proxy..
- as a wrapper for either the DCE commands or even for presentation config it would certainly make it easy to deal with from a number of devices
- It still needs to be transported reliably over either TCP or Bluetooth
- The work has already been done to replicate the DCE logic using the BD library, albeit using a prorietary binary format

My suggestion would to have a look at both and see what makes sense.

I am happy to assist where I can. I used to write C++ for a living but havn't done it full time for many years, after switching to Java.

regards
Darren
Title: Re: Java/ J2ME mobile orbiter
Post by: fallendevil on October 25, 2007, 08:20:14 pm
Hi Guys,

I know nothing about the comms of the orbiter or of Java.

I just wanted to thank David for the suggestion of maybe having a .jar based installer for the Orbiter.

I have a Sony Ericsson W580i Phone, and it will only run .jar apps.

Thanks again and i hope this becomes a reality soon. 
Title: Re: Java/ J2ME mobile orbiter
Post by: david_a_dawson on October 26, 2007, 01:48:30 pm
David,

I have never looked at the Cisco orbiter stuff, but some comments on using an XML based proxy..
- as a wrapper for either the DCE commands or even for presentation config it would certainly make it easy to deal with from a number of devices
- It still needs to be transported reliably over either TCP or Bluetooth
- The work has already been done to replicate the DCE logic using the BD library, albeit using a prorietary binary format

My suggestion would to have a look at both and see what makes sense.

I am happy to assist where I can. I used to write C++ for a living but havn't done it full time for many years, after switching to Java.

regards
Darren

Hi Darren,

as you say, there will still need to be a transport to push this over, which would logically be bluetooth for local phones/ or tcp or maybe http for a phone far away, over it's gprs link (not sure about that, never done it on a phone before . .)

The question becomes, would it be easier to create a java implementation of DCE (that goes via the bluetooth DCE layer), or create what is in effect another method of transferring DCE commands from the phone to the router.

Not sure, both have advantages and disadvantages.

I think the code needs to be explored now, see what options are available. 
I am up for creating something wizz bang, but my time is limited, so I'm probably going to head for the direction of least effort.

Which brings me to my next question.  How does one get the source? 

I'll check out the rest of the forums I think.

David.
Title: Re: Java/ J2ME mobile orbiter
Post by: fulishgerman on December 05, 2007, 11:12:13 am
Hey Guys, I am pretty new to LinuxMCE. I just want to thank you all for getting at it trying to get a java based orbiter working. I would definately love to have the Orbiter on my RAZR.

Thx Guys
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on December 05, 2007, 02:02:35 pm
we'll try... in the mean-time, you could just get a Symbian based phone such as a Nokia N70, if you wanted the feature now.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: mortar on December 19, 2007, 05:20:01 am
I'm happy to help code it!  It's the feature I want implemented the most.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on December 19, 2007, 05:52:24 am
the code for the phone orbiter is in the src/PlutoMO directory of the SVN checkout

http://svn.charonmedia.org/

it also uses the BD, and RA libraries to establish a socket communications layer over bluetooth, where essentially entire graphic screens are sent over the line, and keypresses are sent back. It's a very simple design.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on December 19, 2007, 06:33:57 am
I'll help testing it with by Blackberry Pearl...
;)

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on December 19, 2007, 05:22:56 pm
i dug into the mobile orbiter stuff these days. My incomplete picture for now is the following:

The phone opens a bluetooth rfcomm channel (probably 19 from what i have seen in the code, not verified) and is waiting for connections. The Bluetooth_Dongle device does a device inquiry loop until it finds an registered orbiter. When found it uses the BD CommandProcessor to connect and transmit the locally rendered png's to the phone, and processes keypresses received. The phone only has to display the png and send keypresses back.

edit: found a wiki page (it's getting huge ;) ): http://wiki.linuxmce.org/index.php/LinuxMCE_Orbiter_Symbian_Programmer%27s_Guide

I have no j2me experience but i simply installed the Netbeans 6.0 IDE and the Sun Java Wireless Toolkit, and found a Bluetooth example ("WTK2.5.2/apps/BluetoothDemo"). It features a server and a client mode and transfers png pictures between two phones (JSR082). Besides handling key-presses it should feature all the code necessary to build the phone side of the JavaMO. Somebody with j2me experience should be able to put this together in few time. I'll try to further research what's needed on the pluto side (BD_CommandProcessor_Java_*).

edit: the wiki page makes me assume that a port of BD for Java is needed, too.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on December 20, 2007, 10:09:13 pm
the code for the phone orbiter is in the src/PlutoMO directory of the SVN checkout

http://svn.charonmedia.org/

it also uses the BD, and RA libraries to establish a socket communications layer over bluetooth, where essentially entire graphic screens are sent over the line, and keypresses are sent back. It's a very simple design.

Do you think that code could be used as the basis to make an MD work over Bluetooth? For audio at least? Maybe a prescaled-down video stream perhaps?
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man on December 21, 2007, 11:33:29 am
Developing the Orbiter on Java can be very interesting task especially if you take into account Google mobile platform Android. IMHO it'll dominate on the market soon.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 12, 2008, 08:57:47 pm
Hi devs,

some progress from the java front:

(http://vt100.at/plutomo.jpg)
as you can see in the picture the bluetooth comm over jsr82 works fine on the phone and in the simulator (with real bluez hardware, thanks avetana). The Bluetooth_Dongle successfully connects to the "phone".

Next steps:
1.) Wait till somebody buys me a license for the avetana stack
2.) Further implement BD in midp/cldc (http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/com/linuxmce/javamo)
3.) Adapt Bluetooth_Dongle to lookup the rfcomm port with a sdp browse*
4.) Implement (parts?) of VMC for image display and keypress return

* should be pretty easy to do a sdp lookup with bluez in c++ and search for our service name:
Code: [Select]
Service Name: PlutoMO
Service RecHandle: 0x1000e
Service Class ID List:
  UUID 128: deadbeef-dead-beef-dead-beefdeadbeef
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
hope that doesn't slow down the connection process for symbian phones. But there is no way to specify the server rfcomm port in jsr82.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 15, 2008, 06:10:26 pm
first successful chat with Bluetooth_Dongle:

Code: [Select]
05      02/15/08 17:53:00.274           Detected device mac: 00:09:DD:50:23:2D link quality: -77 <0xb4e16b90>
05      02/15/08 17:53:00.276           About to connect to PlutoMO. We'll suspend scanning... <0xb5617b90>
05      02/15/08 17:53:00.276           Suspending scanning... <0xb5617b90>
05      02/15/08 17:53:00.319           Inquiry complete
 <0xb6619b90>
05      02/15/08 17:53:01.852           Successfully connected to the symbian application 00:09:DD:50:23:2D <0xb5617b90>
05      02/15/08 17:53:01.852           Connected to PlutoMO. <0xb5617b90>
05      02/15/08 17:53:02.012           $$$ CMD_Create_Mobile_Orbiter received for 00:09:DD:50:23:2D device $$$ <0xb5617b90>
05      02/15/08 17:53:02.012           Orbiter created for 00:09:DD:50:23:2D device <0xb5617b90>
05      02/15/08 17:53:02.415           Resuming scanning... <0xb5617b90>
05      02/15/08 17:53:02.420           Inquiry started <0xb6619b90>
01      02/15/08 17:53:02.623           Current screen: 1255.3.0 <0xb4615b90>
05      02/15/08 17:53:02.623           Repeated keys list :  <0xb4615b90>
05      02/15/08 17:53:02.623           Ready to send a picture, size 9952, reporting signal strength 0 <0xb4615b90>

Code: [Select]
root@golem9:/usr/src/home/javamo# make bluezsim
cd /home/hari/java/mpp-sdk && java -jar player.jar /usr/src/home/javamo/output/JavaMO.jad
mpowerplayer 2.0.1185
44294440
avetanaBluetooth version 1.3.17
hciOpenDevice(0)
setting HCI_DEVICE_ID to 0
Channel opened at 1
S:10
S:0
S:0
S:0
S:15
S:0
S:0
S:0
S:6
S:0
S:0
S:0
S:50
S:48
S:48
S:54
S:46
S:49
S:49
S:46
S:48
S:57
S:0
GOT:5
GOT:0
GOT:0
GOT:0
GOT:79
GOT:75
GOT:65
GOT:89
GOT:0

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: JimmyGosling on February 15, 2008, 07:14:52 pm
Hari,
you mentioned that you were looking for a "license for the avetana stack"
can you explain to me how their licensing works with them?

this is the page that I came up with http://www.avetana-gmbh.de/avetana-gmbh/produkte/jsr82.eng.xml (http://www.avetana-gmbh.de/avetana-gmbh/produkte/jsr82.eng.xml)

according to this page
Quote
To extend your license beyond the duration of 14 days, you can purchase a license valid for a maximum of 3 addresses for EUR 25

Does that mean it's limited to 3 addresses.  Would everyone using this need to purchase this license for their bt dongles?

thanks
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 15, 2008, 08:58:08 pm
Does that mean it's limited to 3 addresses.  Would everyone using this need to purchase this license for their bt dongles?
no. That stack is only for development. Together with it and the mpowerplayer you can emulate a real phone with jsr082 using bluez hardware. That really speeds up development as you don't have to test on the phone itself. The emulator included in Sun's wireless toolkit can't use real hardware so you can't talk to the Bluetooth_Dongle from the sim.

You could of course use the stack in another j2se java application. We don't need that because Bluetooth_Dongle is not an java app and directly communicates with the HCI device.

You don't need the stack for using the JavaMO with a real phone.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on February 15, 2008, 09:23:16 pm
Does that mean it's limited to 3 addresses.  Would everyone using this need to purchase this license for their bt dongles?
no. That stack is only for development. Together with it and the mpowerplayer you can emulate a real phone with jsr082 using bluez hardware. That really speeds up development as you don't have to test on the phone itself. The emulator included in Sun's wireless toolkit can't use real hardware so you can't talk to the Bluetooth_Dongle from the sim.

You could of course use the stack in another j2se java application. We don't need that because Bluetooth_Dongle is not an java app and directly communicates with the HCI device.

You don't need the stack for using the JavaMO with a real phone.

I would buy you the license for E25. Can I buy it and transfer it to you, rather than pay PayPal fees twice?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 15, 2008, 09:44:36 pm
Does that mean it's limited to 3 addresses.  Would everyone using this need to purchase this license for their bt dongles?
no. That stack is only for development. Together with it and the mpowerplayer you can emulate a real phone with jsr082 using bluez hardware. That really speeds up development as you don't have to test on the phone itself. The emulator included in Sun's wireless toolkit can't use real hardware so you can't talk to the Bluetooth_Dongle from the sim.

You could of course use the stack in another j2se java application. We don't need that because Bluetooth_Dongle is not an java app and directly communicates with the HCI device.

You don't need the stack for using the JavaMO with a real phone.

I would buy you the license for E25. Can I buy it and transfer it to you, rather than pay PayPal fees twice?
of course. This is the address of my dongle: 00:09:DD:50:23:2D

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 15, 2008, 10:19:51 pm
Cool - great work Hari!! Don't suppose you know whether (crappy old) Blackberry's Java would handle anything you develop here? I'm guessing not, the web browser is pretty crap, and the Java seems pretty basic, also I have no idea whether it exposes any of the bluetooth functionality....

Col
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 15, 2008, 11:16:02 pm
Cool - great work Hari!! Don't suppose you know whether (crappy old) Blackberry's Java would handle anything you develop here? I'm guessing not, the web browser is pretty crap, and the Java seems pretty basic, also I have no idea whether it exposes any of the bluetooth functionality....

Col
It needs to support MIDP2.0/CLDC1.1 and JSR082.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 16, 2008, 12:08:38 am
Surprise surprise, nothing on the BB website other than User Quick Guides!
Title: Re: Java/ J2ME mobile orbiter
Post by: JimmyGosling on February 16, 2008, 04:26:57 am
Colin,
perhaps you want to list the blackberry phone model you have and see if anyone (myself included) can do some looking into it.

I don't think "crappy old" was an official model number  ;D Then again... I'm not a guru here
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 16, 2008, 05:07:16 am
Last I checked, Blackberries with 4.x have Bluetooth support..
It's been a while since I looked into that, I'm not sure if it's JSR082..
also, 4.x is MIDP2.0/cldc1.1.

You can check your blackberry.. it's in the settings somewhere.
It's a page that states Java version..

My Blackberry Pearl 8100 supports it. :)

Regards,

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 16, 2008, 06:56:57 am
Colin,
perhaps you want to list the blackberry phone model you have and see if anyone (myself included) can do some looking into it.

I don't think "crappy old" was an official model number  ;D Then again... I'm not a guru here

From memory that was the model number :) but know I come to look more closely, they also seem to be known as Blackberry Curve 8310. v4.2.2.146 is the firmware on platform 2.5.0.16...

Hmmm.... looking at the other modules version numbers, I see CLDC-1.1 mentioned, also MIDP-2.0 and JTWI v1.0 if they have anything to do with it...

Col.
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 16, 2008, 06:59:37 am
Last I checked, Blackberries with 4.x have Bluetooth support..
It's been a while since I looked into that, I'm not sure if it's JSR082..
also, 4.x is MIDP2.0/cldc1.1.

You can check your blackberry.. it's in the settings somewhere.
It's a page that states Java version..

My Blackberry Pearl 8100 supports it. :)

Regards,

Dan


Thanks Dan, sorry should have gone to the end of the thread before my last post!
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on February 16, 2008, 05:02:46 pm
Does that mean it's limited to 3 addresses.  Would everyone using this need to purchase this license for their bt dongles?
no. That stack is only for development. Together with it and the mpowerplayer you can emulate a real phone with jsr082 using bluez hardware. That really speeds up development as you don't have to test on the phone itself. The emulator included in Sun's wireless toolkit can't use real hardware so you can't talk to the Bluetooth_Dongle from the sim.

You could of course use the stack in another j2se java application. We don't need that because Bluetooth_Dongle is not an java app and directly communicates with the HCI device.

You don't need the stack for using the JavaMO with a real phone.

I would buy you the license for E25. Can I buy it and transfer it to you, rather than pay PayPal fees twice?
of course. This is the address of my dongle: 00:09:DD:50:23:2D

I just sent you a PM with instructions how to retrieve your customized unlimited development license. Let us know how the development goes.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 16, 2008, 08:44:10 pm
I just sent you a PM with instructions how to retrieve your customized unlimited development license. Let us know how the development goes.
way cool! Thank you very much for your support. I'll keep you posted on the progress.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 17, 2008, 03:02:18 pm
Hi Devs,

as this is my first midp project maybe some java guy can look at the code and see if I'm doing something terribly wrong:
http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/com/linuxmce/javamo

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on February 17, 2008, 05:19:24 pm
as this is my first midp project maybe some java guy can look at the code and see if I'm doing something terribly wrong:
http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/com/linuxmce/javamo

At first glance, you are doing some things "terribly" wrong. For example,
Quote from: CharonMedia SVN
BD_PC_ReportMyVersion.java (http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/com/linuxmce/javamo/BD_PC_ReportMyVersion.java)
Code: [Select]
public class BD_PC_ReportMyVersion extends BDCommand {
26         public BD_PC_ReportMyVersion() {
27                 super();
28         }
(...)

But superclass BDCommand.java (http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/com/linuxmce/javamo/BDCommand.java) has no member "BD_PC_ReportMyVersion()", nor does BDCommand's superclass "SerializeClass", etc, so there's no "super()" to call.

And that's just the first class/method I looked at. The naming and use of CLASS CONSTANTS also looks wrong.

But to get started (with the basic debugging question), what are you expecting these classes to do, and what are they doing instead?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 17, 2008, 06:07:13 pm
But superclass BDCommand.java (http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/com/linuxmce/javamo/BDCommand.java) has no member "BD_PC_ReportMyVersion()", nor does BDCommand's superclass "SerializeClass", etc, so there's no "super()" to call.
that super() is meant to call the constructor of the super class (so the BD_PC_ReportMyVersion() constructor should also call BDCommand()..).

Quote
And that's just the first class/method I looked at. The naming and use of CLASS CONSTANTS also looks wrong.
could you please be more specific?

Quote
But to get started (with the basic debugging question), what are you expecting these classes to do, and what are they doing instead?
so they are supposed to process BD commands. And they do that pretty fine for now. I don't experience any problems. It's only that time advanced since my java class at university and I want some whiz to go over the code before I write the whole app based on some fundamental flaws..
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 17, 2008, 06:54:09 pm
yeah, it works pretty good:

Code: [Select]
root@golem9:/usr/src/home/javamo# make bluezsim
cd /home/hari/java/mpp-sdk && java -jar player.jar /usr/src/home/javamo/output/JavaMO.jad
mpowerplayer 2.0.1185
44090208
avetanaBluetooth version 1.3.18a
hciOpenDevice(0)
setting HCI_DEVICE_ID to 0
Channel opened at 1
S:10
S:0
S:0
S:0
S:11
S:0
S:0
S:0
S:50
S:48
S:48
S:54
S:46
S:49
S:49
S:46
S:48
S:57
S:0
ReceiveLong: got byte: 5
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 5
GOT ACK: OKAY
S:1
S:0
S:0
S:0
S:0
S:0
S:0
S:0
ReceiveLong: got byte: 101
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 101
Got BD_CP_SEND_ME_KEYSTROKES
ReceiveLong: got byte: 1
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 1
SEND KEY STROKES: true
S:5
S:0
S:0
S:0
S:79
S:75
S:65
S:89
S:0
S:1
S:0
S:0
S:0
S:0
S:0
S:0
S:0
ReceiveLong: got byte: 100
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 100
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 0

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 17, 2008, 07:28:49 pm
Hari,

I'm not up on my java, but from what I can see, YOU ROCK.

What I can remember about the j2me platform was dealing with the screen (canvas) was a pain in the A$$.

It looks like you're about to hit that stage,

I'll see if I can find some old code on what I was doing..

Great work!
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 17, 2008, 09:25:24 pm
hehe, it sends me a picture:

Code: [Select]
ReceiveLong: got byte: 102
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 102
Get BD_CP_SHOW_IMAGE

best reagards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 17, 2008, 11:30:22 pm
the code may be really bad but it shows a picture:

(http://vt100.at/javamo-first-picture-small.png)

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 17, 2008, 11:47:35 pm
Cool, Hari! Well done - let me know if you need testers. I have a Blackberry Curve and also a Sony K{something}!
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 17, 2008, 11:49:40 pm
Cool, Hari! Well done - let me know if you need testers. I have a Blackberry Curve and also a Sony K{something}!
you could compile the beast and see if it runs on your phone ;)
and we need to patch Bluetooth_Dongle to do a SDP query.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 17, 2008, 11:51:38 pm
go ask Hari ;)
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 18, 2008, 12:00:52 am
Wouldn't have a clue how to compile it! But happy to follow instructions if you need me to.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 18, 2008, 12:05:57 am
i provided a Makefile for that. It is in the trunk. Just make sure you provide JWTK.
It spits out the .jad and the .jar.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 18, 2008, 12:10:51 am
The mobile orbiter is a big project. I committed to pay an Indian developer with Symbian experience to port the mobile orbiter to Symbian series 3 and after 6 months he petered out. It was too much for him.
Get another dev. Somebody with v3 SDK experience can port the symbian code in weeks not months.

Quote
The Pluto guys can give a lot of help in what is required and how it works.
As the source is available that was not needed for now.

Quote
The biggest problem is that the Orbiter is based on moving graphics across to the device. OK across a network. Lousy with bluetooth and not good over gprs.
bluetooth is pretty fast for me.

Quote
However I'm ready to support such an effort. I bought on Nokia e50 I'll never see again for this so I'm serious about my support.
What was your offer?

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 18, 2008, 12:58:59 am
i provided a Makefile for that. It is in the trunk. Just make sure you provide JWTK.
It spits out the .jad and the .jar.

best regards,
Hari

Hari - OK, I suspect this is now much more hand holding than you are prepared to provide :) but I'll ask the questions anyway...

I haven't any idea what all this means. By "its in the trunk" I guessed that you are talking about svn.charonmedia.com, in there I found some stuff that is obviously related to what you are doing under home/hari/javamo, and has been modified in the last hour.

I can see stuff that is obviously java code, and vaguely I am aware that Makefile is the standard name for the file that kicks off a compilation of source code. So I am assuming that I am to download all these files somehow (can't work out how to do that at the moment!).

Then compile them - do I do this on my core? I'm assuming that I don't need to compile them on the Blackberry itself!?

By jad/jar - are these output files the sort of intermediate, platform independent code that the Java virtual machine(?) executes/interprets?

If I am even vaguely talking about the same thing as you, then I have to 1) work out how to download that entire folder structure, 2) put it on my core, 3) hopefully all the bits needed to compile Java are already on my system, and so just type sudo ./Makefile, 4) out the other end pops a jar and a jad? 5) one of which is the actual application (what is the other?) - jar sounds familiar, I copy that over to my Blackberry and try to run it?

If this is all too much work, then I am happy just to wait :)
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 18, 2008, 02:06:18 am
colin,

yes, yes, yes, and NO. lol

you have an understanding of what needs to be done..

to get the trunk, you need subversion, apt-get install subversion will do that for you...
BUT,
at the rate Hari's going, it'll be MUCH easier for you to simply wait...

Daniel mentioned that he has the server farms up and running pretty much.. so soon, you'll be able to simply download the file from your phone.

Actually, the file needed to download to your phone is called a MIDlet.. which is a .jad file with a wrapper.

you need to 'package' the .jad (or is it .jar, can't remember) into a .mid.

for more info, check out http://www.developer.com/java/other/article.php/3724381

HTH,

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 18, 2008, 02:34:26 am
colin,

yes, yes, yes, and NO. lol

you have an understanding of what needs to be done..

to get the trunk, you need subversion, apt-get install subversion will do that for you...
BUT,
at the rate Hari's going, it'll be MUCH easier for you to simply wait...

Daniel mentioned that he has the server farms up and running pretty much.. so soon, you'll be able to simply download the file from your phone.

Actually, the file needed to download to your phone is called a MIDlet.. which is a .jad file with a wrapper.

you need to 'package' the .jad (or is it .jar, can't remember) into a .mid.

for more info, check out http://www.developer.com/java/other/article.php/3724381

HTH,

Dan


Thanks Dan - I think you are right, I should just wait! I wish you hadn't mentioned how to install svn and get the trunk... I can feel the urge to "fiddle" coming on (and the foreknowledge of several complete rebuilds as a result!)
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on February 18, 2008, 03:22:04 am
hehe, it sends me a picture:

Code: [Select]
ReceiveLong: got byte: 102
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: got byte: 0
ReceiveLong: long result: 102
Get BD_CP_SHOW_IMAGE

Well if it's working, then it's good code :). But since others getting it from SVN will have to maintain it, and your style is not very recognizable, then all you have to do is comment the code clearly and everything's OK. The best way is to make sure that every public method has a description of what the API arguments (passed and returned) mean, and what the result of running the funciton is, in complete sentences, preferably in javadoc (http://en.wikipedia.org/wiki/Javadoc) format. Then others can clean it up later, or just fix bugs without worrying too much about style.

Thanks for doing this. Getting a BT Orbiter at the rate you're going is very exciting.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 18, 2008, 09:28:56 pm
... and your style is not very recognizable ...
Again, give hard facts like "it would be better if you do that this way..". Just telling me it's wrong but not what's wrong does not help.
What do you think is wrong with the style? The bracing or indenting?

Quote
then all you have to do is comment the code clearly and everything's OK.
you are telling me the obvious. So I wanted to know if there is some big java midp nono I'm doing. Therefore I asked for somebody with j2me experience to fly over the code.
It's not like that mocking about my coding style, without hints to improve, does help this go any further.

And yes, of course this code will get documentation.

Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 19, 2008, 02:22:42 am
THIS MESSAGE IS NOT FROM AN ADMINISTRATIVE STANDPOINT.

Instead of stating the obvious, I dug in and helped hari with the api..

I'm no java programmer, but I can read it.. and I have had some experience with J2ME. 

Hari, don't worry about 'commenting' your code for now, YOU know what it does, hell, I looked at it for 1/2 hour, and I know what it does..

it's NOT rocket science here, it's simple class structures,

I wish people would stop b*tching about 'how' it's SUPPOSED to be done, 'preferably in this or that format', 'not very recognizeable' and get their HANDS DIRTY.

Code doesn't just MAGICALLY apear, SOMEONE has to make an attempt at it.

IF the code needs to be changed, THEN it will be changed.  You can't CHANGE something that does not exist!

If this sounds like I'm going off a bit, well, yes, I am.

I 'm pissed about the lack of RESPECT from certain users here.  Intended, or otherwise.

If your not going to submit you OWN code for scrutiny, I think you have NO BASIS to say 'how' things should be done.

You want it 'more readable'?  DO IT.  Till then, PRAISE those of us who ARE contributing.  If you want praise, CONTRIBUTE.

I'm not talking about spending $30.00 on a license, ANYONE can do that. 

I haven't seen you (yes you) in the IRC channel AT ALL.

There.  It's said.

Hari, keep a stiff upper lip, I know it's hard sometimes.

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 19, 2008, 03:31:35 am
...and here it comes...
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 19, 2008, 03:43:07 am
whoa, he fell off the end of the list, that must mean he's got lots to type.
...heads up...
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on February 19, 2008, 05:12:22 am
THIS MESSAGE IS NOT FROM AN ADMINISTRATIVE STANDPOINT.

Instead of stating the obvious, I dug in and helped hari with the api..

I'm no java programmer, but I can read it.. and I have had some experience with J2ME. 

Hari, don't worry about 'commenting' your code for now, YOU know what it does, hell, I looked at it for 1/2 hour, and I know what it does..

it's NOT rocket science here, it's simple class structures,

I wish people would stop b*tching about 'how' it's SUPPOSED to be done, 'preferably in this or that format', 'not very recognizeable' and get their HANDS DIRTY.

Code doesn't just MAGICALLY apear, SOMEONE has to make an attempt at it.

IF the code needs to be changed, THEN it will be changed.  You can't CHANGE something that does not exist!

If this sounds like I'm going off a bit, well, yes, I am.

I 'm pissed about the lack of RESPECT from certain users here.  Intended, or otherwise.

If your not going to submit you OWN code for scrutiny, I think you have NO BASIS to say 'how' things should be done.

You want it 'more readable'?  DO IT.  Till then, PRAISE those of us who ARE contributing.  If you want praise, CONTRIBUTE.

I'm not talking about spending $30.00 on a license, ANYONE can do that. 

I haven't seen you (yes you) in the IRC channel AT ALL.

There.  It's said.

Hari, keep a stiff upper lip, I know it's hard sometimes.

I'm going to ignore your endless hypocritical tirades that you sometimes seem to think have gone too far, but then you do again.

But I do like your contributions to the code. Keep it up.
Title: Re: Java/ J2ME mobile orbiter
Post by: Matthew on February 19, 2008, 05:26:41 am
... and your style is not very recognizable ...
Again, give hard facts like "it would be better if you do that this way..". Just telling me it's wrong but not what's wrong does not help.
What do you think is wrong with the style? The bracing or indenting?

I was referring mostly to the naming and the way the functions are organized. But I didn't want to nitpick, I wanted to help with whatever your actual problem was in getting the code to do what you wanted it to do - you didn't say what was wrong with it when you asked for help. So I asked that basic question. Then you reported it was working, so I just congratulated you and offered some other advice you seemed you might not know, since you said you're not a java programmer, and your code didn't reflect that you already were following that advice. Sorry I offered to help.


Quote
then all you have to do is comment the code clearly and everything's OK.
you are telling me the obvious. So I wanted to know if there is some big java midp nono I'm doing. Therefore I asked for somebody with j2me experience to fly over the code.
It's not like that mocking about my coding style, without hints to improve, does help this go any further.

And yes, of course this code will get documentation.
[/quote]

I didn't mock you. I briefly mentioned that your code did have some problems, confirming what you'd mentioned about its limited quality, then I asked the real question needed to help, then saw you say actually had better code (because it worked, which wasn't clear from what you first said), and congratulated you. Then I offered some advice which, though you say it's "obvious", you didn't apply in that code. So it wasn't obvious to me.

FWIW, I'm far from the only one remarking that the attitude towards people in this community doing anything other than writing code has become hostile. And this will be far from the first time that I'll mention that the people with the knowledge of how to even get a development platform and techniques to use it haven't helped, even when asked, enough to get more people writing that code that could possibly avoid that kind of hostility.

It's an impossible situation that perpetuates itself by alienating people who want to help, encouraging hostility and selfishness in return. But I'm not going to take the bait and just fight or flight. I just hope that the "0710" release and its promised opening of the developer community comes soon enough that this community's enthusiasm isn't exhausted in petty infighting.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 19, 2008, 10:12:05 am
I didn't mock you. I briefly mentioned that your code did have some problems, confirming what you'd mentioned about its limited quality, then I asked the real question needed to help, then saw you say actually had better code (because it worked, which wasn't clear from what you first said), and congratulated you. Then I offered some advice which, though you say it's "obvious", you didn't apply in that code. So it wasn't obvious to me.

Danielk gave me concrete hints on how to improve readability (there is a Java Code Convention) without challenging that this code will get documentation.

Quote
FWIW, I'm far from the only one remarking that the attitude towards people in this community doing anything other than writing code has become hostile.

This statement simply shows how you disdain the help and explanations you received (e.g. for building the source, navigation, whatever). But hey, it's easier to be in a snit than to participate (and no, I don't talk about coding now).

Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on February 19, 2008, 01:36:57 pm
Matthew

The one and only time I will weigh into these flame-wars, as I think in the medium of electronic communications, it is generally futile.

I have almost infinite respect for what both Hari and Dan have achieved, their vision, drive, skill and experience (among many others on these forums, but these are standouts).

Similarly, I respect your intents, desire to move LMCE forward and good will.

Nevertheless - with my comments about communications in an electronic medium in mind - on several occasions I have had cause to be concerned about the tone in your postings. I have no doubt that they were written with no "edge" intended, nor a desire to cause bristling among the community. I'm sure they were meant as direct and constructive criticism. At the same time, they sometimes come across as "high handed", and pronouncements from "up on high".

It distresses me enormously that the community is expending valuable energy and negative emotion on these unproductive exchanges, even though I can see the cause in the hurt on all sides. Everyone here wants to see LMCE soar to its rightful place, and are doing what they are capable of to help achieve this.

Can I, respectfully, ask for you to consider this? I realise that you are simply expressing yourself as clearly as you can. Generally, from my perspective, there are only a few words/phrases in these posts that "get under the skin" and spoil an otherwise valuable contribution. It is often difficult to fully interpret how the written word will be read not matter how it was intended when written.

No different from how the scourge email is to communication (and I know, historically I was a MS Exchange Server engineer!), so can forums - please re-read your posts before hitting post with a mind to how someone else may read it, not knowing your intent or emphasis. Detail here would be unhelpful - however, please PM me if I can provide examples, and how I "felt" when I read them, even though they were not directed towards me.

Hopeful that this will be taken how it is intended,
Colin
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 19, 2008, 10:53:34 pm
began to implement keypresses:

(http://vt100.at/javamo-screenshot2-small.jpg)

best regards,
Hari

btw: ddamron: it switched on the PLCBUS lamp shortly before i took the screenshot ;) That was one of those moments..
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 19, 2008, 11:12:54 pm
can you say... SWEET!!!
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 20, 2008, 04:54:28 am
damn hari,

Every time I think I'm starting to catch up in your code, you go and jump another hurdle!

It's hard to keep up with you! hehe
nice work BTW, I see you implemented all the keys..
I like the way you laid out your code.. everything in it's own file...
Also like the manifest and the output folder ;)

Heh, I'm still trying to figure out the bluetooth..
Oh, BTW, I saw your recordstore function.. cool..
VERY nice work.  I'm proud to call you a friend!

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 20, 2008, 06:16:12 am
Hari,
I found you trick, you sneaky little #@$! hehehe
attempting to help out, I coded some of BD_CP_ShowVMC.java...
then, I tried to check it in to surprise you..
I don't have commit access :(
so here it is..
Code: [Select]
/*      This is a Java based bidirectional command processor implementation for Plutohome/LinuxMCE

        Copyright (C) 2008, Harald Klein <hari@vt100.at> and Dan Damron <dan@danthecomputerman.info>

        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
*/

package com.linuxmce.javamo;

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class BD_CP_ShowVMC extends DBCommand {
        char m_iStore;
        long m_iVMCSize;
        byte[] m_pVMC;
        long m_iVMCFileNameSize;
        byte[] m_pVMCFilename;

        public BD_CP_ShowVMC() {
                super();
        }

        public void parseCommand() {
                startreading();
                        m_iStore = readchar();
                        m_iVMCSize = readlong();
                        m_pVMC = readBlock(miVMCSize);
                        m_iVMCFileNameSize = readlong();
                        m_pVMCFileName = readBlock(m_iVMCFileNameSize);
        }

        public boolean processCommand(Object target) {
                JavaMO mJavaMO = (JavaMO)target;

//not finished
        }
}
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 20, 2008, 08:42:30 am
I found you trick, you sneaky little #@$! hehehe
thats not a trick thats a design goal. That was the reason why I simply used pluto naming at first. So I literally could copy and paste the command structures.

Quote
attempting to help out, I coded some of BD_CP_ShowVMC.java...
then, I tried to check it in to surprise you..
I don't have commit access :(
so here it is..
Committed revision 1540.

Quote
VERY nice work.  I'm proud to call you a friend!
me too, dan!
And I'm really glad that you jump on the code..

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 20, 2008, 06:19:12 pm
Heh, well, I try..
I can pick it up fairly easily.
I haven't coded in java for quite a while..
heh, it's starting to come to me...
You have to stop taking leaps and bounds to let me catch up! lol
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 24, 2008, 01:25:09 am
Hi devs,

some status update:
* added sdp lookup code: http://svn.charonmedia.org/trac.cgi/browser/home/hari/bt-test/sdp.c (integration into Bluetooth_Dongle.cpp pending)
* added SET_IMAGE_QUALITY command
* began implementing SHOW_LIST command
* added some javadoc: http://www.vt100.at/javamo-doc/
* improved timing

and last not least some eye candy:

(http://www.vt100.at/images/javamo-screenshot3-small.jpg)

(http://www.vt100.at/images/javamo-screenshot4-small.jpg)

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: jondecker76 on February 24, 2008, 03:14:42 am
Wow, this looks incredible!

Have you tried it on an actual phone yet?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 24, 2008, 07:52:01 am
yes, but without talking to Bluetooth_Dongle (needs some tweaks to browse for the rfcomm channel as you can see in this thread).
The actual application version starts and opens bluetooth on the phone. And I did successful JRS082 echo tests with the phone. The simulation talks to Bluetooth_Dongle over a real rfcomm link.

Maybe we will get some memory/heap problems on the real hardware.. lets see..

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 25, 2008, 04:16:59 pm
as requested in the chat some new screenies:

(http://vt100.at/images/plutomo-orbiter-regen.png)

(http://vt100.at/images/javamo-list.png)

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 25, 2008, 07:27:04 pm
Heh, Hari, you ROCK.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 26, 2008, 01:32:23 am
last one for tonite:

(http://vt100.at/images/javamo-screenshot-cam.png)

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 27, 2008, 12:36:12 am
Hi devs,

the sdp lookup is finished.. needs more testing (e.g. test if it breaks the symbian orbiter [it should not]).
The patch for BD is here: http://svn.charonmedia.org/trac.cgi/browser/home/hari/bt-test/BD-javamo.patch

Code: [Select]
05      02/27/08 0:04:40.853            Detected device mac: 00:1E:3B:6D:B6:9B link quality: -78 <0xb4de8b90>
10      02/27/08 0:04:40.853            Socket::SendMessage type 2 id 4 from 130 to -1001 <0xb4de8b90>
10      02/27/08 0:04:40.855            Receive string: MESSAGE 155            <0xb55e9b90>
10      02/27/08 0:04:40.855            Received MESSAGE 155            0x823c578 device: 130 <0xb55e9b90>
10      02/27/08 0:04:40.856            Received Message type 1 ID 60 from 9 to 130 (device: 130) resp 0 <0xb55e9b90>
05      02/27/08 0:04:40.856            About to connect to PlutoMO. We'll suspend scanning... <0xb55e9b90>
05      02/27/08 0:04:40.856            Suspending scanning... <0xb55e9b90>
10      02/27/08 0:04:40.856            start of const 00:1E:3B:6D:B6:9B <0xb55e9b90>
05      02/27/08 0:04:40.898            Inquiry complete
 <0xb65ebb90>
10      02/27/08 0:04:40.898            The scanning is suspended. We'll ignore the results of this scan <0xb65ebb90>
01      02/27/08 0:04:44.148            received channel: 3
 <0xb55e9b90>
05      02/27/08 0:04:44.221            Successfully connected to the symbian application 00:1E:3B:6D:B6:9B <0xb55e9b90>
05      02/27/08 0:04:44.221            Connected to PlutoMO. <0xb55e9b90>
10      02/27/08 0:04:44.221            pthread_create returned with 0 <0xb55e9b90>
10      02/27/08 0:04:44.222            HandleBDCommandProcessorThread started <0xb4de8b90>

whats missing:
* figure out why BD_PC_SelectedFromList does not work
* figure out why comms get stuck on the real phone
* handle special key input for telecom screens
* debugging, testing, cleanups

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 27, 2008, 12:05:53 pm
first real phone screenies:

(http://vt100.at/images/08_51_11-270208.jpg)

(http://vt100.at/images/38_00_12-270208.jpg)

(http://vt100.at/images/41_51_11-270208.jpg)


best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 27, 2008, 03:17:03 pm
it looks way better with 240x320 fullscreen:

(http://vt100.at/images/06_13_15-270208.jpg)

it's very crisp looking, the N800's cam is not able to reproduce it. I will take some sane shots with a real cam when the batteries are loaded.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: uplink on February 28, 2008, 12:48:33 pm
the sdp lookup is finished.. needs more testing (e.g. test if it breaks the symbian orbiter [it should not]).
The patch for BD is here: http://svn.charonmedia.org/trac.cgi/browser/home/hari/bt-test/BD-javamo.patch
The patch has been included in the LinuxMCE tree. I split the .h into two files: a .h and a .cpp, because I don't like functional code in headers :) but that's the only modification I made.

The code was tested with a Windows Mobile phone and a Nokia Symbian phone, and it worked fine.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 28, 2008, 02:21:01 pm
The patch has been included in the LinuxMCE tree.
perfect.

Quote
I split the .h into two files: a .h and a .cpp, because I don't like functional code in headers :) but that's the only modification I made.
yeah, you are right. Think I was lacy after much java programming these days ;)

Quote
The code was tested with a Windows Mobile phone and a Nokia Symbian phone, and it worked fine.
ok.

Thank you for your assistance and best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on February 29, 2008, 11:04:20 am
Hi all,

First, thanks Hari, and others, for the great work. I am looking forward to trying this out.  :)

And for trying it out, please correct me if I am wrong:
If I understand the whole thing correctly, the patch now added to the tree will allow LMCE to discover a Java MO running on a phone. So what I need to do to get this working is:
* Upgrade to LMCE 7.10 beta4 (when it is available)
* Install the JAD file on my phone
* Run the JavaMO and let LMCE discover it

Is this correct, or am I missing something basic?

sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 29, 2008, 01:22:48 pm
If I understand the whole thing correctly, the patch now added to the tree will allow LMCE to discover a Java MO running on a phone.
yes. You can't specify the rfcomm channel for a spp server in j2me (security reasons). So we can't use the hard coded channel 19. The new code in BD simply does an sdp lookup for the service name "Pluto".

Quote
* Upgrade to LMCE 7.10 beta4 (when it is available)
yes. you could also exchange the libBD* in /usr/pluto/lib if you are running a 0710 version. For 0704 you need a wrapper script (to change LD_LIBRARY_PATH).

Quote
* Install the JAD file on my phone
you want the JAR. The JAD is needed to install the JAR on the phone.

Quote
* Run the JavaMO and let LMCE discover it
Is this correct, or am I missing something basic?

correct. In fact, whe lmce detects your phone, you simply select "Symbian". After that it alerts you that the sending of the program to the phone failed. Tell it to not try again. You can also change the screen size on the Orbiter for that phone (used 240x320 (PDA) for my n73).

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: posde on March 04, 2008, 08:54:16 am
Hello Hari,

do you know if the Nokia 8800 Arte supports the right Java stuff?

The only mentioning of JSR082 if found was on a japanese site. http://f15ijp.no-ip.org/mobile/wiki/index.php/Nokia_8800_Arte (http://f15ijp.no-ip.org/mobile/wiki/index.php/Nokia_8800_Arte) The phone is a gem, and if would work with your PerfectMO, I'd have a reason ... ;-)

rgds
Oliver
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 04, 2008, 10:55:30 am
Hello Hari,

do you know if the Nokia 8800 Arte supports the right Java stuff?

The only mentioning of JSR082 if found was on a japanese site. http://f15ijp.no-ip.org/mobile/wiki/index.php/Nokia_8800_Arte (http://f15ijp.no-ip.org/mobile/wiki/index.php/Nokia_8800_Arte) The phone is a gem, and if would work with your PerfectMO, I'd have a reason ... ;-)

rgds
Oliver

if that specifications are correct, yes, it should run the JavaMO fine..

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: lfd on March 08, 2008, 09:55:47 pm
Hi Hari,

Congrats and thanks for the efforts you are putting into the project.

I was browsing the source repository and found JavaMO.jar. I have tried to install it on a Nokia N95 and E61 but I get "Invalid Jar file" error on both.

I really would love a try it; any ideas why it wouldn't work?

Thanks,

-Damien
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 08, 2008, 10:23:01 pm
I was browsing the source repository and found JavaMO.jar. I have tried to install it on a Nokia N95 and E61 but I get "Invalid Jar file" error on both.
My N73 wants the jad file, too, to accept the jar. I simply copy both to the memory card and select the jad file from the file manager. You probably also have to enable installing of unsigned software.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: lfd on March 09, 2008, 07:20:24 pm
Thanks Hari it works.

It is the first time I had to install an application this way. It is strange that the S60 app manager does not let you install the JAR straight forward.

Ok I'll have to update to beta4 if I got it right and it should work like a charm.

Cheers,

-Damien
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 09, 2008, 08:23:13 pm
It is the first time I had to install an application this way. It is strange that the S60 app manager does not let you install the JAR straight forward.
seems like MIDP2.0/CLDC1.1 jar's need a .jad file..

Quote
Ok I'll have to update to beta4 if I got it right and it should work like a charm.
hehe, no. It will work like a charm when it's finished. It's alpha for now.. still need to tweak some bits.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: gazlang on March 12, 2008, 02:06:28 pm
I have tried this on my N95 - managed to get the .jar to install on the phone and when I run it it displays the screen 'waiting for connection' - I assume this is all working.

However, I added my phone when discovered on LMCE and told it it was a symbian and answered yes to downloading the orbiter software. I received a bluetooth message on my phone with the software (which obviously wont run) but then LMCE does nothing (apparently waiting to install the software on my phone). I run the MO.jar on my phone and still get the screen 'waiting for connection'

Do I need to patch something on LMCE? I am running beta 4 and thought the patch had been applied to this release.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 12, 2008, 04:30:40 pm
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
Title: Re: Java/ J2ME mobile orbiter
Post by: rafik24 on March 12, 2008, 05:54:29 pm
  Hi Hari,

 Well done ( as usual ), thanks for making the java orbiter become true so much of us where looking forward t that (us non dev people) .

 As i'm writting i'm downloading the lmce source from svn and it will take forever before i see the java mo working.

 As i'm impatient to see this, would you mind giving us the BD patched binaries so i can try this before i finish compilling.


 All the best,

Rafik

 
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 12, 2008, 08:04:27 pm
i will do when i have moved my dev env over to my brand new b4 installation..

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: lfd on March 12, 2008, 08:56:43 pm
I'm at the same point where I should apply the patch.

Hari, do you have any instructions or a little "how to" apply the patch? I am not familiar with the development environment for this project.

If you have something and time ( :) ) it would be nice to update/create the JavaMO page on the Wiki. I could help you to do it if you are overloaded.

Cheers,

-Damien

Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on March 13, 2008, 07:29:01 am
Hari,

you ROCK!

'nuff said.
Title: Re: Java/ J2ME mobile orbiter
Post by: rafik24 on March 13, 2008, 08:16:04 am
 Hari,

 Well done once again, i compilled the BD lib and binaries and it all work on my k750i (svn rev 1584)

 I really thank you for the time you spent on this project and others.

 Regards,

Rafik
 
Title: Re: Java/ J2ME mobile orbiter
Post by: gazlang on March 13, 2008, 12:18:56 pm
Hi,

First, I must add my congrats to Hari!

I haven't got mine running yet (got the phone side sorted ok, just not the LMCE side) - how do I patch BD? and with what file.

Can someone give me a quick howto?

Cheers
Title: Re: Java/ J2ME mobile orbiter
Post by: rafik24 on March 13, 2008, 02:38:26 pm
  Hi gazlang,

 You first need to download the lmce sources from svn ==> http://svn.charonmedia.org/

 look at the instructions on the main page.

 Then download Hari's BD sources from http://svn.charonmedia.org/trac.cgi/browser/home/hari/bt-test

 then go to the build folder:

cd  linuxmce/lmce/src/BD/

 mv Makefile Makefile.orig

copy hari's sources file to this folder, then

 patch -p0 < BD-javamo.patch

 make

 mv Makefile Makefile.har

 mv Makefile.orig Makefile

 make libBDCommon.so

 mv /usr/pluto/lib/libBDCommon.so /usr/pluto/lib/  /usr/pluto/lib/libBDCommon.so.orig

 cp libBDCommon.so /usr/pluto/lib/

 cp rfc scan sdp /usr/pluto/bin
 
 now restart the core services and you should be done.

 Rafik
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 13, 2008, 11:25:03 pm
...
 Rafik
cool Rafik, that instructions are very complete as they even compile the test tools rfc, scan and sdp. They are not needed but were handy for my testing..

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 13, 2008, 11:27:43 pm
Well done once again, i compilled the BD lib and binaries and it all work on my k750i (svn rev 1584)
cool, you are the first user reporting success ;)

Does the datagrid list work fine for you? How are the key mappings?
I still need to implement the repeated key handling for follow me/help and capture keyboard for pin/phonenr entry...

Quote
I really thank you for the time you spent on this project and others.
you are welcome ;)

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: gazlang on March 16, 2008, 05:12:45 pm
Ok, I tried the howto from rafik (thankyou buy the way!!) unfortunately it didn't work for me - got as far as 'make libBDCommon.so' but got errors, and no libBDCommon.so file!

I'm running the x64 version, so don't know if thats a problem!?

Anyway, I'm going to do a clean install (I've been testing various things) and so will try it again

Title: Re: Java/ J2ME mobile orbiter
Post by: gazlang on March 18, 2008, 02:15:32 pm
Nope same problem with a clean x64 DVD install.

One thing though, when I download and 'make' the sources from SVN it hangs after trying to make th bttv driver - says something like 'cannot determine build environment - falling back...' (can't remember exactly!).
The note at the foot of the page http://svn.charonmedia.org/ says:

"The "./configure ; make" pair will build everything except the DB packages and a couple problematic Devices. It will also prep your system so that you can compile the remaining unbuilt packages manually (Building the DB packages)"

So I assumed this was normal, and closed the konsole to crack on with building the DB package.

Don't know if anyone else has tried this and had the same probs??


Title: Re: Java/ J2ME mobile orbiter
Post by: totallymaxed on March 21, 2008, 02:25:36 pm
Well done once again, i compilled the BD lib and binaries and it all work on my k750i (svn rev 1584)
cool, you are the first user reporting success ;)

Does the datagrid list work fine for you? How are the key mappings?
I still need to implement the repeated key handling for follow me/help and capture keyboard for pin/phonenr entry...

Quote
I really thank you for the time you spent on this project and others.
you are welcome ;)

best regards,
Hari

Yet another very cool and impressive piece of work Hari!

I have not had a chance before today to pay much attention to what you have been doing on the JavaMO... damn i wish i had brought a BlueTooth dongle home with me now... my Sony-Ericsson K800i is begging to run your JavaMO ;-)

We must get this into the autobuild system asap after the release and svn's are harmonised ;-)

Great work as ever

Andrew
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on March 22, 2008, 01:39:46 am
Yet another very cool and impressive piece of work Hari!
hehe, the Bluetooth_Dongle does the hard work ;) It only displays pictures...

Quote
We must get this into the autobuild system asap after the release and svn's are harmonised ;-)
The patch for the sdp lookup is in the lmce trunk. Only needs to be copied to the 0710 branch..

Quote
Great work as ever
You are welcome!
We need to do a branded version with dianemo splash screen ;)

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: totallymaxed on March 22, 2008, 01:33:27 pm
Yet another very cool and impressive piece of work Hari!
hehe, the Bluetooth_Dongle does the hard work ;) It only displays pictures...

Quote
We must get this into the autobuild system asap after the release and svn's are harmonised ;-)
The patch for the sdp lookup is in the lmce trunk. Only needs to be copied to the 0710 branch..

Quote
Great work as ever
You are welcome!
We need to do a branded version with dianemo splash screen ;)

best regards,
Hari


A Dianemo branded version would be cool :-)

What your thinking on where the JavaMO should go feature/functionality wise in the future?
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man on April 08, 2008, 09:08:06 pm
Hi guys,

Maybe it's a stupid question but where can I get jar and jad files?
Title: Re: Java/ J2ME mobile orbiter
Post by: darrenmason on April 09, 2008, 12:58:33 am
There is some here....

http://svn.charonmedia.org/trac.cgi/browser/home/hari/javamo/output
Title: Re: Java/ J2ME mobile orbiter
Post by: skerit on April 16, 2008, 07:48:25 pm
When is the next beta arriving, anyway? (Or RC or whatever :))
Call me lazy, but I'm not in a compiling mood (that and I don't have enough bandwith to spare! Somehow 54 GiBs a month aren't enough!)

Looks cool though, does anyone have any example pictures of the app on a real phone? :P
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on April 16, 2008, 07:49:51 pm
dude, look back in the thread. You'll see it running on Hari's N73.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: darrenmason on April 17, 2008, 01:20:08 am
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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 18, 2008, 10:11:41 am
My phone is a N73 as well so there is not much use sending pictures.

do you have any issues, wishes, reports, whatever? Did not get much feedback on missing features/bugs/..

best regards,
hari
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on April 19, 2008, 01:13:04 am
Hari

Just trying this on my Blackberry - when I try to download the JAD file by browsing the the link in charonmedia on the Blackberry and choosing the download link, it seems to understand that it is something installable ... an application, but after I confirm I want it to install even though it isn't signed, it then comes back with an error:

907 Invalid JAR
HTTP Error 406: Not Acceptable

When I try the same thing with the JAR, it says:

907 Invalid JAR
Application missing
required attribute:
MicroEdition-Profile

I'm assuming this is because you are supposed to use the JAD file and that points to the JAR... but either way, it doesn't seem to like it.... any thoughts? Do the errors make any sense to you?
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on April 19, 2008, 02:45:25 am
Actually, don't worry about it - its a Blackberry/BES thing that I will have to try and work around on my own, nothing to do with the app...
Title: Re: Java/ J2ME mobile orbiter
Post by: 1audio on April 19, 2008, 10:15:31 am
I tried installing on my Nokia E70 and it reported invalid JAR file. It also said that installing .jad was not supported. Am I missing something?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 19, 2008, 10:25:28 am
Actually, don't worry about it - its a Blackberry/BES thing that I will have to try and work around on my own, nothing to do with the app...
iirc ddamron used the app that came with the phone to install the application on his blackberry. But i dunno if the blackberry allows accessing bluetooth (jsr082) for unsigned applications.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 19, 2008, 10:30:07 am
I tried installing on my Nokia E70 and it reported invalid JAR file. It also said that installing .jad was not supported. Am I missing something?
i had to tell my n73 to install unsigned applications. Than I used obexpush to put the jad and the jar on the phone (used the memory card "E:"). After that I selected the jad with the filemanager and pressed "yes" endless times ;)

You may want to try the following: put the jar and the jad on a webserver and change the file reference in the jad to the web url (http://youserver/dir/JavaMO.jar). Then open the jad url with the web browser. Some phones only install MIDP2.0 over the air (ota).

Java signing is a hell and costs a lot of money. Sadly some phones (provider brandings) require it..

hope that helps and best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on April 19, 2008, 05:22:28 pm
Hari.

I tried installing on my Nokia E70 and it reported invalid JAR file. It also said that installing .jad was not supported. Am I missing something?
i had to tell my n73 to install unsigned applications. Than I used obexpush to put the jad and the jar on the phone (used the memory card "E:"). After that I selected the jad with the filemanager and pressed "yes" endless times ;)

You may want to try the following: put the jar and the jad on a webserver and change the file reference in the jad to the web url (http://youserver/dir/JavaMO.jar). Then open the jad url with the web browser. Some phones only install MIDP2.0 over the air (ota).

Java signing is a hell and costs a lot of money. Sadly some phones (provider brandings) require it..

hope that helps and best regards,
Hari

Uploaded the jad (changed MIDlet-Jar-URL as you suggested) to my webserver and then installed it on my Sony Ericsson W810.
W810 does not seem to care if an app is trusted or not.

The app loaded fine. Asked if I allowed a server bluetooth connection.
Unfortunately Iám not at home so I cannot try the app fully, but so far it seem to work. It loaded and is waiting for a bluetooth connection.

I hope my Fiire dongle in th ecore can be to test this functionality.


Hari. Awesome work. I hope it work fine on my phone when I get home later.
Will post here as soon as I have verified how it work.

Do you have any plans to make it work over a gsm/3g connection?
Perhaps it´s hard to implement (I don´t really know since I have abolutely no experience in mobile phone development. Would be great to have), but having an orbiter that can remotely control my lmce from anywere in the world would be really great.

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on April 19, 2008, 06:38:13 pm
Silly me.  :(


Thought that the Fiire remote usb dongle was a bluetooth device, but it seem it is just a 2.4GHz RF communication transceiver.
I know I have read somewhere that Fiire use bluetooth in the remote control. Don't remember where I read it.

Will have to buy a usb bluetooth device tomorrow to test with.

Anyone know if the BD patch is in lmce builds 10th of paril and later?

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on April 19, 2008, 06:51:15 pm
Silly me.  :(


Thought that the Fiire remote usb dongle was a bluetooth device, but it seem it is just a 2.4GHz RF communication transceiver.
I know I have read somewhere that Fiire use bluetooth in the remote control. Don't remember where I read it.

Will have to buy a usb bluetooth device tomorrow to test with.

Anyone know if the BD patch is in lmce builds 10th of paril and later?

/niz23

And it really is a BLuetooth device after all.
Should have checked my dmesg first.

Hari, do you know if it is possible to use Fiire remote (bluetooth) dongle with your JavaMO?

I'm using lmce (amd64) built 10th of april but the JavaMO is not auto detected as suggested previously in this thread.


/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: 1audio on April 19, 2008, 06:56:50 pm
I tried following the directions except downloading from your site directly. The .jad started but the phone then reported invalid .jar file. Its an unlocked Nokia E70 w/ rev 3 firmware if that makes any difference. Other apps seem to load fine.
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on April 19, 2008, 07:10:51 pm
1audio.

I tried following the directions except downloading from your site directly. The .jad started but the phone then reported invalid .jar file. Its an unlocked Nokia E70 w/ rev 3 firmware if that makes any difference. Other apps seem to load fine.

Sent you a private mess with an URL you can try to install from.
The one I used.

Try it.

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: darrenmason on April 21, 2008, 12:52:04 am
Hari,

In terms of feedback, I will try and put some more together for you. So far I just installed it, changed the resolution and tried it out on two media directors.

Had troubles connecting on my lounge MD, but eventually it did. I suspect that this is more a problem with the Bluetooth dongle than the app. The dongle seems to keep installing itself after reload router.

The app seemed to function as I would expect - but I have never actually used the mobile orbiter interface. Did the usual thing like started some media etc. Had a couple of crashes but have not pinpointed the conditions that caused it.

I will try and do a test session tonight and give you better feedback. Are there any test cases you want me to try out in particular?

regards
Darren
Title: Re: Java/ J2ME mobile orbiter
Post by: 1audio on April 21, 2008, 06:51:25 am
niz23 was right about the install problem. I followed the link he provided and that worked fine. I'm now stalled getting the phone to pair with LMCE. It finds the bluetooth dongle and LMCE finds the phone but they don't talk. Can I redirect through the wifi connection somehow? (My phone has WiFi and that would be preferable anyway, no automatic followme but the rest would work very well)
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 21, 2008, 04:19:19 pm
niz23 was right about the install problem. I followed the link he provided and that worked fine. I'm now stalled getting the phone to pair with LMCE. It finds the bluetooth dongle and LMCE finds the phone but they don't talk. Can I redirect through the wifi connection somehow? (My phone has WiFi and that would be preferable anyway, no automatic followme but the rest would work very well)
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
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: skerit 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.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: skerit 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.
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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

Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: coley on April 29, 2008, 11:35:08 am
Got round to installing this last night. 710rc1 on core and JavaMO on Nokia N95 - looking good  ;D
I cannot get the UI to fill the screen on the N95. I've selected 320x240 as the size and Symbian as the UI type - I assume this is the restriction as it has a lower resolution in brackets.
What do I need to edit to force the orbiter to be rendered full screen?

Also when regenerating the orbiter from the core the JavaMO runs in to an unhandled exception.
I can recreate this later if logs are required.

-Coley.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 29, 2008, 06:35:52 pm
i'd be interested in the trace from the phone itself. I need to get a mobile with on device debugging for java (e60 features that). The simulator supporting real comms over bluez has problems in other areas.

Regarding the size, i simply chose 240x320 for my n73

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: coley on April 29, 2008, 10:51:24 pm
d'oh! thanks, specifying the resolution the right way round helps!
The N95 should have ODD but think it needs symbian/carbide dlls on PC side.
Can the jar file be built with extra dbg when it throws an exception?

-Coley.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 29, 2008, 11:09:56 pm
we could show a form with the exception...

you feel like playing a bit with java?

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: coley on April 30, 2008, 12:33:31 am
Quote
you feel like playing a bit with java?
yep can do if you want, where do I start?

-Coley.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 30, 2008, 10:41:03 am
Quote
you feel like playing a bit with java?
yep can do if you want, where do I start?

-Coley.

look at the code ;) if you have questions just ask..

there are multiple points were we catch exceptions. We should call a popup form with the to_string method of the exception.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: coley on May 01, 2008, 02:04:45 am
Quote
look at the code
;)thats what I thought the ans would be
Netbeans downloading....
will get back to you if I have probs compiling.

-Coley.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on May 01, 2008, 05:53:06 am
Quote
look at the code
;)thats what I thought the ans would be
Netbeans downloading....
will get back to you if I have probs compiling.

-Coley.

i only used VI and Make. Just install the Java SDK and WTK (wireless toolkit), then look at the Makefile and adapt the paths.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Rukus on May 07, 2008, 06:52:18 pm
Got it working.  Great work Hari!   Just one question.  How do i change the res so the menu can cover the whole screen.  I see some have been able to do, but they didn't mention how.

Thanks.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on May 07, 2008, 07:00:10 pm
Got it working.  Great work Hari!   Just one question.  How do i change the res so the menu can cover the whole screen.  I see some have been able to do, but they didn't mention how.

Thanks.

Just go to the orbiter section in the wizard of the pluto-admin web interface.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Techstyle on May 09, 2008, 02:02:04 pm
Hari,

Great work on this!!

Do you know if a template and the BD Patch is included in RC2?

Thanks
Jason (New to LinuxMCE)
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on May 10, 2008, 09:28:39 am
Hari,

Great work on this!!

Do you know if a template and the BD Patch is included in RC2?

Thanks
Jason (New to LinuxMCE)

it does not use a template atm. The BD patch is not yet in the release.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: samuelmukoti on May 14, 2008, 10:14:14 pm
hi,

Just for interest, any reason the BD patch is not yet in the main tree? And apearing in the RC releases? Is there issues with stability? Completion? Or is it just coz it didnt make the feature freeze? 

Just curious coz its such a valuable tool to have the JavaMO - how nice I'd would be when it works out if the box.

Kind regards,

Sam
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on May 14, 2008, 10:26:36 pm
the development for JavaMO was done entirely in the community tree.

As of right now, the community tree and the pluto tree are in the middle of being merged into one, and this has not yet been completed, and it wasn't completed in time for the 0710 release, so hari's BD patches didn't make it in.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on May 15, 2008, 08:01:58 am
Hi.
I have some problems with JavaMo that I discussed briefly with Hari some time ago (stability).
It seem that my phone "accidentally" work since I have not patched my BD and I can use JavaMo with some stability problems.

In order to get it more stable I believe I should install the patched BD.
Is the patched BD available as a deb somewhere? (my system is a AMD64)

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on May 15, 2008, 09:17:50 am
Hi,

Just wanted to add my vote for a deb with this.

Isn't this something that could be updated via the normal apt system? Given that it is stable enough, of course..

sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on May 16, 2008, 08:15:32 pm
sambuca.

Hi,

Just wanted to add my vote for a deb with this.

Isn't this something that could be updated via the normal apt system? Given that it is stable enough, of course..

sambuca

If you need the patched libBDCommon and haris debug tools compiled for AMD64 then pm me.
I managed to compile libBDCommon.so from the latest charon-merge source.
It seem that haris patch was already in the source I checked out (rev 20803). Hari can you confirm this?
(patch told med that the patch was probably there already)

To compile libBDCommon.so you will need to install ubuntu build tools and two additional devel libraries.

Do:
cd <linuxmce home direcory>
mkdir lmce_source
cd lmce_source
svn co http://svn.linuxmce.org/pluto/branches/charon-merge
sudo apt-get install build-essentials
sudo apt-get install libmysqlclient15-dev
sudo apt-get install libbluetooth2-dev
cd charon-merge/src/BD
make
You will end up with a libBDCommon.so.
sudo cp libBDCommon.so /usr/pluto/lib (rename original file first)
Restart core (probably not needed but the easy way yo be sure the new lib is loaded).

Above steps work on my hybrid core installed from RC1 dvd.

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on May 19, 2008, 01:49:27 am
It seem that haris patch was already in the source I checked out (rev 20803). Hari can you confirm this?
(patch told med that the patch was probably there already)
yeah, should be in. It's also in the pluto main trunk.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: FastPlymouth on May 23, 2008, 01:01:33 am
Hi Guys,


First off I'd just like to say great work Hari! A Java Orbiter is a great project that numerous users will benefit from!

I'm not at all familiar with Java - otherwise I'd offer my assistance, however I can do some testing :)

I have a Blackberry 8830 World Edition which I installed JavaMO on (using the instructions you posted about dumping the jar/jad on one's own webserver and updating the reference). It installed sucessfully, however when I click the icon the application bombs with:
Uncaught exception:
java.lang.NoClassDef FoundError.

Not sure what this means - I suppose I could have screwed up the install :)

Please let me know if this error means anything to you.


Thanks!
Ken
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on May 25, 2008, 03:35:24 pm
Hi Guys,


First off I'd just like to say great work Hari! A Java Orbiter is a great project that numerous users will benefit from!

I'm not at all familiar with Java - otherwise I'd offer my assistance, however I can do some testing :)

I have a Blackberry 8830 World Edition which I installed JavaMO on (using the instructions you posted about dumping the jar/jad on one's own webserver and updating the reference). It installed sucessfully, however when I click the icon the application bombs with:
Uncaught exception:
java.lang.NoClassDef FoundError.

Not sure what this means - I suppose I could have screwed up the install :)

Please let me know if this error means anything to you.


Thanks!
Ken
the next version will have better exception handling and show an sane error message. For now i guess (and ddamron has the same prob with his blackberry) it won't allow unsigned j2me applications access to the jsr082 stack.

The process of signing is not really cheap and therefore scheduled (if we can raise the funds) after the 1.0 version.

best regards,
Hari

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: FastPlymouth on May 25, 2008, 06:14:01 pm
Hi Hari,


Thanks! My BB did ask if I wanted to allow the unsigned application (AFAIK you can only do this when installing over-the-air) and I said yes. The installation then finished successfully. I'll keep playing with it and let you know what I find - I think this may have something to do with the address I specified for the JAR file in the JAD. I read a couple things online that lead me to believe it can't find the jar.


Regards,
Ken
Title: Re: Java/ J2ME mobile orbiter
Post by: scubidoo on June 12, 2008, 08:19:55 pm
hello all


i tryng javamo on windows mobile 6 on htc hermes

i installed javamo on the phone but tryng to execute give me this error

cant access jsr082

any ideia????


thank for the reply
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on June 12, 2008, 08:20:50 pm
Those phones do not have JSR082 which is the standard Bluetooth library for J2ME. Therefore this orbiter will not work with them.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: curtpm on June 17, 2008, 02:04:07 am
Hello everyone,

I have been in the cell phone game industry professionally for a few years now and i am VERY interest in working on this in my spare time.  I have worked on almost every model of phone from all over the world.  I also worked directly with T-Mobile and RIM to get BlackBerry games on the deck.  can someone point me to any more info on this project like a wiki or the source?

Thanks.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on June 17, 2008, 03:03:16 am
the source code is available elsewhere in this thread, alongside the rest of the code in svn.

I do recommend talking with us on the Chat forum, if you are interested in helping out with this code. We desperately need support for more phones.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: curtpm on June 17, 2008, 03:25:52 am
yeah i would love to help out i just want to start looking it over and get a feel for how its set up.  the only problem with using Blue tooth is that only a handful of phones support the JSR needed.  so i can see this only ever working for like a max of 40 different phones.
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on June 17, 2008, 05:21:03 am
That is today, yes.  As new models come out, more support for JSR082 will be added.  Even RIM supports it now.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on June 17, 2008, 12:43:33 pm
jsr082 should be supported by nearly every phone hitting the market since 2007.

The code can be found here: http://svn.charonmedia.org/home/hari/javamo
You need to have the Sun WTK installed, just adapt the path to it in the Makefile.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on June 18, 2008, 11:04:52 pm
Hi Folks,

new version released: http://vt100.at/javamo/

Bugfix release for the unhandled exception on dcerouter reload.

best regards and much fun,
Hari

EDIT: the provided libBDCommon.so is for LMCE0710 32bit
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on June 18, 2008, 11:14:16 pm
Hari.
Hi Folks,

new version released: http://vt100.at/javamo/

Bugfix release for the unhandled exception on dcerouter reload.

best regards and much fun,
Hari

EDIT: the provided libBDCommon.so is for LMCE0710 32bit

This is great. Keep up the good work.
Have you though about touch screens and how to handle them?

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.

At the moment I am trying to make it run on my new SonyEricsson P1i.
It install.
It start.
It connect to lmce.
But...
The keys on this phone is a bit different than most other phones so I am unable use javaMO at the moment.
Cannot select anything in the orbiter menus.


Will create a keyboard map with keycodes.jar to see what differs form ordinary phones.


/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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.     |
|-------------------|
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 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
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca 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
Title: Re: Java/ J2ME mobile orbiter
Post by: jondecker76 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!
Title: Re: Java/ J2ME mobile orbiter
Post by: tolkeinknoxy 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: tolkeinknoxy 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.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: tolkeinknoxy 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?..
Title: Re: Java/ J2ME mobile orbiter
Post by: tolkeinknoxy 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!
Title: Re: Java/ J2ME mobile orbiter
Post by: tolkeinknoxy 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
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones 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....
Title: Re: Java/ J2ME mobile orbiter
Post by: posde 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
Title: Re: Java/ J2ME mobile orbiter
Post by: MarcoZan 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
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man 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.
Title: Re: Java/ J2ME mobile orbiter
Post by: MarcoZan 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 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
Title: Re: Java/ J2ME mobile orbiter
Post by: gruffnuff 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/ (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


Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: Techstyle 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?
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man 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
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man 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. 
Title: Re: Java/ J2ME mobile orbiter
Post by: MarcoZan 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
Title: Re: Java/ J2ME mobile orbiter
Post by: hari 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
Title: Re: Java/ J2ME mobile orbiter
Post by: MarcoZan 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
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man on August 12, 2008, 09:00:14 am
Solved my problem with BD (thanks to Oliver!) and played a bit with JavaMO. With Symbian UI it works fine. I used  numeric keys to navigate. After that I tried Basic Skin with PDA resolution - 240 x 320. I navigated through menu using arrow keys and numeric buttons. But the reaction is very slowly and sometimes it went to wrong direction. Possible that kind of skin is not situated for module Orbiter. Or if there is a way to trace it I'll be happy to do that :)
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on August 12, 2008, 01:52:55 pm
that skin ISN'T well situated to the reaction model of the Mobile Orbiter, at all.

-Thom
Title: Can't get it working
Post by: Cylon7 on August 15, 2008, 09:05:13 am
I have a Nokia e62. Posde reports the JavaMO working on the e61, which is almost the same phone (only without wi-fi).

I'm using a Kinamax BT adapter, which is listed as Linux compatible, and reviews on NewEgg confirm it works in Linux.
http://www.kinamax.com/product/Item/BT-USB.htm (http://www.kinamax.com/product/Item/BT-USB.htm)
http://www.newegg.com/Product/Product.aspx?Item=N82E16833206001 (http://www.newegg.com/Product/Product.aspx?Item=N82E16833206001)

LMCE recognizes the phone, and sends the Bluetooth message with the Symbian .sis.

Per the instructions, I transferred the Java MO files (downloaded from vt100) to the phone, and installed it. (And put the new Bluetooth library on the Core.)

The application loads on the phone but just says "Waiting for Connection"; meanwhile the Media Director UI keeps showing in the upper left corner that the Bluetooth dongle keeps reloading. The log says this, over and over again (where XX:XX etc. is my phone's actual Mac address):

Code: [Select]
========== NEW LOG SECTION ==========
1       08/15/08 01:51:39       44 (spawning-device)    Starting... 30
1       08/15/08 01:51:39       44 (spawning-device)    Found /usr/pluto/bin/LaunchBluetooth_Dongle.sh
05      08/15/08 1:51:44.788            Inquiry started <0xb6790b90>
05      08/15/08 1:52:00.918            Inquiry complete
 <0xb6790b90>
05      08/15/08 1:52:00.918            Inquiry started <0xb6790b90>
05      08/15/08 1:52:00.918            Detected device mac: XX:XX:XX:XX:XX:XX link quality: 0 <0xb4dffb90>
05      08/15/08 1:52:00.920            About to connect to PlutoMO. We'll suspend scanning... <0xb578eb90>
05      08/15/08 1:52:00.921            Suspending scanning... <0xb578eb90>
Return code: 139
3       08/15/08 01:52:01       44 (spawning-device)    Device died... count=30/50 dev=44
Fri Aug 15 01:52:01 CDT 2008 died

sdptool browse gives me:
Code: [Select]
Inquiring ...
Browsing XX:XX:XX:XX:XX:XX ...
Service Name: AVRCP Target
Service Description: Audio Video Remote Control
Service Provider: Symbian Software Ltd.
Service RecHandle: 0x10000
Service Class ID List:
  "AV Remote" (0x110e)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 23
  "AVCTP" (0x0017)
    uint16: 0x100
    uint16: 0xf00

Service Name: Hands-Free Audio Gateway
Service RecHandle: 0x1000b
Service Class ID List:
  "Handfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 28
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Handfree Audio Gateway" (0x111f)
    Version: 0x0101

Service Name: Headset Audio Gateway
Service RecHandle: 0x1000c
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 29
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100

Service Name: SyncMLClient
Service RecHandle: 0x1000d
Service Class ID List:
  UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 10
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00000002-0000-1000-8000-0002ee000002)
    Version: 0x0100

Service Name: OBEX File Transfer
Service RecHandle: 0x1000e
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 11
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100

Service Name: Nokia OBEX PC Suite Services
Service RecHandle: 0x1000f
Service Class ID List:
  UUID 128: 00005005-0000-1000-8000-0002ee000001
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 12
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00005005-0000-1000-8000-0002ee000001)
    Version: 0x0100

Service Name: SyncML DM Client
Service RecHandle: 0x10010
Service Class ID List:
  UUID 128: 00000004-0000-1000-8000-0002ee000002
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 13
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00000004-0000-1000-8000-0002ee000002)
    Version: 0x0100

Service Name: Nokia SyncML Server
Service RecHandle: 0x10011
Service Class ID List:
  UUID 128: 00005601-0000-1000-8000-0002ee000001
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 14
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x00005601-0000-1000-8000-0002ee000001)
    Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10012
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 9
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100

Service Name: Dial-Up Networking
Service RecHandle: 0x10013
Service Class ID List:
  "Dialup Networking" (0x1103)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100

Service Name: Imaging
Service RecHandle: 0x10014
Service Class ID List:
  "Imaging Responder" (0x111b)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 15
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Imaging" (0x111a)
    Version: 0x0100


Someone earlier in this thread says they solved a similar problem by using another adapter, but I'd rather not do that - I already have these & they're listed as Linux compatible.

I went into KDE desktop, and manually got the phone paired. For a short while I was getting this, also repeating:

Code: [Select]
  5286  05      08/15/08 4:53:28.714            BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb5799b90>
  5287  05      08/15/08 4:53:28.714            Failed to connect to PlutoMO. We'll resume scanning <0xb5799b90>
  5288  05      08/15/08 4:53:28.714            Resuming scanning... <0xb5799b90>
  5289  05      08/15/08 4:53:28.767            Inquiry started <0xb679bb90>
  5290  05      08/15/08 4:53:29.630            Detected device mac: 00:18:C5:2B:3E:F5 link quality: 0 <0xb4f98b90>
  5291  05      08/15/08 4:53:29.635            About to connect to PlutoMO. We'll suspend scanning... <0xb5799b90>
  5292  05      08/15/08 4:53:29.635            Suspending scanning... <0xb5799b90>
  5293  01      08/15/08 4:53:29.940            received channel: 19
  5294   <0xb5799b90>
  5295  05      08/15/08 4:53:30.114            Can't connect RFCOMM socket XX:XX:XX:XX:XX:XX, channel 19 <0xb5799b90>
  5296  05      08/15/08 4:53:30.114            Waiting any operation with the socket to finish... <0xb5799b90>
  5297  05      08/15/08 4:53:30.114            BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb5799b90>
  5298  05      08/15/08 4:53:30.114            Failed to connect to PlutoMO. We'll resume scanning <0xb5799b90>

And in KDE Desktop - the Bluetooth connection icon will never stay blue for very long, sometimes only a half-second at a time.

Anyone have any ideas? Does anyone know what return code 139 is?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on August 15, 2008, 06:29:33 pm
the sdptool does not show the PlutoMO service. I'd assume you have no proper bluetooth access on the phone. The Bluetooth_Dongle then dies as there is nothing to connect to, when it finds the phone while scanning for the bluetooth address.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Cylon7 on August 16, 2008, 12:15:33 am
Yup you are right hari, I didn't notice that obvious missing entry in the sdptool browse after my late night last night.

It turns out that Cingular/AT&T put proprietary firmware on the e62, which prevents unsigned midlet applets from accessing the BT stack. Only Cingular can provide a proper unlock code, but all you have to do is call them & request it. It should arrive via email within 3-5 days. I'll update this posting to let people know. The e62's a good phone so I'm eager to get it working.

Thanks all,
7
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on August 29, 2008, 06:45:20 am
Still struggling to get the JavaMO working on my Blackberry. I have the app installed and it starts, and then just waits for a connection indefinitely. The core sees it and I go through the motions of letting the orbiter set up, regen, reload. But I then get the same thing, with the bluetooth repeatedly attempting to connect and failing. When I do sdptool, there is no PlutoMO service either:
Code: [Select]
linuxmce@dcerouter:~$ sudo sdptool browse
Inquiring ...
Browsing 00:1C:CC:4C:73:E5 ...
Service Name: AUDIO Gateway
Service RecHandle: 0x10001
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100

Service Name: Voice Gateway
Service RecHandle: 0x10002
Service Class ID List:
  "Handfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0105

Service Name: Advanced Audio
Service Provider: BlackBerry
Service RecHandle: 0x10003
Service Class ID List:
  "Audio Source" (0x110a)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 25
  "AVDTP" (0x0019)
    uint16: 0x100
Profile Descriptor List:
  "Advanced Audio" (0x110d)
    Version: 0x0100

Service RecHandle: 0x10004
Service Class ID List:
  "AV Remote Target" (0x110c)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 23
  "AVCTP" (0x0017)
    uint16: 0x100
Profile Descriptor List:
  "AV Remote" (0x110e)
    Version: 0x0100

Service Name: Phonebook Access PSE
Service RecHandle: 0x10005
Service Class ID List:
  "Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4
  "OBEX" (0x0008)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Phonebook Access" (0x1130)
    Version: 0x0100

linuxmce@dcerouter:~$

But the application permissions for the JavaMO applet say bluetooth is allowed... I seem to be able to pair in KDE desktop... any thoughts on what I'm doing wrong?
Title: Re: Java/ J2ME mobile orbiter
Post by: Cylon7 on August 29, 2008, 06:53:21 am
An update on my e62 for those interested...

I got the unlock code from Cingular - but apparently, fully functional, uncrippled unbranded US firmware for this phone does not exist. Nokia removed the phone from their online software updating application, due to contractual agreements with AT&T. People in NYC and Chicago report being able to take their phones to the Nokia flagship stores there, but apparently I'm S.O.L. with this phone. Thanks AT&T for crippling an open source phone. I'm switching to TMobile (and I swear AT&T's service has gotten worse since I called to ask what day my plan ends, hurry up October 25th).

& colinjones - what kind of Blackberry do you have? Just curious, I've ordered a Curve, which has built-in wifi. I'm hoping it will work. (The e62 also has built-in wifi, which of course was also crippled in AT&T firmware.)
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on August 29, 2008, 07:13:16 am
Its an 8310 Curve (no wifi).... just after I posted it suddenly started "working" kind of... sdptool browse now shows a Pluto service.. No idea what I did to get that, but I was force reloading and rebooting, and tinkering generally.. At that point the JavaMO suddenly sprang to life and I could see an Orbiter on the Blackberry. Much too small as I hadn't modified the Orbiter settings at that point and it appeared to hang the Blackberry, keys not responding etc. So I modified the screen size and orientation, regen'd/reloaded and restarted the phone.

Now i can see the Pluto service, but the log file indicates I am back to the continually dying device even though it can see the MAC address of my phone. Reboot my phone and core again, and still the same, return code 139 and the device keeps dying.... no idea why, it obviously can work, but I just don't seem to be able to keep it going... wish I knew what caused it to work briefly, 10 mins ago!
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on August 29, 2008, 07:20:13 am
arrgh! just did it again, seems to be when I execute the sdptool browse command! Suddently the blackberry prompts me that the dce router is trying to connect (both times it works, haven't seen this message any other time) and then the orbiter comes up...

Screen the right size this time, but can't really control it - changed screen once, but then seems to have locked up again, and lots of errors in the log again....

Code: [Select]
05      08/29/08 15:16:16.526           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:16.526           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:16.549           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:16.812           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:16.816           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:16.816           Suspending scanning... <0xb57b6b90>
05      08/29/08 15:16:16.872           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
01      08/29/08 15:16:16.962           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:17.026           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:17.026           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:17.026           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:17.026           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:17.026           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:17.027           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:17.027           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:17.139           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:17.200           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:17.200           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:17.200           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:17.200           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:17.200           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:17.269           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:18.194           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:18.198           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:18.198           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:18.426           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:18.484           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:18.484           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:18.484           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:18.484           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:18.484           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:18.493           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:18.724           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:18.727           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:18.727           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:18.964           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:19.025           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:19.025           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:19.025           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:19.025           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:19.025           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:19.121           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:20.176           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:20.179           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:20.179           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:20.407           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:20.465           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:20.465           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:20.465           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:20.465           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:20.465           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:20.473           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:20.587           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:20.590           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:20.590           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:20.757           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:20.817           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:20.817           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:20.817           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:20.817           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:20.817           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:20.885           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:20.928           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:20.931           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:20.931           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:21.143           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:21.206           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:21.206           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:21.206           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:21.206           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:21.206           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:21.225           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:23.960           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:23.963           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:23.963           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:37.562           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:37.626           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:37.626           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:37.626           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:37.626           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:37.626           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:37.665           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:37.987           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:37.990           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:37.990           Suspending scanning... <0xb57b6b90>
01      08/29/08 15:16:38.227           received channel: 19
 <0xb57b6b90>
05      08/29/08 15:16:38.285           Can't connect RFCOMM socket 00:1C:CC:4C:73:E5, channel 19 <0xb57b6b90>
05      08/29/08 15:16:38.285           Waiting any operation with the socket to finish... <0xb57b6b90>
05      08/29/08 15:16:38.285           BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb57b6b90>
05      08/29/08 15:16:38.285           Failed to connect to PlutoMO. We'll resume scanning <0xb57b6b90>
05      08/29/08 15:16:38.286           Resuming scanning... <0xb57b6b90>
05      08/29/08 15:16:38.385           Inquiry started <0xb67b8b90>
05      08/29/08 15:16:40.348           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
05      08/29/08 15:16:40.351           About to connect to PlutoMO. We'll suspend scanning... <0xb57b6b90>
05      08/29/08 15:16:40.351           Suspending scanning... <0xb57b6b90>
05      08/29/08 15:16:40.379           Detected device mac: 00:1C:CC:4C:73:E5 link quality: 0 <0xae7a8b90>
Title: Re: Java/ J2ME mobile orbiter
Post by: Cylon7 on August 29, 2008, 07:33:06 am
colinjones Who is your cell phone carrier? That log and those symptoms are pretty much the same as mine. Your phone may not allow the midlet to access the Bluetooth stack. I tried it on my roommate's AT&T Blackberry & also got the same result.
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on August 29, 2008, 09:28:55 am
As I say, twice now it has connected and gotten the first couple or orbiter screens, just doesn't seem to last. The provider is an Australian one, they don't lock or restrict the handset, so something else seems to be influencing it here.... hmmm...
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on September 05, 2008, 11:59:38 pm
OK, I've gotten further now - I can tail the BT dongle log and see it communicating with the mobile phone, sending screens and receiving keys.

I had to manually pair the device in KDE Desktop otherwise the phone just kept prompting for the dcerouter-0 pairing pin. But although the javamo screen comes up with the UI, and I can choose a screen like video, the initial screen and subsequent screen takes a very long time to display, and then the java applet just seems to crash and stop responding, and the log stops indicating any activity. I can't stop the applet, and in the end I have to turn the phone off and on again. Then it indicates there was an unhandled exception in the java applet and allows me to start it again. But the same behaviour.

The other thing is that the orbiter seem to stay permanently in **RUN_CONFIG** mode, and the device never registers. Is that right? I tried forcing it by setting the controlled by, room and entertainment area, turning off the reconfigure tick box and the resend VMC tick box then reloaded. Now it creates a device log file, but is obviously trying to start the Symbian pluto .sis file and failing... is this device even supposed to register and run that code when it is being used as the javamo?
Title: Re: Java/ J2ME mobile orbiter
Post by: JimmyGosling on September 17, 2008, 08:48:51 pm
Very interesting, I had the Nokia e62, which I hated, mostly due to the AT&T cripple.  I was actually kind of happy when it was run over.
Then I picked up the BB Curve 8310, which I love.  I have not been able to hook it up to LMCE yet though.  Obviously still some issues to get through.  I'll keep my eye on this thread though and most likely try it out on my phone to see if I get the same results.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on September 17, 2008, 11:51:49 pm
Code: [Select]
Core was generated by `./Bluetooth_Dongle -d 26'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7d131f6 in sdp_gen_tid () from /usr/lib/libbluetooth.so.2
(gdb) bt
#0  0xb7d131f6 in sdp_gen_tid () from /usr/lib/libbluetooth.so.2
#1  0xb7d181c8 in sdp_service_search_attr_req () from /usr/lib/libbluetooth.so.2
#2  0xb7d360f0 in sdp_lookup_pluto_rfcomm_channel (target={b = "\204\026=�\030"}) at sdpbrowse.cpp:50
#3  0xb7d35c0e in BDCommandProcessor_Linux_Bluetooth (this=0x8252840, sMacAddressPhone=@0xb5602e2c, sMacAddressDongle=@0xb5602e28, pDevice=0x824eb80) at BDCommandProcessor_Linux_Bluetooth.cpp:78
#4  0xb7d63eb9 in BDCommandProcessor_BluetoothDongle (this=0x8252840, pBluetooth_Dongle=0x8248b78, sMacAddressPhone=@0xb5602f9c, pPhoneDevice=0x824eb80) at BDCommandProcessor_BluetoothDongle.cpp:39
#5  0x08078f7f in DCE::Bluetooth_Dongle::CMD_Link_with_mobile_orbiter (this=0x8248b78, sMac_address=@0xb5603108, sVMC_File=@0xb5603104, sConfig_File=@0xb5603100, sCMD_Result=@0xb56030e0, pMessage=0x82526c0)
    at Bluetooth_Dongle.cpp:755
#6  0x080836f5 in DCE::Bluetooth_Dongle_Command::ReceivedMessage (this=0x8248b78, pMessageOriginal=0x82526c0) at ../Gen_Devices/Bluetooth_DongleBase.h:203
#7  0xb7aed655 in DCE::HandleRequestSocket::RunThread (this=0x8248b78) at HandleRequestSocket.cpp:174
#8  0xb7aed9b2 in BeginHandleRequestThread (HRqSock=0x8248b78) at HandleRequestSocket.cpp:31
#9  0xb79d646b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0xb783673e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) disassemble
Dump of assembler code for function sdp_gen_tid:
0xb7d131f0 <sdp_gen_tid+0>: push   %ebp
0xb7d131f1 <sdp_gen_tid+1>: mov    %esp,%ebp
0xb7d131f3 <sdp_gen_tid+3>: mov    0x8(%ebp),%edx
0xb7d131f6 <sdp_gen_tid+6>: movzwl 0x10(%edx),%eax
0xb7d131fa <sdp_gen_tid+10>: lea    0x1(%eax),%ecx
0xb7d131fd <sdp_gen_tid+13>: mov    %cx,0x10(%edx)
0xb7d13201 <sdp_gen_tid+17>: pop    %ebp
0xb7d13202 <sdp_gen_tid+18>: ret   
End of assembler dump.
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on September 18, 2008, 12:14:48 am
Hari, was that post directed at me? And if so, are you saying I should run that command?
Title: Re: Java/ J2ME mobile orbiter
Post by: kevkilroy on September 23, 2008, 10:14:46 am
Hi guys,

Just downloaded LMCE & very impressed so far - excellent work. However, I'm having trouble connecting my Nokia 6288 on Three (UK).

I've followed the instructions in the thread, replaced the libBDCommon.so in /usr/pluto/lib but the MIDlet just stays on 'waiting for connection'

I can do an sdptool browse & see the Pluto service (on channel 25). & the phone shows that it is paired/connected with dcerouter but it just stays there.

Any ideas?

Thanks in advance,

Kev.

p.s. I'm a Java programmer (JEE) so I will be downloading the source code asap & (hopefully) helping out if you still need some. Please reply to this if that is the case.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on September 23, 2008, 03:24:55 pm
Right now the j2me still needs some work with regards to offline operation (reading the VMC files that the orbiter plugin pushes to the phones etc.), but otherwise, it's relatively complete.

Hari right now has put it to the side, while he works on the improved ZWave driver and getting build servers functional for our next release.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: kevkilroy on September 23, 2008, 04:05:43 pm
Hi Thom,

Ok np, you can always pm me if you need any Java help.

Do you have any suggestions for helping me to debug why I cannot get past the 'waiting for connection' problem on my Nokia 6288?

Everything seems ok to me, since I can connect to dcerouter & my device shows as paired!

Grrr.

Thanks in advance,

Kevin.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on September 23, 2008, 09:27:33 pm
Hari?

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: socabomb on October 19, 2008, 03:25:37 am
hi guys,

I did a little research in regards to javamo compatibility.  I was directed to this page https://developer.sprint.com/view_devices.do?device=79542#, which lists the samsung instinct as have the attributes listed below.  The problem is that I can easily upload jar/jad applications to the phone without error, but when trying to do so with the javmo jar/jad files i get "invalid content" and an error code of 907.  any suggestions would be appreciated.  with this phone you can not transfer the file to the phone via usb cable. any input??? thank you guys in advance 

j2me characteristics:
Java support (Yes/No) Yes
Java Version (list) v3.1 Partial
Sprint J2ME Requirements (v 3.0, 3.1) v3.1 Partial
Sprint Application Management System (AMS) Requirement (v 3.0, 3.1) v3.1 Partial
Audio Codec Support (audio/) audio/midi,audio/mpeg,audio/qcelp,audio/x-wav,audio/acc,audio/amr, wma
Canvas Display size (Height x Width) 240 x 412
Device Classification (Vision/Camera/Multimedia/Business) Multimedia
External LCD Size (Height x Width) No
Full Screen Display size (Height x Width) 240 x 432
Image Capture type (JPEG/BMP/PNG/etc.) JPEG
Input Capabilities (Keypad, Qwerty, Touch Screen) Touch Screen
Java Heap Size (KB) 15 Mbytes
Key press simultaneously (Yes/No) No
Maximum Image Capture Resolution (height x width) 240 x 412
MIDlet can run in background (Yes/No) Yes
MIDP 1.0 / CLDC 1.0 (Yes/No) No
MIDP 2.0 / CLDC 1.1 (Yes/No) Yes
Minimum Image Capture Resolution (height x width) 240 x 320, 96*128 in Java
Protocol Support (http, https, rtsp, etc.) Http, Https, RTSP
Restrictions on JAR size (KB) Unlimited
Runtime Memory (KB) 15 Mbytes (max 5 apps)
Usable Pixel dimensions (w x h) 240 x 432
Video Codec Support (video/) video/x-pmd,video/mp4
Optional supported Java packages
JSR-75 (File Connection) (Yes/No) Yes
JSR-75 (PIM) (Yes/No) Yes
JSR-82 (Bluetooth) (Yes/No) Yes
JSR-118 (required for Vision devices) (Yes/No) Yes
JSR-120 (Text Message) (Yes/No) Yes
JSR-135 (MultiMedia) (Yes/No) Yes
JSR-139 (CLDC) (required for Vision devices) (Yes/No) Yes
JSR-177 (Security-Crypto) (Yes/No) Yes
JSR-179 (location API) (Yes/No) Yes
JSR-184 (3D-graphics) (Yes/No) No
JSR-185 (JTWI) (Yes/No) Yes
JSR-205 (WMA 2.0) (Yes/No) No
JSR-211 (Content Handler) (Yes/No) No
JSR-226 (Scalable vector graphics) (Yes/No) Yes
JSR-234 (Advanced Mobile Media API) (Yes/No) Yes
JSR-248 (MSA SubSet) (Yes/No) Yes(except JSR 205, JSR184)
JSR-248 (MSA Full Stack) (Yes/No) No
MVM (Multi-tasking Virtual Machine) (Yes/No) TBD
MVM or Single Instance VM: TBD
QJAE (Yes/No) Yes
Qualcomm Location API (Yes/No) Yes
Sprint PCS Java Class Extensions (v1.3, 2.0, 2.1) 2.2
Sprint Device Status API (Yes/No) Yes
Sprint Device External LCD API (Yes/No) Yes
Sprint Media v1.0 Extension (Yes/No) Yes
Sprint Muglet v1.0 Extension (Yes/No) Yes
Sprint System v1.0 Extension (Yes/No) Yes
Sprint System v2.0 Extension (Yes/No) Yes
Sprint System v2.1 Extension (Yes/No) Yes
Sprint Location Extension API (Yes/No) Yes

Title: Re: Java/ J2ME mobile orbiter
Post by: cadman97 on October 25, 2008, 08:09:46 pm
Hari,

Just got a T-mobile G1. Would like to help out with porting it to android. I have some help on my end. Catch me on IRC. Figured it was time to get my feet wet.

Mike
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 09, 2008, 05:04:40 pm
new source location: http://svn.linuxmce.org/svn/people/hari/javamo/
Title: Re: Java/ J2ME mobile orbiter
Post by: dlewis on November 09, 2008, 06:12:01 pm
has anyone done any work on getting something on the blackberry?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 09, 2008, 06:13:10 pm
this runs on some 'berries
Title: Re: Java/ J2ME mobile orbiter
Post by: fearingsept on November 25, 2008, 09:27:38 pm
Runs on the Black Berry 8830 but not very smoothly. I have to hit the ALT button to preform any of the number functions and when I hit C to go back nothing happens. Eventually it locks up. Most of the time I have to power down the phone and back up again to exit the JavaMO
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on November 25, 2008, 09:47:08 pm
I had the same experience...
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 26, 2008, 10:31:35 am
yeah, this are only minor additions and glitches to fix. I've done all the jsr82 stuff, implemented the needed bits for PlutoVIP in Java, changed Bluetooth_Dongle, ...

sorry guys, but nobody cares to make a simple key translation routine depending on the phone type. Repeated keys also do not work.
WTF does nobody jump on this? It took me 4 weeks (besides a day job) to come up with the proof of concept. I really do not understand why nobody continues my work. I even documented on phone debugging instructions on the Wiki..

Either way, /me goes back hacking Z-Wave

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 26, 2008, 01:53:58 pm
I did some tweaks to the JavaMO code a few days ago.
* Changed image quality
 It seems that transferring a 100k + image over bluetooth takes too much time. Changing the image quality setting from 100 (png) to 30 radically improved responsiveness. Image size is now below 10k, and usually around 6k.
* Added quite a bit of logging
 Trying to work out the mysterious crashes and malfunctions of the JavaMO on my phone, I added more logging to find out where the problem is.
* Some more exception handling.
 Sometimes the JavaMO just quits on my phone. I suspect that some major unhandled exception causes this. I am trying to add handling and logging to work out this problem.
* Added a explicit exit button to the media list, as my phone had no way of returning from the media list.

Still to do (from a stability perspective):
* Debug the media list
  My phone shows no text for the audio list entries (the last entry has text), while other lists (pictures for instance) shows the texts correctly.
* Debug the connection stuff, to find out what makes the MO crash and/or drop the connection.

I don't feel that I am finished by any means, but if someone is interested in testing this version of the JavaMO, I can put it up for download.
Not sure if it will work on more phones, but the improvement in responsiveness might help a bit, and the extended logging might give us a better idea of what the problem might be.

I can also make a patch for the current SVN tree. Hari, can you comment on how (and when) you would like a patch?

I will continue working on the stability of the mo, and maybe some of the other issues mentioned here if I get the time. The repeated key presses might be the next thing on my list, but my primary goal is making it usable first. (What are the repeated key presses for anyway?)

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 26, 2008, 02:03:09 pm
I did some tweaks to the JavaMO code a few days ago.
cool!

Quote
* Changed image quality
 It seems that transferring a 100k + image over bluetooth takes too much time. Changing the image quality setting from 100 (png) to 30 radically improved responsiveness. Image size is now below 10k, and usually around 6k.
Yeah, good point. What stopped me from doing this is that jpg is not mandatory in J2ME. But it should be supported by most devices. On symbian you can change the resolution with the +/- keys, but I simply ran out of keys on the N73.. Maybe a config menu for that would be nice..

Quote
* Added quite a bit of logging
 Trying to work out the mysterious crashes and malfunctions of the JavaMO on my phone, I added more logging to find out where the problem is.
* Some more exception handling.
 Sometimes the JavaMO just quits on my phone. I suspect that some major unhandled exception causes this. I am trying to add handling and logging to work out this problem.
Did you see my notes about on device debugging in the wiki? Works pretty fine with the Nokia N/E series..

Quote
* Added a explicit exit button to the media list, as my phone had no way of returning from the media list.
great!

Quote
I can also make a patch for the current SVN tree. Hari, can you comment on how (and when) you would like a patch?
just send me a diff. When you continue to work on this we'll set up svn access for you.

Quote
I will continue working on the stability of the mo, and maybe some of the other issues mentioned here if I get the time. The repeated key presses might be the next thing on my list, but my primary goal is making it usable first. (What are the repeated key presses for anyway?)
you can activate "Follow me" with the repeated key press on the main menu (1 for lights, ...). It shows a big red "F" over the logos when activated.

you rock, best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: fearingsept on November 26, 2008, 02:53:33 pm
Quote
I don't feel that I am finished by any means, but if someone is interested in testing this version of the JavaMO, I can put it up for download.


I would be interested in trying it.
Can you give me a link for download?
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on November 26, 2008, 03:15:13 pm
sambuca.
I did some tweaks to the JavaMO code a few days ago.
* Changed image quality
 It seems that transferring a 100k + image over bluetooth takes too much time. Changing the image quality setting from 100 (png) to 30 radically improved responsiveness. Image size is now below 10k, and usually around 6k.
* Added quite a bit of logging
 Trying to work out the mysterious crashes and malfunctions of the JavaMO on my phone, I added more logging to find out where the problem is.
* Some more exception handling.
 Sometimes the JavaMO just quits on my phone. I suspect that some major unhandled exception causes this. I am trying to add handling and logging to work out this problem.
* Added a explicit exit button to the media list, as my phone had no way of returning from the media list.

Still to do (from a stability perspective):
* Debug the media list
  My phone shows no text for the audio list entries (the last entry has text), while other lists (pictures for instance) shows the texts correctly.
* Debug the connection stuff, to find out what makes the MO crash and/or drop the connection.

I don't feel that I am finished by any means, but if someone is interested in testing this version of the JavaMO, I can put it up for download.
Not sure if it will work on more phones, but the improvement in responsiveness might help a bit, and the extended logging might give us a better idea of what the problem might be.

I can also make a patch for the current SVN tree. Hari, can you comment on how (and when) you would like a patch?

I will continue working on the stability of the mo, and maybe some of the other issues mentioned here if I get the time. The repeated key presses might be the next thing on my list, but my primary goal is making it usable first. (What are the repeated key presses for anyway?)

br,
sambuca


Im interesting in testing this new version.
JavaMO is pretty stable on an SE P1i. No sudden crashes or so. At least not up until now.

Where can I get it?

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: sp00nhead on November 26, 2008, 03:22:27 pm
I've got a Nokia 6500 slide i can test it on too
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 26, 2008, 03:43:41 pm
You can download my modified version from http://hob.dyndns.org/javamo/ (http://hob.dyndns.org/javamo/). Just point your mobile browser to the JavaMO.jad file and it should download and install. Depending on your phone you will have to confirm the installation.

niz32, do you think the P1 is faster Java-wise than other phones? I think the Java speed might be a factor in the random crashes, since did not crash as much when it worked much better when I reduced image quality.

On a general note: This version does display more logging messages to start-up screen. While I probably will look into debugging my Sony Ericsson phone using a method similar to what hari described on the wiki, I think it might be useful to get some feedback from other phones without the users needing to set up any debugging.
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on November 26, 2008, 03:57:25 pm
sambuca.
You can download my modified version from http://hob.dyndns.org/javamo/ (http://hob.dyndns.org/javamo/). Just point your mobile browser to the JavaMO.jad file and it should download and install. Depending on your phone you will have to confirm the installation.

niz32, do you think the P1 is faster Java-wise than other phones? I think the Java speed might be a factor in the random crashes, since did not crash as much when it worked much better when I reduced image quality.

On a general note: This version does display more logging messages to start-up screen. While I probably will look into debugging my Sony Ericsson phone using a method similar to what hari described on the wiki, I think it might be useful to get some feedback from other phones without the users needing to set up any debugging.


Don´t know. Will get back to you on how its feeling now.
Haven´t used it for several month, though.

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on November 26, 2008, 04:06:17 pm
sambuca, wanted to say, thank you for your help on this. It's nice to see hackers starting to come in and help us flesh out the pieces.

*smile*

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 26, 2008, 04:26:50 pm
I should really thank you all for this great system.

That said, I hope I am able to contribute more in the future. Just figured this was a good starting point.

sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on November 26, 2008, 08:03:49 pm
sambuca.

I had to edit CLDC-1  to read CLDC-1.1
Otherwise my P1i complained (inompatible application).

Get back to you after I have done some tests.

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on November 26, 2008, 08:47:53 pm
sambuca.

It work pretty well now.
Very responsive, compared to previous versions.

For a SE P1i there is no need to patch libBDCommon.so which is a big pro.

There are still problems with connecting to lmce from the phone.
Sometimes it just not work (Waiting for connection).
This problem have nothing to do with libBDCommon, patched or not.
Have tried this before so. It is something else.

Things that do not work:
* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.

*Pause/Play button do not work when playing video. (have not tested audio yet).

*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...

Gonna do more tests tomorrow an see if audio work as expected.

Let me know how I can help.



/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 26, 2008, 10:17:36 pm
I had to edit CLDC-1  to read CLDC-1.1
Otherwise my P1i complained (inompatible application).

Oops, I probably mis-edited the jad file.

There are still problems with connecting to lmce from the phone.
Sometimes it just not work (Waiting for connection).
This problem have nothing to do with libBDCommon, patched or not.
Have tried this before so. It is something else.
Maybe the bluetooth_dongle log file can shed some light on this? As the JavaMO is just listening for incoming connections, I am not sure we can do anything to help the situation from this side.

Things that do not work:
* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.
The media list uses the phones default list implementation, so there is limited possibilities to change it. This, I guess, is to save data transfer. But it is possible to use an image for each item in the list (a small image on the left of the text I think). This might require some changes to the bluetooth_dongle to send the images, and of course would require much more data transferred. Our best chance would be to first display the list, and them add images to the list as they are transferred. I fear this is too much work to implement and would be dead slow (my 600+ list of artists already takes 5 seconds + to display).

*Pause/Play button do not work when playing video. (have not tested audio yet).
Can you check the bluetooth_dongle log file, and see if the button press is received from the phone?

*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...
Don't know if the JavaMO receives any notification about router reload. But anyway, I am trying to make it survive bluetooth reconnects, so this would probably help.

Another thing I remember that I changed in this version; Because the image transfer took so long, the screen saver kicks in, thus I wont see when the image was finally loaded. I added some code to flash the display to hopefully turn it on again. Let me know if it is for the better or worse.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 26, 2008, 10:22:26 pm
Things that do not work:
* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.
The media list uses the phones default list implementation, so there is limited possibilities to change it. This, I guess, is to save data transfer. But it is possible to use an image for each item in the list (a small image on the left of the text I think). This might require some changes to the bluetooth_dongle to send the images, and of course would require much more data transferred. Our best chance would be to first display the list, and them add images to the list as they are transferred. I fear this is too much work to implement and would be dead slow (my 600+ list of artists already takes 5 seconds + to display).
regarding TSCHAK datagrids will be rendered even by the Bluetooth_Dongle orbiter instance when they are bigger than one row. So this would be worth checking with the designer.

Quote
*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...
Don't know if the JavaMO receives any notification about router reload. But anyway, I am trying to make it survive bluetooth reconnects, so this would probably help.
I fixed an exception regarding that lately. Bascially I tried to still send stuff when the socket was already down and did not catch the exception. Dunno if there is something else to fix, as I have not really tested this.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: niz23 on November 27, 2008, 07:56:05 pm
sambuca.

When I hit play/pause button when watching/listening to media the following is written into bluetooth log file,

05      11/27/08 19:38:59.676           Ready to send a picture, size 8539, reporting signal strength 0 <0xb4018b90>
01      11/27/08 19:39:05.675           Current screen: 2165.0.0 <0xb4018b90>
05      11/27/08 19:39:05.676           Repeated keys list 31,30:  <0xb4018b90>
05      11/27/08 19:39:05.676           Ready to send a picture, size 8539, reporting signal strength 0 <0xb4018b90>
05      11/27/08 19:39:08.528           Received BD_PC_MouseEvent from PlutoMO. <0xb5066b90>
05      11/27/08 19:39:10.296           Inquiry complete
 <0xb6869b90>
05      11/27/08 19:39:10.297           Inquiry started <0xb6869b90>
01      11/27/08 19:39:11.676           Current screen: 2165.0.0 <0xb4018b90>
05      11/27/08 19:39:11.676           Repeated keys list 31,30:  <0xb4018b90>
05      11/27/08 19:39:11.676           Ready to send a picture, size 8539, reporting signal strength 0 <0xb4018b90>


when clicking on any of the main items like lights, media etc.
Everytime I back out back to main menu with C och if I click on the screen there is a big red F on top of media icon if that was the category I used last.

Playing audio I have manged to skip song twice.
But havent figured out a way to reproduce. Button work sometimes and sometimes not.

hehe. Found a way to make it work now.
I can skip songs by wating for the keylock to kick in. then unlock the phone.
After that I can skip song one or two times.
have to wait for the kelock to kick in again. And repeat.
Above does not work all the time, around 85% of the times I try it work.

Question is. Can we disable the keylock from javamo when it is running?

/niz23
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 28, 2008, 11:02:12 am
niz23

I guess the phone you are using (SE P1?) has a touch screen, since your log reports mouse events. I haven't looked at the bluetooth dongle side of things (yet), so I can't really say why it only works sometimes. Maybe someone with more knowledge of the BD can comment? Or maybe anyone that uses another touch screen phone can try it out too?

Haven't had as much time to work on this as I would have liked, but I have looked into optimizing the performance more. Anyone who has done similar knows it can be a pain. Which is how it is now. There are some buffer copies in the code that I am trying to take out, but I must have messed up cause now it wont display anything any more. I'll keep looking. I hope to have it sorted out and cleaned up enough to make a patch for hari maybe next week.

hari, when you say that repeated keypresses are not implemented, is that in the JavaMO, or in the BD library?

sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 28, 2008, 12:43:44 pm
I guess the phone you are using (SE P1?) has a touch screen, since your log reports mouse events. I haven't looked at the bluetooth dongle side of things (yet), so I can't really say why it only works sometimes. Maybe someone with more knowledge of the BD can comment? Or maybe anyone that uses another touch screen phone can try it out too?
I just report the mouse events back over BD when i receive them from the canvas.

Quote
hari, when you say that repeated keypresses are not implemented, is that in the JavaMO, or in the BD library?
in JavaMO, there are already "traces" of code for that. BD only wants one repeated event, but the canvas sends multiple as long as the key is pressed. This just needs to be filtered on the JavaMO side.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 28, 2008, 08:34:03 pm
Hey guys,

I'm a bit rusty as I havent touched java in about 1.5 years but did j2ee for 6+ so figured I'd play around a bit.  I know hari is more or less too crunched to get more done on this but is sambuca working on it?  If so could I get a copy of your current work set?  Or the one for the last jad you did with the noted improvements...

I've not done much mobile development(mostly web stuff for me) but was wondering about a more robust system using maybe jsr75(which would mean probably only smart phones) to not only do logging but allow config files etc to be read/written.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 28, 2008, 08:38:10 pm
last time when i've checked jsr075 support was not widely deployed. Plenty of mobiles support on device debugging, that is maybe the better approach. This should also help finishing the missing BD commands, they are not all handled.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 29, 2008, 12:35:37 am
Hi,

I've made some progress. I've implemented handling of repeated key presses. I uploaded the files to the same location as previously.
(Also added preliminary handling of the left soft key of my SE phone)

crudpuppy: I plan on making a patch for the current SVN as soon as I get the time.

My next task after that will be adding a working key mapping for my SE W580 phone (and K800i). I also have some problems with the orbiter disconnecting (both at the phone/server side and at the MD/client side), which I haven't solved yet.

Regarding jsr075:
If I understand correctly, won't the VMC need to store files on the phone also? (Maybe that's what you were referring to in your last post, hari.) Haven't really looked into what VMC is, but my understanding is that it uses WAP for communications and displays pictures stored at the phone. Am I imagining things, or am I on to something  ;)

sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 29, 2008, 09:45:47 am
for vmc we should use the datastore. I was refering to using jsr75 for spitting out logfiles.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 29, 2008, 02:34:08 pm
I'm not sure all of what I would put in it but I'm thinking of doing out a "Settings" set of screens.  One thing I know might be beneficial would be settings for the image quality etc for slower(or faster) bluetooth systems on certain phones.  I can use the datastore on the phone for storing these but was thinking for defaults about loading from a config.xml kinda thing....pretty sure I would have to use jsr075 to read that though. 

Sambuca,

What files are you/have you changed?  I could work seperatly as I'm not really changing the "server interaction" classes it more about UI for me right now.

Sambuca and Hari,

I would have to edit most all files to implement the jsr075 logging properly.  I would of cource create a logger class kinda thing and have it driven off the availablity and maybe a setting as well.  Would default back to doing printlns in case jsr075 not there. I don't want to run into issues with trying to merge or mess up each others code.

I work for myself and my schedule is a bit "wierd" so I prolly wont have much more extra time to do this stuff then you guys.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on November 29, 2008, 03:51:53 pm
I meant to write this yesterday, but got sidetracked....

VMC stands for VIP Menu Container, and has its roots in a Pluto business venture called PlutoVIP.

Huh? Let me explain.

Pluto had envisioned a system where PlutoMO was at the center. You would be at home, and your mobile orbiter would control the house. During the connection exchange, the core would send the latest VMC file. This would be the file for your house containing a set of predefined orbiter scenarios arranged into menus that you could use outside your home, so that you can for example, turn on and off your lights, view cameras, set security mode, etc.

Once you left the house and went into certain business and shopping establishments, the phone would sense VIPEstablishment installations, and your phone would connect with them in the same way that it connects with your house, and would send another VMC file to your phone, containing a nicely generated menu of things you could do in and out of the establishment. It would also notify the establishment that you were in the shop/business, and their computers would do the right thing and bring up customer data etc.

The VMC files themselves, could be done by each business using the VIPDesign program, to create graphic files with text and menu options that could dynamically change, which would point to WAP pages for your cell phone.

This would leave a number of VMC files on your phone, which you could select when you start the PlutoMO orbiter program, and would automatically be selected for you when you approached an establishment as part of the orbiter connect exchange.

Basically, this was a personalized business transaction system that never got past the proof of concept stage.

It is useful directly for our purposes for offline menu use, but we could extend it to other things as well.

-Thom


Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 29, 2008, 04:27:30 pm
So if I understadn VMC would for this/us be a great way to "cache" the menu systems?  If so I would think jsr075 would be good for that purpose as well.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on November 29, 2008, 04:29:39 pm
No, VMC is meant entirely for a different purpose, and is static by nature. Don't go there. *smack-hand-with-ruler* :P

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 29, 2008, 04:46:53 pm
ouch that smack hurt....sorry still new to the under pinnings of this all.  I've been using the system from end user side for a while...still don't get all the pieces running the back fully. 
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 29, 2008, 05:28:25 pm
crude puppy, please forget that jsr75. It is not supported by most phones. VMC shall go into the datastore.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 29, 2008, 06:27:53 pm
crudpuppy,

I did a few changes to some of the gui classes also. Also I added a common logging method, which could be extended more. I guess some static logger class might be the way to go. (I use this concept in J2EE). This would allow us to set it up to log to screen, file, another bluetooth connection, or whatever.

Btw, have you checked if there exists some kind of logging support already in J2ME?

Sorry if I am holding you up, I'll see if I can make a patch tomorrow.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 29, 2008, 07:05:52 pm
I've done similar in J2EE thus where I got the premise for a static class as well ;-)

J2ME has problems with any logging since even System.out is not usable in many mobile devices.  There are a couple of "log frameworks" out there including ones based on log4j

No biggie on the hold up...like I said my time to work is also limited so I can understand.  What changes did you make to the GUI classes so far?  This thing could really use a UI overhaul.   This is the first J2ME I've done and have already realized the UI side of it is rather a pain.  My rust from 2 years off from java is wearing off quick though...like riding a bike...hehe
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on November 30, 2008, 08:19:49 pm

Here is my patch, finally ;)
I threw together a quick static logging class, and switched my new logging to use it. I thought it might be easier to change it to a logging framework later on when done like this. Not sure how big these frameworks are, and if we want to add it to the MO though. We could probably disable them at build time however...
 
Code: [Select]
Index: Makefile
===================================================================
--- Makefile (revision 21508)
+++ Makefile (working copy)
@@ -28,6 +28,8 @@
  ${JAVAC} ${CFLAGS} com/linuxmce/javamo/BD_CP_ShowImage.java
  ${JAVAC} ${CFLAGS} com/linuxmce/javamo/BD_CP_ShowList.java
  ${JAVAC} ${CFLAGS} com/linuxmce/javamo/BD_CP_Dummy.java
+ ${JAVAC} ${CFLAGS} com/linuxmce/javamo/log/MOLogger.java
+ ${JAVAC} ${CFLAGS} com/linuxmce/javamo/log/Logger.java
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.${MIDLETNAME}
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.${MIDLETNAME}\$$DrawImageCanvas
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.${MIDLETNAME}\$$ListCommandListener
@@ -47,6 +49,8 @@
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.BD_CP_ShowImage
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.BD_CP_ShowList
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.BD_CP_Dummy
+ ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.log.MOLogger
+ ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.log.Logger
  mkdir -p output/com/linuxmce/javamo/res
  cp res/icon.png output/com/linuxmce/javamo/res
  cd output && jar cvfm ${MIDLETNAME}.jar Manifest.mf ./com
Index: com/linuxmce/javamo/BDCommandProcessor.java
===================================================================
--- com/linuxmce/javamo/BDCommandProcessor.java (revision 21508)
+++ com/linuxmce/javamo/BDCommandProcessor.java (working copy)
@@ -19,11 +19,14 @@
 
 package com.linuxmce.javamo;
 
-import javax.microedition.lcdui.*;
-import javax.microedition.midlet.*;
 import javax.microedition.io.StreamConnection;
+
+import com.linuxmce.javamo.log.MOLogger;
+
 import java.util.*;
-import java.io.*;
+import java.io.OutputStream;
+import java.io.InputStream;
+import java.io.IOException;
 
 /**
  * Class to process BDCommands
@@ -46,12 +49,13 @@
  this.mJavaMO = javamo;
  this.m_connection = connection;
  connected = true;
- commandQueue = new Vector();
+ commandQueue = new Vector(20);
  try {
  m_os = m_connection.openOutputStream();
  m_is = m_connection.openInputStream();
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, e.toString());
  }
  processorThread = new Thread(this);
  processorThread.start();
@@ -92,29 +96,25 @@
  m_os.flush();
  System.out.println("SendLong:" + output);
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, e.toString());
  connected = false;
  }
  }
 
- private long ReceiveLong() {
+ private long ReceiveLong() throws IOException {
  long output = 0;
  int a1,a2,a3,a4;
- try {
- a1 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a1);
- a2 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a2);
- a3 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a3);
- a4 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a4);
- output = (a1) + (a2*0x100) + (a3*0x10000) + (a4*0x1000000);
- System.out.println("ReceiveLong: long result: " + output);
- } catch (IOException e) {
- System.err.println(e);
- connected = false;
- }
+ a1 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a1);
+ a2 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a2);
+ a3 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a3);
+ a4 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a4);
+ output = (a1) + (a2*0x100) + (a3*0x10000) + (a4*0x1000000);
+ System.out.println("ReceiveLong: long result: " + output);
  return output;
  }
 
@@ -126,27 +126,41 @@
  }
  m_os.flush();
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, e.toString());
  connected = false;
  }
  }
 
+ private void readFully(byte[] data) throws IOException {
+ int i = 0;
+ while(i < data.length) {
+ int count = m_is.read(data, i, data.length - i);
+ if (count > 0) {
+ i += count;
+ }
+ }
+ }
+
  private byte[] ReceiveData() {
  int size;
- size = (int)ReceiveLong();
+ try {
+ size = (int)ReceiveLong();
 
- if (size < 0) {
- size=0;
+ if (size < 0) {
+ size=0;
+ connected = false;
+ }
+ } catch (IOException e) {
  connected = false;
+ size = 0;
  }
-
  byte[] data = new byte[size];
  try {
- for (int i=0;i<size;i++) {
- data[i] = (byte)m_is.read();
- }
+ readFully(data);
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BDCommandProcessor.ReceiveData() : " + e.toString());
  connected = false;
  }
  return data;
@@ -182,7 +196,6 @@
 
  public void run() {
  BDCommand l_BDResponseCommand;
-       int data;
  int counter = 0;
  long commandtype;
  BD_PC_WhatDoYouHave l_BD_PC_WhatDoYouHave;
@@ -199,7 +212,7 @@
  l_BD_PC_ReportMyVersion = null;
 
  /* set quality to 100 (png) */
- commandToSend = new BD_PC_SetImageQuality(100);
+ commandToSend = new BD_PC_SetImageQuality(30);
  commandToSend.ConvertCommandToBinary();
  sendCommand(commandToSend);
  commandToSend.ReceiveData(ReceiveData());
@@ -207,57 +220,75 @@
  commandToSend = null;
 
  while (connected) {
-
- if (commandQueue.isEmpty()) {
- if (counter++ == 5) {
- counter = 0;
- /* no outgoing commands in the queue, send BD_PC_WHAT_DO_YOU_HAVE */
- l_BD_PC_WhatDoYouHave = new BD_PC_WhatDoYouHave();
- l_BD_PC_WhatDoYouHave.ConvertCommandToBinary();
- sendCommand(l_BD_PC_WhatDoYouHave);
-
- /* if commandtype != 100 (BD_CP_WE_HAVE_NOTHING) build command and handle it */
- commandtype = ReceiveLong();
- if (commandtype != 100) {
- l_BDResponseCommand = buildCommandFromData(commandtype);
- l_BDResponseCommand.ReceiveData(ReceiveData());
- l_BDResponseCommand.parseCommand();
- l_BDResponseCommand.processCommand(mJavaMO);
- l_BDResponseCommand.ConvertAckToBinary();
- sendAck(l_BDResponseCommand);
- l_BDResponseCommand = null;
- } else {
- /* handle BD_CP_WE_HAVE_NOTHING */
- ReceiveLong();
- sendAck(l_BD_PC_WhatDoYouHave);
+ try {
+ if (commandQueue.isEmpty()) {
+ if (counter++ == 5) {
+ counter = 0;
+ /* no outgoing commands in the queue, send BD_PC_WHAT_DO_YOU_HAVE */
+ l_BD_PC_WhatDoYouHave = new BD_PC_WhatDoYouHave();
+ l_BD_PC_WhatDoYouHave.ConvertCommandToBinary();
+ sendCommand(l_BD_PC_WhatDoYouHave);
+
+ commandtype = ReceiveLong();
+ // If read return -1 (EOF) we should not try to do anything
+ if (commandtype >= 0) {
+ /* if commandtype != 100 (BD_CP_WE_HAVE_NOTHING) build command and handle it */
+ if (commandtype != 100) {
+ mJavaMO.addMessage("Got command " + commandtype);
+ l_BDResponseCommand = buildCommandFromData(commandtype);
+ l_BDResponseCommand.ReceiveData(ReceiveData());
+ l_BDResponseCommand.parseCommand();
+ l_BDResponseCommand.processCommand(mJavaMO);
+ l_BDResponseCommand.ConvertAckToBinary();
+ sendAck(l_BDResponseCommand);
+ l_BDResponseCommand = null;
+
+ // We got one command, lets see if there is anything else right away
+ counter = 5;
+ } else {
+ /* handle BD_CP_WE_HAVE_NOTHING */
+ ReceiveLong();
+ sendAck(l_BD_PC_WhatDoYouHave);
+ }
+ }
+ l_BD_PC_WhatDoYouHave = null;
  }
- l_BD_PC_WhatDoYouHave = null;
- // this.currentThread().sleep(100);
- }
- /* go to sleep to save power */
- try {
- processorThread.sleep(100);
- } catch (InterruptedException e) {
+ /* go to sleep to save power */
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BDCommandProcessor.run(): " + e.getMessage());
+ }
+ } else {
+ /* pop command from the queue */
+ commandToSend = (BDCommand) commandQueue.firstElement();
+ commandQueue.removeElement((Object) commandToSend);
+
+ /* send the command */
+ commandToSend.ConvertCommandToBinary();
+ sendCommand(commandToSend);
+ commandToSend.ReceiveData(ReceiveData());
+ commandToSend.parseAck();
+ commandToSend = null;
+
+ /* send what do you have without further sleeping after sending a command */
+ counter = 5;
  }
-
- } else {
- /* pop command from the queue */
- commandToSend = (BDCommand) commandQueue.firstElement();
- commandQueue.removeElement((Object) commandToSend);
-
- /* send the command */
- commandToSend.ConvertCommandToBinary();
- sendCommand(commandToSend);
- commandToSend.ReceiveData(ReceiveData());
- commandToSend.parseAck();
- commandToSend = null;
-
- /* send what do you have without further sleeping after sending a command */
- counter = 5;
+ } catch (IOException e) {
+ // Catch IOException, so we skip processing relying on received data
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTCommandProcessor.run() : " + e.toString());
+ connected = false;
+ } catch (Exception e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTCommandProcessor.run() : " + e.toString());
+ // Not necessarily disconnected, but we should probably restart
+ connected = false;
  }
-
-
  }
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BDCommandProcessor.run(): Not connected anymore");
 
  }
 
Index: com/linuxmce/javamo/BTServer.java
===================================================================
--- com/linuxmce/javamo/BTServer.java (revision 21508)
+++ com/linuxmce/javamo/BTServer.java (working copy)
@@ -37,6 +37,8 @@
 
 import javax.bluetooth.*;
 
+import com.linuxmce.javamo.log.MOLogger;
+
 /**
  * Bluetooth server for J2ME using JSR82
  */
@@ -119,7 +121,7 @@
  /* listen for connections */
  conn = notifier.acceptAndOpen();
 
- parent.showAlert("CONNECT",3000);
+ parent.addMessage("Connected");
 
  /* BD Command processor to handle commands */
  System.out.println("BTServer: starting BDCommandProcessor...");
@@ -132,16 +134,27 @@
  System.out.println("BTServer: waiting for BDCommandProcessor to finish...");
  m_BDCommandProcessor.processorThread.join();
  } catch (InterruptedException e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTServer.run() : " + e.getMessage());
  }
 
- m_BDCommandProcessor = null;
- conn.close();
- parent.showAlert("DISCONNECT",3000);
- parent.showForm();
-
  } catch (IOException e) {
  // wrong client or interrupted - continue anyway
- continue;
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTServer.run() : " + e.getMessage());
+ } finally {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "Disconnect!");
+ parent.showForm();
+ m_BDCommandProcessor = null;
+ if (conn != null) {
+ try {
+ conn.close();
+ } catch (Exception e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTServer.run() : " + e.toString());
+ }
+ }
  }
  // processor.addConnection(conn);
 
Index: com/linuxmce/javamo/JavaMO.java
===================================================================
--- com/linuxmce/javamo/JavaMO.java (revision 21508)
+++ com/linuxmce/javamo/JavaMO.java (working copy)
@@ -22,15 +22,8 @@
 import javax.microedition.lcdui.*;
 import javax.microedition.midlet.*;
 
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.StreamConnection;
-import javax.microedition.io.StreamConnectionNotifier;
-import javax.microedition.rms.*;
+import com.linuxmce.javamo.log.Logger;
+import com.linuxmce.javamo.log.MOLogger;
 
 /**
  * Java Mobile Orbiter for LinuxMCE/Plutohome
@@ -40,7 +33,7 @@
  */
 public class JavaMO
     extends MIDlet
-    implements CommandListener {
+    implements CommandListener, Logger {
 
  private Canvas mCanvas;   
  private Image mImage;
@@ -57,6 +50,8 @@
 
  mMainForm = new Form("JavaMO");
 
+ MOLogger.setLogger(this);
+
  /* check for jsr082 */
  try {
  Class.forName("javax.bluetooth.LocalDevice");
@@ -129,22 +124,22 @@
  } else {
  listActive = false;
  }
+ turnBackLightOn();
  }
 
  /**
  * Shows a list with media elements
  */
  public void showList(String[] list) {
- mList = new List ("Media", List.IMPLICIT);
- for (int i=0; i < list.length; i++) {
- mList.append(list[i], null);
- }
- // Command selectCommand = new Command("Select", Command.ITEM, 1);
- // mList.setSelectCommand(selectCommand);
+ mList = new List ("Media", List.IMPLICIT, list, null);
+ Command selectCommand = new Command("Select", Command.ITEM, 1);
+ mList.setSelectCommand(selectCommand);
  mList.setCommandListener(new ListCommandListener());
+ mList.addCommand(new Command("Exit", Command.BACK, 2));
+
  Display.getDisplay(this).setCurrent(mList);
  listActive = true;
-
+ turnBackLightOn();
  }
 
  /**
@@ -176,6 +171,8 @@
  return 32; /* BUTTON_Asterisk_CONST */
  case Canvas.KEY_POUND:
  return 33; /* BUTTON_Pound_CONST */
+ case -6: // Sony Ericsson left soft key
+ return 30; // Soft left key
  case -7: /* mpp sim right soft key */
  case -8: /* Nokia N73 C key */
  return 26; /* BUTTON_Phone_C_CONST */
@@ -247,6 +244,8 @@
  * Canvas class to show the image on the screen and report keystrokes back
  */
  private class DrawImageCanvas extends Canvas {
+ private int lastKeyCode = 0;
+
  public void paint(Graphics g) {
  g.drawImage(mImage, 0, 0, Graphics.TOP | Graphics.LEFT);
  }
@@ -260,18 +259,24 @@
  }
 
  protected void keyReleased(int keyCode) {
+ if (lastKeyCode == 0) {
  //if (keyCode > 0) {
  // commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateKey(keyCode),0));
  commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateKey(keyCode),2));
  System.out.println("keyReleased " + ((int)keyCode));
  //} else {
  // System.out.println("keyReleased action " + getGameAction(keyCode));
- //}
+ //}
+ }
+ lastKeyCode = 0;
  }
 
  protected void keyRepeated(int keyCode) {
- commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateRepeatedKey(keyCode),1));
- System.out.println("repeatedKeyReleased " + ((int)keyCode));
+ if (keyCode != lastKeyCode) {
+ lastKeyCode = keyCode;
+ commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateRepeatedKey(keyCode),1));
+ System.out.println("repeatedKeyReleased " + ((int)keyCode));
+ }
 
  }
  protected void pointerPressed(int x, int y) {
@@ -281,6 +286,24 @@
  }
  }
 
+ public void addMessage(String message) {
+ while (mMainForm.size() > 20) {
+ mMainForm.delete(mMainForm.size()-1);
+ }
+ mMainForm.insert(0, new StringItem(null, message));
+ }
+
+ public void log(int level, String message) {
+ addMessage(message);
+ }
+
+ /**
+ * Turns backlign on
+ */
+ public void turnBackLightOn() {
+ Display.getDisplay(this).flashBacklight(1);
+ }
+
  /**
  * Command listener for the list
  */
@@ -289,7 +312,7 @@
  public void commandAction (Command c, Displayable d) {
  long item = -1;
  List list;
- if (c == List.SELECT_COMMAND) {
+ if (c == List.SELECT_COMMAND || c.getLabel().equals("Select")) {
  listActive = false;
  list = (List) d;
  item = list.getSelectedIndex();
@@ -299,6 +322,10 @@
  commandProcessor.addCommandToQueue(new BD_PC_SelectedFromList(item));
  // send enter
  commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(5,2));
+ } else if (c.getLabel().equals("Exit")) {
+ listActive = false;
+ // Send C key
+ commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(26,2));
  }
  }
  }
Index: com/linuxmce/javamo/log/Logger.java
===================================================================
--- com/linuxmce/javamo/log/Logger.java (revision 0)
+++ com/linuxmce/javamo/log/Logger.java (revision 0)
@@ -0,0 +1,6 @@
+package com.linuxmce.javamo.log;
+
+public interface Logger {
+
+ public void log(int level, String message);
+}
Index: com/linuxmce/javamo/log/MOLogger.java
===================================================================
--- com/linuxmce/javamo/log/MOLogger.java (revision 0)
+++ com/linuxmce/javamo/log/MOLogger.java (revision 0)
@@ -0,0 +1,20 @@
+package com.linuxmce.javamo.log;
+
+public class MOLogger {
+
+ static public final boolean DEBUG = true;
+ static Logger logger;
+
+ static public void setLogger(Logger logr) {
+ logger = logr;
+ }
+
+ static public void log(int level, String message) {
+ if (logger != null) {
+ logger.log(level, message);
+ } else {
+ System.out.println(message);
+ }
+ }
+
+}

Hari, just ask if you see anything fishy.

crudpuppy, the UI displayed is mostly just images sent over bluetooth from the MD. As such, you need to use the HADesigner to change the orbiter GUI. If that was what you were thinking of?

br, sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 30, 2008, 08:33:26 pm
Hari, just ask if you see anything fishy.
I'll commit it anyway so I can use trac to see the changes :-)

Committed revision 21528.
Committed revision 21529.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 30, 2008, 08:39:15 pm
Well here is my thing on the UI...I know the images for the UI of controlling the media director are basically hard set coming from the media directory themselves.  I was thinking though there would be a great use for a "Intro" page that allowed a user to goto a settings page(for key mappings and/or whatever else we may think of), an about page(with tribute to hari :-P), and then a connect button etc....With the current setup would be problamatic to put into place a "Settings" area with it connecting immediatly to the orbiter.  I may be crazy but that is the idea.

Let me know thoughts.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 30, 2008, 08:44:03 pm
when the phone has a bluetooth_dongle instance connected, we should do what the server tells us. Without connection, we should show the VMC menu. We could add a special "Setup" option there.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on November 30, 2008, 08:44:43 pm
Well, this would be an extension of the VMC page currently on the Symbian and Windows Smartphone orbiters.

On the standard PlutoMO orbiters when offline, you get the opportunity to select a VMC to use. It could be extended here.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on November 30, 2008, 08:45:17 pm
HAHAHAHHAHA, we typed that at exactly the same time!

;-)

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 30, 2008, 08:51:07 pm
@sambuca,

great work, thank you very much, really appreciated. If you manage to lurk around in #linuxmce-devel the next days we can talk about svn access,

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on November 30, 2008, 08:58:20 pm
I'm going to need to see some docs on what the heck VMC is all about.  I searched the wiki and saw notta...anywhere else I should look?  I know you gave that explaination but it isnt enough for me to fully understand.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 30, 2008, 09:02:29 pm
@crudpuppy, i pointed you to those directories in src/ on our svn (BD, Bluetooth_Dongle, VIPShared) in irc. You really need to look at those to get a better picture. This is basically a menu container system for "offline" actions.

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on December 07, 2008, 12:55:01 pm
Hi again,

I've made some more improvements to the JavaMO. Since last time, I've added basic phone detection, allowing for easy definition of different key mappings. Currently, I've added key mappings for Nokia (the same as was in the original MO), and for SonyEricsson. The SE mappings are made for the W580i phone, I'll try to add for the K800i soon also.
 I've used one class per phone brand (for now). It may be a bit of overkill, but I often find that it is best to separate things at the beginning, because it is easier to expand on it later without creating a mess :)

I also found out that the W580i (and quite a few other SE phones according to SE support) does not allow a list to have more than 255 items in them. This explains my problem with all blank entries(besides the last one). To work around this, I implemented a filtered list. The new list checks the number of items, and if it is above a particular size, it displays a list of the first characters in the list. When you select one character, you will see the list of the items starting with that character.
 I think this list also improves navigability of media on the MO. I'd like to get some feedback on this list, both from a usability perspective but also regarding stability (better/worse/same as the plain list).

The list should also handle UTF-8 character now.

New version uploaded to http://hob.dyndns.org/javamo/ (http://hob.dyndns.org/javamo/). Enjoy :D

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on December 07, 2008, 01:25:56 pm
cool work. drop into #linuxmce-devel sometime and we'll set up svn access for you.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: crudpuppy on December 07, 2008, 02:31:35 pm
Good deal Sambuca,  I on the other hand have gotten zero done.  Last week was a nightmare here with my house closeing that was suppose to be this past friday now this upcoming friday.  I do finally have the clear to close from the mortgage company though...so hopefully this week should be smoother.  Also trying to wrap up a bunch of work projects before end of year to start with clean slate in 09.
Title: Re: Java/ J2ME mobile orbiter
Post by: MarcoZan on December 08, 2008, 04:45:50 pm
Hi Sambuca

I gave a try to both versions of your JavaMO on my Nokia E65.

One thing that I noticed immediately is that when I go to media submenu, choices are "shifted" i.e I see:

1 TV      2 Video     3
4 Audio  5 Pictures  6
7 Docs   8 Playlist   9
*Manage
 Drives


Basically there's nothing on square numbered 3, but if I press 3 key I go to audio submenu, and if I press 4 I go to Pictures submenu, and so on ....

This is the same in both versions.
In the second version I can't change room, i.e. if I press the key to change room nothing happens (in your first version this was anyway working fine).

When navigating Videos, I see the list by filename, when navigating audio I see list by performers.

When navigating media list (video or audio) pressing back button bring me to initial menu and not one level back.

When playing any media, if I press red button to stop it I exit app instead.

I'm still playing around with huge list, but probably I don't have enough songs to trigger the "special list".

Good job anyway, MO seems faster than previous one and seems more stable.

HTH

Marco



Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on December 08, 2008, 10:00:52 pm
Hi Marco,

thanks for the feedback.

The shifted media menu is strange. I think this menu is rendered by the bluetooth_dongle orbiter, so I don't think it has anything to do with the JavaMO itself.

I added device independent key mappings in the second version, so maybe I introduced a bug, although I cannot see any difference to the Nokia key mappings. I'll look into it some more. Maybe you can run the keycodes app that hari posted a while back and report your key codes?

Did the back button take you back one level from the media list before? On hari's original JavaMO or on my first version?
The media list needs more than 250 items to display as a filtered list.

The red button should not exit the app. (if this is not the phones default behaviour?) Maybe you can report the keycode for this key from the keycodes app. also, so that I can add it?

br,
sambuca


Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on December 08, 2008, 10:10:30 pm
Will it be possible to paint the list view on an orbiter display in a similar fashion to the Symbian Orbiter?

There is a very important reason for this,

Bluetooth_Dongle code has a special case to handle data grids that only have a single column. They are sent as text to the MO, and the MO is supposed to render them onto the canvas, keeping the background of what's behind it.

It was used in early versions of the TV EPG, and I will be using it in my IM client to be able to display a data grid, with a text box below for entering IMs.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on December 08, 2008, 10:35:10 pm
isn't that done by the dongle proxy orbiter? if we receive a pic with 2 grids on it, fine..

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on December 08, 2008, 11:23:39 pm
not two grids, a grid with two or more columns

if you get two one column grids, you get those grids as text.... but that's not my point...

my point is, you can't just assume that the grid is the only thing on screen. It needs to be rendered within the specified bounds of the datagrid designobj on that screen.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on December 08, 2008, 11:37:53 pm
Thom,

currently its not possible to do what you describe, the JavaMO only displays a list using the phone's default list implementation (usually this fills the whole screen, at least on the SE phones I've seen).

I am looking into the VMC stuff these days, so sooner or later it might be possible ;-) Haven't started coding anything yet, just trying to get a basic understanding of the components to decide how to structure the code.

sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on December 08, 2008, 11:50:37 pm
hmm..

i know what tschak is talking about. The original code rendered the menu on the phone. I took the comfort in the proof of concept and just used the J2ME list widget. Ideally one would render the menu on the phone and not use the widget. That would allow overlay with the picture that also gets sent. For now I ignore the picture when the list display is active. The Symbian MO just draws the list box over the received image.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on December 09, 2008, 10:57:40 am
Hari,

good to know. I will try to implement the functionality of the Symbian orbiter as closely as possible in Java, so hopefully this will be possible.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on December 17, 2008, 11:37:20 pm
Hi

Just a quick update. I've implemented a new datagrid/list for the JavaMO. This is the same datagrid that the original PlutoMO uses. Since I've never used the PlutoMO, I can't know for sure if is 100% identical, but I think it should be at least close. I trust you to give me feedback  ;) Anyway, its much better than the previous device-specific list...

Additionally, I've started to add some support for the VMC stuff. No much yet, but more will come. Most obvious is the startup screen. It's what I think is the first screen on the PlutoMO (keep in mind, I've only studied the code, not used it). From here you can currently view the about, the log and exit the application. In the future you will see a list of the VMC items on the phone, and be able to delete them and start them.

After a few seconds the MO should receive a connection from the bluetooth dongle, and it will display the orbiter as before.

The new JavaMO.jar can be downloaded from the same location as before.

best regard,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on December 17, 2008, 11:52:53 pm
guy you rock! I already lost confidence that we will find a skilled person to continue this work!! If you ever come to Berlin, send me a PM, we'll have some nice drinks :-)

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on December 18, 2008, 12:40:38 am
sambuca, if you'd like, i can work with you on the vmc bits.

I have a copy of VIPDesign for windows that you can run to see what's possible.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on December 18, 2008, 10:26:56 am
hari:Thanks for the offer, I'll keep that in mind. :-)

tschak909: It is quite possible that I might need some help when I really start to dig into the vmc. For the datagrid, it was quite easy to write the code using the original as a template. But I am sure that the vmc stuff is more complicated.
  I haven't made a plan for what to do next, but I think I still have some coding to do before starting to touch the vmc itself. Still need to make saving and loading of VMC files on the phone work, and there is also more BD commands to implement.

Anyway, I'll just have to see what the holidays bring this year, time to work on the MO or family stuff  :)

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on January 05, 2009, 10:08:04 pm
Another update;

I've made another small improvement to the JavaMO. The image quality and signal strength screens are now working. The MO still starts with a default quality of 30, but I'm thinking about a better way. Maybe we should detect if the MO supports JPG and if not, we must use quality 100 (PNG), but if it does, we can start with the 70 setting, which seems to be default for all MOs.

On a side note, it is possible to compress PNGs also isn't it? If the BD Orbiter could send us PNG images instead, we could allow all phones to use the quality setting...

Key press handling has also been improved, it should now correctly detect and send keys in the "repeated key" list. For instance volume up and down keys in most media screens. It might need some sort of control on how many commands is sent, though, now it sends a bunch of commands, and from the logs on the MD I can see it still receiving them long after the key was released.
How does the PlutoMO fare in this regard?

Probably missed some things in this short summary. Anyone interested should check the svn  ;)

The latest version is available at http://hob.dyndns.org/javamo/ (http://hob.dyndns.org/javamo/). I would appreciate some test reports :-)

best regards,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: Viking on January 08, 2009, 11:52:00 pm
Hi,

I am into testing some things before i setup a linuxmce in my new house. And right now I am trying to get my HTC Diamond into talking to linuxmce. But unfortunatly the JavaMO from hari (vt100.at/javamo) tells me java.lang.NoClassDefFoundError when I am starting it. And the newer version from Sambuca tells med that the application is not developed to work with this phone.

It runs Window Mobile 6.1 with Esmertec's Jbed Java VM. If that helps.

Thanks for spending your time working on LinuxMCE :)

Greetings
Viking
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on January 09, 2009, 04:04:03 pm
Viking,

I've seen reports around the Internet that this phone don't support bluetooth access from Java (jsr-82). Maybe thats the problem with hari's version. Don't know about my version though. I think I kept the application within the MIDP 2.0 spec, so you should make sure that the phone supports that. But it might just be that it's the bluetooth support that triggers the error, although it should have displayed the same message as hari's version.

best regards,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on January 09, 2009, 08:10:03 pm
you need j2me midp2.0/cldc1.1 and jsr082 for both versions of the javamo. Is your Java VM a real J2ME VM with all those features?

br Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: _if_ on January 10, 2009, 11:03:43 am
Hey guys,

tried to install the new version on N80, but it shouts: "Program not compatible with phone"

However I was able to install one of the former versions last time. What could that reason be?

thanks
IF
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on January 10, 2009, 01:15:06 pm
Hi IF,

Please try again, it should work now.

Seems I didn't fix a problem with a typo in the JavaMO.jad file properly the last time.  :(

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: _if_ on January 10, 2009, 01:27:31 pm
thanks alot! I tried it, but now it says: "unvalid jar data" ...even if I open the .jad file it throws the same error message.

the updated file is in the same link as above, right?

thanks for any help
Title: Re: Java/ J2ME mobile orbiter
Post by: socabomb on January 10, 2009, 10:39:35 pm
I had to edit the manifest in the either the jar or jad to match each other to get it to work with my phone. If i remember properly, the cldc in one of them was incorrect and one other thing. Bottom line they need to match;)
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on January 10, 2009, 11:02:44 pm
ok, not my day, apparently.

I used a new jad file when I fixed the previous problem (wrong CLDC version, as socabomb mentions), and the new file has different JAR file size than the published one... I'll try to get it right the first time around next time   :P

br
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on January 11, 2009, 12:38:42 am
that whole manifest/jad is crap. I'd prefer a single package with a single manifest in it :-)

br Hari

ps: sambuca: keep up the great work!
Title: Re: Java/ J2ME mobile orbiter
Post by: Viking on January 11, 2009, 12:46:25 am
Hallo Hari and Sambuca,

I now tried the new version from sambuca and it now said the same as hari's version.
I actually remeber searching the internet befor getting the phone and it was mentioned in the sprecs that it would support jsr-82. But if it doesn't that would be shitty :( I will have to look if there are solutions for this ...

Thanks for now and keep up the good work both of you :)

Greetings
Viking
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on January 22, 2009, 08:26:12 pm
I did a preliminary check-in of my current VMC code. It is still very much a work in progress.

Still much to do, though I am not sure whether all the code in the original mo is used for lmce. Maybe someone can shed some light on this?

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on January 22, 2009, 08:35:07 pm
i think zaerc and tschak use the original symbian orbiter. Maybe thay can tell about the available features..
br, Hari

ps: keep up your great work!
Title: Re: Java/ J2ME mobile orbiter
Post by: Zaerc on January 22, 2009, 10:44:35 pm
To be honest I have never even looked at the code so far. :-[  But I might be able to answer some of the more basic questions about the (everyday) usage.  And I'd be glad to lend a hand where I can, you guys are doing an awesome job!
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 02, 2009, 08:24:27 pm
Hi Guys!

I'm trying to get back into the swing of things here..
I have had Hari's version running on my blackberry 8330 Curve, it's amazing what upgrading the OS will give you :)

Sambuca:  I tried to get your version working, maybe I'm missing something, it installed fine over the web..
when I attempt to start it, I get:

Error starting JavaMO:
Symbol 'CommandListener.SELECT_COMMAND' not found

any ideas?
Phone is midp2.0/CLDC1.1/JSR082 (Hari's version worked for about 2 keypresses)

Thanks in advance!  Glad someone picked this project up!

All the best,

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 02, 2009, 09:04:51 pm
i'd assume this is related to the list stuff, but that is just a blind guess.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on February 03, 2009, 04:30:20 pm
Hi Dan,

Would you mind trying again? I changed the reference to SELECT_COMMAND, so maybe it works now. I cannot see anything wrong with the code, but maybe some devices are a bit picky.

(It was the list, hari :) The phone tries to access CommandListener.SELECT_COMMAND when I use the SELECT_COMMAND reference in the code. The class extends List and implements CommandListener, the SELECT_COMMAND is in the List class)

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: ddamron on February 03, 2009, 10:45:09 pm
Okee Dokee, will try tonight, and report back. :)

Update:  attempted again, now I can't install it,

I get: 904 JAR size mismatch
jar size does not match MIDlet-Jar-Size attribute

Getting closer, I can feel it in my bones :)

HTH,

Dan
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on February 04, 2009, 09:34:28 am
Hmm,
As far as I can see, the jar file size is the same as the Midlet-Jar-Size. It also installs fine on my SonyEricsson phone. Maybe there is some caching/proxy in your providers network?
At least I can't think of anything else at this moment.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on February 09, 2009, 09:02:06 pm
Ok, I got time to do some more work on the JavaMO.  8)

I fixed some issues related to disconnect/reconnects. I ran into them when testing follow me. It disconnected, but it never succesfully reconnected. I'm not sure but perhaps hari's version handled reconnects better.
Anyway, it should work now.
For those who like to read log files etc, it is now possible to close the VMCViewer/Orbiter, open the log, close it and then reopen the viewer with a "Orbiter" menu entry when it is connected.

The new version has been published on my website. (see previous post for url  ;D )

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 09, 2009, 10:36:44 pm
Ok, I got time to do some more work on the JavaMO.  8)
cool!

Quote
I'm not sure but perhaps hari's version handled reconnects better.
I would not bet on that one :-)

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on February 15, 2009, 02:04:44 pm
Hi everyone,

I've added parsing of the configuration file to the MO and opening of the web browser from within the VMC viewer. This should enable much more of the original MOs functionality (set scenarios, view alerts etc.).

But it does not inform you of any events like (I think) the original mo does, because Java does not allow call interception, which is what the Symbian orbiter uses to alert you. (LMCE calls your phone, and the PlutoMO intercept it, and does its magic). Please correct me if I am wrong ;)
It would be possible to intercept SMS in the JavaMO, but it would require a change in LMCE to send SMS instead of calling your phone. I don't even know if most phone providers support sending SMS via land line/VOIP?

Time to bring out your phones and start testing  :D

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on February 15, 2009, 02:09:35 pm
Great work sambuca!! I'll give it a try on 0810.

best regards,
Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: WhateverFits on March 11, 2009, 04:21:16 am
I just tried to load the JavaMO on my Windows Mobile phone running the intent Java MIDlet Manager. It started and gave the error about JSR-82: Can't access JSR082Device : intent JTE. I was reading up on the Bluetooth stack and JSR-82 compatibility after looking at this and found http://code.google.com/p/bluecove/ ,  is a JSR-82 implementation. I was wondering if that could be linked into this jar, providing the necessary bits to allow my phone to work. I'm pretty weak on Java so I'm not sure if it is possible or I just spewed rubbish.
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on March 11, 2009, 07:58:44 pm
From what I can see from a quick look on the web page, it is enough to add the bluecove jar to the javamo's classpath. This could be done in the Manifest file, if I remember correctly. I'll see if I can make a second jad/jar pair which references the bluecove.jar.
I haven't got a clue about installing the bluecove jar in the phone though. You'll have to install it yourself, if nobody else on the forum has a clue..

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: WhateverFits on March 12, 2009, 03:37:21 pm
Very nice. I'll look for any manifest info for the intent Java MIDlet manager. I'll post what I find. Might take a while as I have a 10 page essay due at school. The audacity of them to require I do work for a degree.
Title: Re: Java/ J2ME mobile orbiter
Post by: rocketlynx on March 24, 2009, 06:59:06 am
I have a Blackberry 8330 Curve (Verizon).  I'd like to get involved and and help if I can.  How do I get the files for my LinuxMCE Core/Hybrid and get started.  I also have access to an LG Dare touchscreen phone, if anything is going on for that platform I'd be more that willing to test and report on Mobile Orbiter templates for that phone too.  Any information would be appreciated.
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on March 24, 2009, 09:54:16 am
Hi rocketlynx,

To get started with the Java mobile orbiter (using 710), you should get the replacement bluetooth dongle (libBDCommon.so) from http://vt100.at/javamo/ (http://vt100.at/javamo/), install it on the MD. The JavaMO can be installed on your phone by using the mobile browser and going to http://hob.dyndns.org/javamo/JavaMO.jad (http://hob.dyndns.org/javamo/JavaMO.jad).

Please note that there are several things that may prevent you from using the JavaMO. Some phones require the application to be signed to allow it to install/run. Some phones does have bluetooth support, but it is not accessible from java (JSR-82 must be supported). And probably other problems to.

Check out http://wiki.linuxmce.org/index.php/JavaMO (http://wiki.linuxmce.org/index.php/JavaMO) for more information, it also has a link to a phone database where you can check if your particular model has the required support.

I haven't got around to finalize the device template yet. But this won't prevent you from testing and using the JavaMO. The template is going to allow a user to select the type of orbiter once a phone is detected by the MD, and have LMCE automatically transfer the JavaMO application to it. I still have to test the actual transferring of the application a bit more.

br,
sambuca

Title: Re: Java/ J2ME mobile orbiter
Post by: rocketlynx on March 24, 2009, 10:10:16 am
I have JavaMO installed on my BlackBerry 8330 (Verizon).  Dongle sees phone and phone sees dongle but phone keeps getting message "Enter numeric passkey for dcerouter-0:"  Where do I find the passkey for the dcerouter or is there another way to pair the bluetooth dongle on the core/hybrid to the javaMO on the Blackberry?  I've look at the bluetooth dongle's logs and all of the setup for the dcerouter but I can not find the passkey in question or any info in the wikis.

Any help would be greatly appreciated.
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on March 24, 2009, 10:24:36 am
Sound like you are trying to pair the phone with the dongle. Don't think that is necessary. When you start the JavaMO app on your phone, the dongle should connect to it and display the orbiter.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: rocketlynx on March 26, 2009, 05:38:39 am
Thanks for the help!  Found my mistake.  Works but I can't exit the Orbiter by closing the app because it locks up the whole phone.  It then requires a battery removal and typical full Blackberry reboot.  I found a temporary alternate way by switching apps to Bluetooth setup on the BB Curve and disabling Bluetooth right out from under it.  The loss of Bluetooth connectivity lets the javaMO app shut down without corrupting the the phones OS.  I know it's not perfect and I'm not complaining.  If I can do anything to help and test out the BB Curve (8330 - verizon) used as a Orbiter I'll be glad to do it.

Also, there was no problem using the BB's browser and dowloading the javaMO app and installing it.  It just informed me that it was a third party app and allowed me to say do it and it installed without any problems.

Thanks again,
Charles
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on March 26, 2009, 08:44:58 am
Good to know it works, but it must be a pain to shut it down like that. I find it a bit strange that a Java app can bring down the OS like that, it's supposed to be completely separated.

But I have noticed some instances where the JavaMO seems to hang when closing it on my SE also. I think it is because it is busy receiving(or waiting, if bad connection) for data. I will put it on my list and check it out. Maybe it will help on your problem too.

On my phone, I can press the "switch app" button, and select "End app" (or similar) to forcefully close the MO. Maybe there is some similar function on the BB?

Edit:
One other thing: How are the key mappings? If you find that you prefer a different key mapping, you could download hari's keycode jar (see some other post in this thread), and list the keycodes for each key, and what you would like it to do.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: jeangot on March 28, 2009, 03:33:19 am
Hello,

I am trying to run sambuca's JavaMO 0.2.0 on a Samsung Omnia i910 running Windows Mobile 6.1 and using an Esmertec 20080912.5.1 VM.

I am getting the error:
the MIDlet could not be instantiated
java.lang.NoClassDefFoundError

Any tips? Is it a VM issue, and if so, which version of Esmertec's VM has this been confirmed working with?

Thanks!

Jean
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on March 28, 2009, 11:07:26 pm
Hi,

It seems some class is not supported in the VM you are using. The MO is made to work with the CLDC 1.1/MIDP2.0. Other than the standard classes, it uses dynamic class loading to check the availability of extra classes (like jsr-82, bluetooth support) before loading them.

I have no experience with the Esmertec VMs, so I cannot shed any more light on it. I did not find any information about the JSR support for this VM either, while doing a short net search...

Anyone else using similar devices?

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: jeangot on March 29, 2009, 12:38:44 am
Sambuca,

thanks for the quick reply. I'm running this on windows mobile. There is no java installed by default, so I have to install my own Java VM first.
Thanks to your advice I have now used an IBM MIDP 2.0 Java Emulator 2.3 from here http://www.gadgetech.info/treo/tips/java/IBM%20MIDP%202.0%20Java%20Emulator%20V2.3.CAB instead of Esmertec, and the JavaMO now starts, but dies with "Can't access JSR082". I understand that this is now about bluetooth access and will read the other posts in this thread that talk about this error to learn more.

Can this JavaMO also be used over IP (wlan or data service on the phone), as opposed to bluetooth? If so would there be any way to get past this bluetooth problem if one does not intend to use the MO via bluetooth anyway?

If anyone knows other VMs (in the form of a CAB file) where the JavaMO runs on windows mobile, please share. At least I guess we demonstrated that the JavaMO does not like Esmertec VMs.

Jean
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on April 07, 2009, 10:08:52 pm
Hello all,

I did some fixes to JavaMO dealing with closing the application. This relates to properly closing all streams and connections that are used, and waiting for various threads to end before exiting.

This should fix some of the reported problems with exiting the JavaMO. It still is a bit slow to exit when you try to exit when you just went out of range of the dongle. I think this is related to the connection waiting for EOF, which is out of our control. Takes a few seconds to get the EOF, but then the app should exit fine.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on April 07, 2009, 10:15:43 pm
maybe if you caused the phone to flip back to its main screen while waiting for the other threads to exit?

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on April 07, 2009, 11:12:08 pm
Good suggestion. It improves the experience. I don't think it will work on all phones, the phone has to have real multitasking for it to work. But I am pretty sure most new phones have this.

I find it slightly illogical from a user perspective, as it seems that the app has closed, while it still runs for a few seconds. But I think the improvement in this case warrants that.

br,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: ProfFalken on April 10, 2009, 02:15:10 pm
Does anyone know if the patch for 7.10 needs to be applied to 8.10 as well? I've got an SE K750i with the JAD installed from hob.dyndns.org and although the client fires up without issue, my Hybrid Core isn't seeing the phone.

Do I need to do anything?

It's a generic USB BT Dongle hanging off the back of the server if that makes a difference, and the dongle is recognised by LMCE, I just can't get the JavaMO to work. :o(

Cheers,

XM.
Title: Re: Java/ J2ME mobile orbiter
Post by: ProfFalken on April 10, 2009, 09:00:45 pm
meh, should have read the logs. 

Quote
+Not starting device 43 Bluetooth Dongle - binary "LaunchBluetooth_Dongle.sh" is not found.

Does this need to be logged as a bug against 8.10?

XM.
Title: Re: Java/ J2ME mobile orbiter
Post by: ProfFalken on April 10, 2009, 10:49:22 pm
evidently not, an aptitude update and aptitude install pluto-bluetooth-dongle followed by a reboot seemed to do the trick!

It's now working, nice work guys!

M.
Title: Re: Java/ J2ME mobile orbiter
Post by: posde on April 10, 2009, 11:41:00 pm
meh, should have read the logs. 

Quote
+Not starting device 43 Bluetooth Dongle - binary "LaunchBluetooth_Dongle.sh" is not found.
Does this need to be logged as a bug against 8.10?

Yes, it should be filed as a bug. Plugging in a bluetooth USB stick, should automatically install the pluto-bluetooth-dongle. If it does not, it is a bug, imho
Title: Re: Java/ J2ME mobile orbiter
Post by: ProfFalken on April 11, 2009, 08:13:37 am
Logged as bug 167:

http://svn.linuxmce.org/trac.cgi/ticket/167 (http://svn.linuxmce.org/trac.cgi/ticket/167)

PF.
Title: Re: Java/ J2ME mobile orbiter
Post by: Steve on April 11, 2009, 07:30:34 pm
I got javamo to install on my phone. I am getting can't access JSR082. Where would I look to troubleshoot. If you need more info let me know.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on April 11, 2009, 07:35:55 pm
This means your phone does not have the necessary extensions to allow bluetooth access from your Java Virtual Machine. Sorry, your journey ends here with that phone.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: ProfFalken on April 11, 2009, 09:18:09 pm
I got javamo to install on my phone. I am getting can't access JSR082. Where would I look to troubleshoot. If you need more info let me know.

Which phone are you using? If you check the wiki there is a link to a list of phones that support JSR-082.  My current mobile is a Samsung SGH-U900 SOUL that advertises that it support Bluetooth and Java, yet you can't install 3rd party apps and it doesn't have JSR-082.  I'll never buy Samsung again. 

I've obtained a free SIM from one of the networks here in the UK and I'm using my old SE-K750i as my MO - it works a treat!

PF.
Title: Re: Java/ J2ME mobile orbiter
Post by: Steve on April 11, 2009, 11:28:40 pm
I am using the LG Rumor. It rus java so I said what the hell i'll give it a shot. I figured it would may run it even though it was not in the list. I was thinking maybe I misread something in the wiki or forgot to install something extra that maybe is not included in the wiki. Thats ok i'll just scrap that idea and wait till my contract with my service runs out and get one that is known to work. but at the price they are now, i just cant budget for one of them now. Thanx for the feedback.
Title: Re: Java/ J2ME mobile orbiter
Post by: Purplexus on April 21, 2009, 08:32:11 am
To expand further on the Samsung Omnia..

It is a phone which is to be an IPhone killer.
Since the IPhone won't allow for 3rd party apps to be installed easily...
why not focus on the Omnia and get it as not only an orbiter... but also the best way to control linux MCE

Since the FIIRE cheif is no longer available, I have been looking for a way to get a bluetooth gyration remote
for linux and the Omnia seems to have everything required to replace the Cheif with the follow ME option.

The omnia has all of the following built in...   Accelerometer, Bluetooth, Touchscreen,JAVA + FLASH CAPABLE, does it need more to control linux MCE as well as the cheif?

Help me out here if I am wrong.
Title: Re: Java/ J2ME mobile orbiter
Post by: ProfFalken on April 21, 2009, 09:49:25 am
The omnia has all of the following built in...   Accelerometer, Bluetooth, Touchscreen,JAVA + FLASH CAPABLE, does it need more to control linux MCE as well as the cheif?

It needs Java JSR-082.

My phone has Java and can run all sorts of downloadable apps, but because it doesn't support JSR-082, I can't use it as a MO.

I've just googled the Omnia and I can't find any reference to JSR-082 support, although I did find a comment on one site stating that Samsung do _not_ use JSR-082 so you may be out of luck.

On the up-side, it appears to run Windows Mobile, so you may not need JSR-082 as you caould run the windows MO natively, although you'd need to confirm this.

PF.

Title: Re: Java/ J2ME mobile orbiter
Post by: hari on April 21, 2009, 12:12:09 pm
Since the IPhone won't allow for 3rd party apps to be installed easily...
hu? Installing apps from the store is straightforward...
br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on May 30, 2009, 08:25:32 am
Am running 0810 as you all know,..

I am using a Samsung Behold (TGH-919). App installs and runs, no error messages, but screen is white:

My symbian Nokia N70 works great, and handles just fine until....
 
Bluetooth dongle dies repeatedly with segfault:

--- Relevant Backtrace ---

(gdb) bt
#0  0xb7dfe98f in sdp_gen_tid () from /usr/lib/libbluetooth.so.3
#1  0xb7dfe093 in sdp_service_search_attr_req () from /usr/lib/libbluetooth.so.3
#2  0xb7e1cd9b in sdp_lookup_pluto_rfcomm_channel (target={b = "3\206�220$"}) at sdpbrowse.cpp:50
#3  0xb7e1c872 in BDCommandProcessor_Linux_Bluetooth (this=0xb3253080, sMacAddressPhone=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb5391e54 "�200\215�\224f���$\b\t"}}, sMacAddressDongle=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb5391e58 "\224f���$\b\t"}}, pDevice=0x9b140a8) at BDCommandProcessor_Linux_Bluetooth.cpp:78
#4  0xb7e4b796 in BDCommandProcessor_BluetoothDongle (this=0xb3253080, pBluetooth_Dongle=0x9a7df30, sMacAddressPhone=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb5391fb8 "�200\215�B!9�,�t�@�\t(f�\t�177\215��200\215�\224f��pf�\t\\�t\bf�\t�\220\215�Z\"9��$\b\t"}}, pPhoneDevice=0x9b140a8) at BDCommandProcessor_BluetoothDongle.cpp:39
#5  0x08078b46 in DCE::Bluetooth_Dongle::CMD_Link_with_mobile_orbiter (this=0x9a7df30, sMac_address=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb5392220 "�200\215�\202"}}, sVMC_File=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb539221c "d\220\215��200\215�\202"}}, sConfig_File=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb5392218 "�216\215�d\220\215��200\215�\202"}}, sCMD_Result=@0xb53920e4, pMessage=0xb3252920)
    at Bluetooth_Dongle.cpp:755
#6  0x08083806 in DCE::Bluetooth_Dongle_Command::ReceivedMessage (this=0x9a7df30, pMessageOriginal=0xb3252920)
    at ../Gen_Devices/Bluetooth_DongleBase.h:203
#7  0xb7bcbc57 in DCE::HandleRequestSocket::RunThread (this=0x9a7df30) at HandleRequestSocket.cpp:174
#8  0xb7bcb547 in BeginHandleRequestThread (HRqSock=0x9a7df30) at HandleRequestSocket.cpp:31
#9  0xb7ab150f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0xb790aa0e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) quit
The program is running.  Exit anyway? (y or n) y

------------------------------------

10   05/30/09 2:19:16.799      Start of scan loop <0xb62b3b90>
10   05/30/09 2:19:16.799      Attached to BT adapter: hci0   20:13:4A:30:40:90
 <0xb62b3b90>
05   05/30/09 2:19:16.799      Inquiry started <0xb62b3b90>
10   05/30/09 2:19:17.011      Sending Have nothing command <0xb4ab0b90>
10   05/30/09 2:19:17.142      Analyzing device 00:24:90:C0:86:33. Existing 0x93e2f50, connected 0  <0xb62b3b90>
10   05/30/09 2:19:17.142      Bluetooth dongle intercepted new device.  We're not connected.  Proceeding like normal. <0xb62b3b90>
10   05/30/09 2:19:17.142      Adding device to map1: N/A m_mapPhoneDevice_Detected size is now: 2 <0xb62b3b90>
10   05/30/09 2:19:17.142      NewDeviceThread started <0xb20ffb90>
05   05/30/09 2:19:17.142      Detected device mac: 00:24:90:C0:86:33 link quality: -72 <0xb20ffb90>
10   05/30/09 2:19:17.142      Socket::SendMessage type 2 id 4 from 84 to -1001 <0xb20ffb90>
10   05/30/09 2:19:17.144      pthread_create returned with 0 <0xb62b3b90>
10   05/30/09 2:19:17.155      Receive string: MESSAGE 155            <0xb52b1b90>
10   05/30/09 2:19:17.155      Received MESSAGE 155            0x9143478 device: 84 <0xb52b1b90>
10   05/30/09 2:19:17.155      Received Message type 1 ID 60 from 9 to 84 (device: 84) resp 0 <0xb52b1b90>
05   05/30/09 2:19:17.155      About to connect to PlutoMO. We'll suspend scanning... <0xb52b1b90>
05   05/30/09 2:19:17.155      Suspending scanning... <0xb52b1b90>
10   05/30/09 2:19:17.155      start of const 00:24:90:C0:86:33 <0xb52b1b90>
10   05/30/09 2:19:17.247      The scanning is suspended. We'll ignore the results of this scan <0xb62b3b90>
01   05/30/09 2:19:17.317      received channel: 19
 <0xb52b1b90>
05   05/30/09 2:19:17.342      Can't connect RFCOMM socket 00:24:90:C0:86:33, channel 19 <0xb52b1b90>
05   05/30/09 2:19:17.342      Waiting any operation with the socket to finish... <0xb52b1b90>
05   05/30/09 2:19:17.342      BDCommandProcessor_Linux_Bluetooth is destroyed. <0xb52b1b90>
05   05/30/09 2:19:17.342      Failed to connect to PlutoMO. We'll resume scanning <0xb52b1b90>
05   05/30/09 2:19:17.342      Resuming scanning... <0xb52b1b90>
10   05/30/09 2:19:17.346      Start of scan loop <0xb62b3b90>
10   05/30/09 2:19:17.347      Attached to BT adapter: hci0   20:13:4A:30:40:90
 <0xb62b3b90>
05   05/30/09 2:19:17.347      Inquiry started <0xb62b3b90>
10   05/30/09 2:19:18.036      Sending Have nothing command <0xb4ab0b90>
10   05/30/09 2:19:18.503      Analyzing device 00:24:90:C0:86:33. Existing 0x93e3408, connected 0  <0xb62b3b90>
10   05/30/09 2:19:18.504      Bluetooth dongle intercepted new device.  We're not connected.  Proceeding like normal. <0xb62b3b90>
10   05/30/09 2:19:18.504      Adding device to map1: N/A m_mapPhoneDevice_Detected size is now: 2 <0xb62b3b90>
10   05/30/09 2:19:18.504      NewDeviceThread started <0xb20ffb90>
05   05/30/09 2:19:18.504      Detected device mac: 00:24:90:C0:86:33 link quality: -74 <0xb20ffb90>
10   05/30/09 2:19:18.504      Socket::SendMessage type 2 id 4 from 84 to -1001 <0xb20ffb90>
10   05/30/09 2:19:18.507      pthread_create returned with 0 <0xb62b3b90>
10   05/30/09 2:19:18.527      Receive string: MESSAGE 155            <0xb52b1b90>
10   05/30/09 2:19:18.527      Received MESSAGE 155            0x9143478 device: 84 <0xb52b1b90>
10   05/30/09 2:19:18.527      Received Message type 1 ID 60 from 9 to 84 (device: 84) resp 0 <0xb52b1b90>
05   05/30/09 2:19:18.527      About to connect to PlutoMO. We'll suspend scanning... <0xb52b1b90>
05   05/30/09 2:19:18.527      Suspending scanning... <0xb52b1b90>
10   05/30/09 2:19:18.527      start of const 00:24:90:C0:86:33 <0xb52b1b90>
10   05/30/09 2:19:18.611      The scanning is suspended. We'll ignore the results of this scan <0xb62b3b90>
Return code: 139
3   05/30/09 02:19:18   84 (spawning-device)   Device died... count=2/50 dev=84
Sat May 30 02:19:18 EDT 2009 died

------------------------------

00:24:90:C0:86:33 is the samsung phone.

This seems to happen regardless of whether the phone is running JavaMO or NOT... wtf?!

am scratching my head on this one.. wth?

Any thoughts ?

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on May 30, 2009, 01:01:46 pm
did you pair phone and dongle?

br, Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on May 30, 2009, 05:10:43 pm
how? every time i do a scan, it never finds the computer. *scratch-head*

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: Aletha Emmy on July 04, 2009, 12:15:49 am
As you may know LinuxMCE supports smartphones under Symbian OS 1st edition, Windows Mobile 2003 and Treo as mobile Orbiters to control your home. It uses Bluetooth to communicate with smarthome system. So, it’s too difficult port every time the code to the new version of mobile OS.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on July 04, 2009, 06:39:08 am
Althea, if I may correct you,

Speaking as one of the developers actually working on the code:

The Mobile orbiter itself, is a very simple program that grabs images from the server, and transmits a simple packet format representing button presses and touch coordinates. The packet format is called BD, and is transmitted over an RFCOMM channel (up until the JavaMO, this was a hard-coded channel # 9, with the JavaMO, Hari patched the BD comms library to do SDP lookups to ask the phone for a free channel and negotiate this on a per-phone basis.), as such the client itself is very simple, and all of the processing is done by the DCE device Bluetooth_Dongle, which is in itself a subclass of Orbiter.)

For Symbian and Windows Smartphone, the code is built as an amalgam of code in src/PlutoMO, and src/VIPShared. src/PlutoMO provides the basic mobile orbiter shell, while VIPShared provides BDcommon and the VMC (VIP Menu Container) decoding which allows the phone to be used in offline mode.

The Windows Smartphone versions run atop the SMARTPHONE_2003 and SMARTPHONE_2005 variants, which are the only two SDKs of this type that microsoft has released. Porting this to new versions of Windows Mobile basically would entail #ifdefs to most commonly work around differences in core API (as the Windows CE core in these systems change like crazy from release to release), while it's not dead easy, it's not difficult, either. I am working on a port to WM5 and WM6 for the standard Orbiter. But I need hardware to test the results of the code.

Your comments about the Symbian variant were also incorrect, in that Hari has revamped the code to work on Symbian v2 (sis) and Symbian v3 (sisx). It took Hari roughly a weekend to do this, which makes me more mad that someone else didn't step up and do this sooner. Given the utter simplicity of the code, and the fact that Symbian's SDK is pretty consistent below, other ports to UIQ and other variants of Symbian are very possible. People, step up and do it! :)

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on August 26, 2009, 10:45:19 pm
Here the keymap of my Nokia6233

(http://img510.imageshack.us/img510/4567/nokia6233keymap.jpg)
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on August 26, 2009, 10:46:53 pm
yeaugh, we may need another variation.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on August 27, 2009, 01:44:40 am
I think so  :-[, maybe i can do it.
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on August 28, 2009, 09:38:26 pm
I post here some problems,

1) I followed 1:1 (as Hari said) the wiki instruction to build the dev envinroinment (http://wiki.linuxmce.org/index.php/JavaMO) but when i make, it return ERROR:Cannot find java.lang
 Anyway i create a Nokia6233.java class inside "com/linuxmce/javamo/devices" with some Keytranslation and i need a working env to test it.

  This "road" is ok? and which other file we need to change to add the nokia6233 class?  Maybe in the phone detenction in JavaMO.java?

Code: [Select]
    private PhoneDevice detectPhone() {
83                 String platform = System.getProperty("microedition.platform");
84                 MOLogger.log(5, "Device:" + platform);
85                 if (platform != null) {
86                         if (platform.toUpperCase().indexOf("NOKIA") >= 0) {
87                                 MOLogger.log(5, "Detected as Nokia");
88                                 return new NokiaPhone();
89                         } else if (platform.toUpperCase().indexOf("SONYERICSSON") >= 0) {
90                                 MOLogger.log(5, "Detected as SonyEricsson");
91                                 return new SEPhone();
92                         }
93
94                 }
95                 return new NokiaPhone();
96         }

2) With KeyCodes.jar (as u see in the previous post in the previous page) i have too few button to control the orbiter. I need at least, in addiction to the numeric pad and the directional pad, a OK button and a BACK button. But i have only one (the green Take Call Button).  We should implement the square button in the center of the additional pad but i don't even know where to start to do this.

3) We need a custom skin variation i guess, the MO is all inside the folder "Mobile Orbiter" inside the skins/basic folder?

TNX for helping,
Martino.
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on August 28, 2009, 10:50:18 pm
Actually, this falls under a new variation. This will require some code changes, I believe, and a new device template for your phone.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on August 28, 2009, 10:56:23 pm
Hi massabuntu,

1) Can't help much with the dev. env., I got it working easily by using the wiki article. Might seem like your Java JDK might be faulty or not properly set up, but that is just a wild guess from my side....

This way seem OK, although there are still a right way and a wrong way. Is your Nokia6233 class a subclass of the Nokia class ?
This would be the right way to do it, if many keys have the same mapping.
And yes, you should add some detection for the 6233 to the section you pasted.

2) Does the center button  give you a key code? What about the soft-buttons (the two just below the screen), do they return a key code? Those two are also used in the orbiter. Not sure if you can get by with that few buttons, though. I have 5 buttons more than the ones you marked out on the image, and this is just enough.
Do you have volume keys also, they might be usable also...

3) Yes, maybe. But I think you should look into what capabilities you would get out of such a "light" mobile orbiter before starting to create a new variation.

best regards,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on August 28, 2009, 11:09:24 pm
different cell phone families should have their own variations, so we can create necessary UI images etc to match, as well as proper key mappings etc, while using the existing designObjs.

I am standing firm on this one.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on August 29, 2009, 10:06:47 am
Thom,

I don't disagree with you, but we cannot possibly create a variation for every possible phone. Of course there will be a limit on how many phones we support and a few models might well be defined as the ideal phone. But for the other phones, we could get a long way with defining new key mappings.

As I see it, we should (at least) have a new variation for the "normal", most common cell phones variants, that considers the available buttons on those phones. And maybe a simpler one, which could fit the 6233 and similar phones.

But again, I wouldn't be opposed to having a variation for every phone family, I just don't know if the work will justify the gain. After all, the current mobile orbiter works fine on my SE phones with only key adjustments.

best regards,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: tschak909 on August 29, 2009, 11:43:05 am
We will have to do both mapping and variations to pull it off.

The goal is to make sure:

(1) the keys work
(2) what you see on the screen jives with the key map. If I have to press (Soft Key 4) for "C" then we're doing something wrong.

-Thom
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on August 29, 2009, 12:19:35 pm
Quote
Hi massabuntu,

1) Can't help much with the dev. env., I got it working easily by using the wiki article. Might seem like your Java JDK might be faulty or not properly set up, but that is just a wild guess from my side....

I'll look deeper.

Quote
This way seem OK, although there are still a right way and a wrong way. Is your Nokia6233 class a subclass of the Nokia class ?

The point is, when i look to the code, seems that the Nokia class did not translate any keys, like the nokia is basically the default keymapping. Anyway i guess my Nokia6233 is a subclass of phonedevice (This is my first time in Java and  i'm not a coder, so please be patient)

I would like to speak to you in the #devel channel so i can pastebin some code and u can easly look throught it.

Quote
2) Does the center button  give you a key code? What about the soft-buttons (the two just below the screen), do they return a key code? Those two are also used in the orbiter. Not sure if you can get by with that few buttons, though. I have 5 buttons more than the ones you marked out on the image, and this is just enough.
Do you have volume keys also, they might be usable also...

Neither the Soft-Buttons, The Central button, the volume button and the Camera Button give me a non 0 value. (But it sound strange to me)


For sure we add to start the variation work when we are sure we can manage the orbiter, anyway is not only a single phone variation 'cause you can found  this button layout in a lot of nokia models, even the economic newer ones.

br,
Martino.
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on September 03, 2009, 03:44:21 pm
Guys, i'm stuck because of the lack of usable buttons i get from Keycodes.jar in my Nokia 6233.
I Hope you can give me a hint or any kind of workaround.

I have an idea, and look if we can work with that.

Speaking about Symbian s60 skin,
In normal screens of the orbiter, like this one
(http://gadgeteer.org.uk/wp-content/uploads/2008/02/java_mobile_orbiter.jpg)

We can use, all the numeric buttons, asterisk and pound as theirself.
Directional pad left and right -> Softkey left and Softkey Right
Directional pad up and dowe -> OK and C
green button -> pencil


While Speaking about the Playlist skin or media skin or whatever skin without a numeric pad, we ca use

Directional Pad as itself.
Green button -> pencil
Numeric Button as their self
* -> like OK
# -> like C

We lost the softkeys but we don't really need in that screens. At least i hope.

Anyone as a better idea???
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on September 06, 2009, 09:49:47 pm
Does anyone have any interest to this anymore??
Title: Re: Java/ J2ME mobile orbiter
Post by: sambuca on September 08, 2009, 02:33:32 pm
The Right Way (TM) would be to create a new skin for phones with a limited number of keys. I think this could use the same JavaMO code that we have now.

Other than that, I'm sorry but I don't think there is much interest in making a duct-tape solution. But if you got something you feel works for you, please let us know about it.

best regards,
sambuca
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on September 08, 2009, 03:01:13 pm
Well, with these assumptions i think i'll drop.
With that framework it's very hard to make a non duct-taped solution, you can't even use the central button of the pad, or the spft-buttons.

BR,
Martino.
Title: Re: Java/ J2ME mobile orbiter
Post by: Zaerc on November 11, 2009, 02:14:50 pm
can someone point me in the direction of a good virus free java game site. plz
And now, we just wait for the second spam-bot to come along and answer that question... :P
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on November 12, 2009, 01:06:11 pm
can someone point me in the direction of a good virus free java game site. plz
And now, we just wait for the second spam-bot to come along and answer that question... :P

hmmm, yea strange how his profile claims to hail from the US yet his IP address is Latvia! Shall we leave as a cautionary tail, or delete summarily?!
Title: Re: Java/ J2ME mobile orbiter
Post by: Viking on November 12, 2009, 02:27:34 pm
Hi,

I assume JavaMO only works with Bluetooth, right ?
Or does it also work with wireless ?

Is there any solution for newer Windows (5/6) mobiles ?
Title: Re: Java/ J2ME mobile orbiter
Post by: massabuntu on November 13, 2009, 09:47:22 am
Hi,

I assume JavaMO only works with Bluetooth, right ?
Or does it also work with wireless ?



Is there any solution for newer Windows (5/6) mobiles ?

For what i've seen, yes, it use BD to open a connection beetween the MD and the mobile phone.
Title: Re: Java/ J2ME mobile orbiter
Post by: Viking on November 13, 2009, 11:27:58 am
For what i've seen, yes, it use BD to open a connection beetween the MD and the mobile phone.

What is BD ?

Viking
Title: Re: Java/ J2ME mobile orbiter
Post by: colinjones on November 13, 2009, 08:16:15 pm
Bluetooth_Dongle the device that manages Bluetooth connections.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on November 14, 2009, 05:32:12 pm
No, bi-directional, implemented in bluetooth dongle. It is described on the BD wiki page

br hari
Title: Re: Java/ J2ME mobile orbiter
Post by: Viking on November 15, 2009, 09:15:38 pm
OK, but that means there is no Windows Mobile 5/6 solution at the moment - right ?
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on January 08, 2010, 03:05:00 pm
the symbian mobile orbiter uses a a hard coded resolution right now. Unfortunately I cannot develop it further right now as my N73 (S60) is broken and I got a Symbian S40 as new phone (6700 classic).
We would need a new BD command to report the screen size back to the core. That could be used by the j2me MO, too.

br Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: posde on January 09, 2010, 02:55:00 pm
hari,

maybe you should port the S60 orbiter to S40 as a proof-of-concept :)
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on January 12, 2010, 12:02:14 am
The s40 is java only,

br Hari
Title: Re: Java/ J2ME mobile orbiter
Post by: posde on January 12, 2010, 10:14:26 am
The s40 is java only,

hari, you can't be serious.

You don't think, you can proof that the S60 orbiter can be ported to S40?

I am puzzled. :o
Title: Re: Java/ J2ME mobile orbiter
Post by: ryuma on July 23, 2010, 12:44:51 pm
Hello,

I'm going to receive the new sciphone I68 4G with WIFI. (chinese phone)

Is it possible to installer an orbiter with a .jar and to use wifi ?
Title: Re: Java/ J2ME mobile orbiter
Post by: nite_man on July 23, 2010, 01:05:25 pm
Hello,

I'm going to receive the new sciphone I68 4G with WIFI. (chinese phone)

Is it possible to installer an orbiter with a .jar and to use wifi ?
No, JavaMO Orbiter uses Bluetooth to communicate with core. You can try a new Web Orbiter 2.0 I think if your phone has a touchscreen.
Title: Re: Java/ J2ME mobile orbiter
Post by: ryuma on August 13, 2010, 04:46:40 pm
Hello,

I'm going to receive the new sciphone I68 4G with WIFI. (chinese phone)

Is it possible to installer an orbiter with a .jar and to use wifi ?
No, JavaMO Orbiter uses Bluetooth to communicate with core. You can try a new Web Orbiter 2.0 I think if your phone has a touchscreen.

I've received my sciphone i68 4G (71euros). Yes, it's touchscreen, bluetooth and wifi.
Title: Re: Java/ J2ME mobile orbiter
Post by: hari on August 13, 2010, 08:40:52 pm
does it support java and jsr82?
Title: Re: Java/ J2ME mobile orbiter
Post by: ryuma on August 20, 2010, 02:48:13 pm
It supports java, but I don't know jsr82 ?

resolution is QVGA (240 × 320), Bluetooth A2DP