Skip to main content

Newbie help

13 replies [Last post]
hallenberg
Offline
Joined: 2007-01-05
Points: 0

Ok, I'm completely new to all of this so pardon if a ask stupid things.

I'm just trying to get phoneME MR2 working. I have the windows binary installed and the phone emulator pops up. Next step would be to install a MIDlet suite. As far as I can tell this is only possible via OTA. Does this mean that I have to set up a web server in order to test anything? Or is it possible to install a MIDlet "manually" directly in the class-hierarchy? Or are there any good examples online somewhere that I can use instead?

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hallenberg
Offline
Joined: 2007-01-05
Points: 0

Weird, I can swear that I posted here yesterday... Anyhow:

I got it all up and running on the ARM now. Using installMidlet http://website/midlet.jar works just fine, as does running the installed midlets with usertest.

Installing with the usertest GUI doesn't work, nor does installing with a .jad instead (could be an error in the .jad, I'm not that familiar with how it's supposed to look yet).

A problem I've noticed so far is that only a small subset of the keys work. The device has a qwerty-keyboard. If I run a tty on it all keys work fine, but in phoneME they don't (9 for instance, highly annoying). It seems to me like a phoneME specific error. I haven't looked into the source yet but I'll try to compile my own today instead of using the provided binary.

/ Tomas

aap031
Offline
Joined: 2006-10-18
Points: 0

Hi Tomas!

Am I correct you are using framebuffer (linux/fb) version of phoneME Feature? (e.g. standard download bundle). This configuration supports very limited number of devices and their respective keymaps. Different devices most likely have different key codes. Please see:
- checkDeviceType() in midp/src/highlevelui/fb_application/reference/native/fbapp_export.c for list of supported devices
- init_key_device() in midp/src/events/input_port/fb/native/fb_handle_input.c for keymap selection based on device type
- midp/src/events/input_port/fb/native/fb_keymapping.c for actual key code tables.

Please note that two types of key events are supported: one which generates a specific key codes for key press event and for key release event. Another which issues a bit mask of currently pressed keys on each user action (which only the case for Texas Instruments P2SAMPLE64-V6 board, the only officially supported ARM device for phoneME Feature). Please refer to bitscale_mode variable in midp/src/events/input_port/fb/native/fb_handle_input.c

If you are using linux/qte version you should not have this problem so please specify if this is the case or not

Thank you,
Andrey

hallenberg
Offline
Joined: 2007-01-05
Points: 0

Yes, I'm using the linux/fb version (we don't want to use qte if we don't have to). Still haven't got around to compiling my own, but I suppose that the problems should quite easily be solved by tweaking some values somewhere =)

/ Tomas

hallenberg
Offline
Joined: 2007-01-05
Points: 0

I just noticed that the binding for KEY_9 is missing in the default ARM Versatile/Integrator keymap in fb_keymapping.c. Maybe it's fixed in SVN already...

/ Tomas

stuart_marks
Offline
Joined: 2006-08-24
Points: 0

Nope, it doesn't look like it's fixed in SVN. Want to file a bug? :-)

See the Issue Tracker page at https://phoneme.dev.java.net/servlets/ProjectIssues .

Let me know if you need help doing this, or if you'd prefer not to deal with it. Thanks.

s'marks

hallenberg
Offline
Joined: 2007-01-05
Points: 0

Just as good to know how it works, I might find more as I go ;) Hopefully I filed it in the appropriate manner.

/ Tomas

hallenberg
Offline
Joined: 2007-01-05
Points: 0

So, I got the windows version working. Apparently you have to use command line arguments to runMidlet both to install MIDlets and to execute them. Trying to do either via the GUI does not work.

I don't know if this is a "known feature" or not, but I thought it could be nice to point it out. I didn't find any information about it myself.

The question whether a web server is needed to install MIDlets on the linux-arm version still remains.

alexey_z
Offline
Joined: 2006-10-18
Points: 0

Hi,

Could you please elaborate: what exactly doesn't work when you are trying to use GUI? "usertest" script should run the Manager midlet which allows to install/remove/run midlets.

Regarding installation of midlets, it's possible to install a midlet from a jar file using "installMidlet" script under Linux; if you are using win32, currently it doesn't work due to a bug in the implementation (this bug will be fixed soon).
If using GUI, it's required to have a running web server to install a midlet.
However, you can run a midlet without an installation (it is not recommended because in this case it is treated as an internal midlet):
runMidlet
or
runMidlet -classpathext

Regards,
Alexey

hallenberg
Offline
Joined: 2007-01-05
Points: 0

I will gladly elaborate =)

The windows binary-version only has the runMidlet.exe (no usertest or installMidlet or so on). I'm using MR2 b04. So I start the command line and type:
cd {Install path}\bin\win32_i386_javacall_mvm
bin\i386\runMidlet.exe

This opens the phone emulating GUI. If I try to install midlets here, it only results in error.
However:
bin\i386\runMidlet.exe install_url http:\\localhost\midlet.jad

Installs the MIDlet correctly (given that I have the webserver up and running and all that). I think I tried using the "install_file" argument as well, but I'm not sure.

Now, starting the GUI again as mentioned above, starting the midlet by selecting it in the menu does not work. Instead i have to do:
bin\i386\runMidlet.exe 1 (or whatever number it has)

I might have missed some details now, I'm writing this out of my head. Just ask and I will clarify.

The issue I have with Linux is that since I'm running it on a highly experimental platform (arm based) I haven't been able to set up networking or web services properly yet. That's why I want to know if there's another way to install the MIDlet than via OTA.

I will check out what you mentioned as soon as I have sorted out some, hrm, "issues"... (I accidentally wiped the boot loader and possibly the filesystem, but that's a different story... =)

/ Tomas

Message was edited by: hallenberg
Removed an accidental smiley

alexey_z
Offline
Joined: 2006-10-18
Points: 0

Please note that when installing a midlet using GUI, you should provide a path to the html page (not to the jad or jar file with the suite!) containing the list of suites available at this location. If the location is a directory (for example, if you are accessing a web page "index.html" located under http://somehost/somedir/), the ending slash is mandatory (http://somehost/somedir will not work!).
You can create a page with a list of available midlets manually, for example:
test.html
Midlet 1
Midlet 2
Then enter its path in the GUI: http://somehost/somedir/test.html
and it should work.

About running an installed midlet from the GUI, it looks like a bug. We'll investigate and fix it.

Regards,
Alexey

hallenberg
Offline
Joined: 2007-01-05
Points: 0

I already tried having a web page just like you described and it didn't work. I could see the midlets there, but always got an error when I tried to install them. I added the MIME type as described in another thread, but it didn't help either. If you need more details I'll be happy to provide them.

/ Tomas

alexey_z
Offline
Joined: 2006-10-18
Points: 0

At what stage the installation is dropped (after selecting a jad from the list, after the Confirmation screen, etc.)?
Which error message is displayed?
One note, just in case: currently the Discovery Application doesn't support relative URLs, i.e., such link on the html page will not work:
Midlet 1

Regards,
Alexey

hallenberg
Offline
Joined: 2007-01-05
Points: 0

Thanks, that was just the problem I had with running from the web server (are these quirks documented somewhere?).

Still haven't been able to test the Linux version yet, I'll post here as soon as I have.

/ Tomas