Skip to main content

Some questions.

12 replies [Last post]
fabio_patricio
Offline
Joined: 2003-12-30

I'm riding a development environment where I need to use resources of jsr's 179 and 256 as well as access to JNI it running on a WinMo 6.1 Professional. Seeing about phoneME I had some doubts.

The phoneME Feature MR4 supports the jsr's 179 and 256 on Windows Mobile 6.1?

With phoneME Advanced dual stack you can use these JSR's running MIDP and CDC?

Want to use LWUIT UI with touch access. I saw some videos running on an HTC Touch, but I'm not sure if it runs with the dual stack.

Finally:

Is there somewhere an example of how to use the phoneME Advanced dual stack with any development IDE? How to build an environment to develop and test?

And where do I find an example of the build phoneME for widows XP or vista?

Best regards

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kenkar
Offline
Joined: 2008-10-06

Hi Davy,

works great, thank you.

Ken

fabio_patricio
Offline
Joined: 2003-12-30

Hi Davy,

I was able to operate the communication with the GPS. Both the Phoneme and via CommConnection.

Now I have the following problem with the Phoneme. When I search for the location (getLocation) it returns me a location as valid (isValid), but with 234455.0 latitude and longitude 0.0 which is not correct.

Best Regards,

davyp
Offline
Joined: 2007-01-03

That value sounds definitely wrong. Probably there is something wrong with the NMEA parser or
the parser did not recognize the fact that the signal was lost.

The JSR179 is not quite stable and it should have better support for recovering from lost signals
and automatically reconnecting again. Probably the whole implementation should be revised to
use something more stable like the GPS Intermediate Driver.

Regards
Davy

davyp
Offline
Joined: 2007-01-03

My Windows Mobile builds of phoneME Feature provide an implementation for both the location
and sensor APIs, but there is no guarantee they will work for you (as I have only tested them
with my own device and accessing hardware sensors and gps etc. is quite device dependent).
My phoneME Advanced dual stack builds don't have these implementations. LWUIT should work
on both if you are developing a midlet.

If you want to use JNI as well, then your options are quite limited. It is not possible with
phoneME Feature. It is easier to add stuff like that in phoneME Advanced, but you have to pull
some tricks to do this. If you can separate the native part from the application into a separate
jar, and add that library to the boot classpath of the VM, it might work. Make sure not to use the
java/javax namespace for your library.

I am not sure what you want to do with the development IDE. Do you want to deploy midlets
OTA to a pMEA dual stack VM on your mobile device? If so, you need to upload/download the
jar and jad to your device and also a launch script.

I cannot help you with building phoneME for Windows XP/Vista.

Davy

fabio_patricio
Offline
Joined: 2003-12-30

Hi Dave,

Thanks for the feedback.

Are you the site http://www.cs.kuleuven.be/ ~ davy / phoneme / q = node/10?

The MIDP builds available there are supported the JSR's 179 and 256?

Another thing. What equipment do you use with these two JSR?

Best regards

davyp
Offline
Joined: 2007-01-03

Indeed, that would be my site and builds.

The phoneME Feature builds provide the Java APIs for both JSRs. I use a Bluetooth GPS in
combination with a Serial Port connection for the Location API. The Mobile sensor API is in fact
a quick hack of the win32 emulation layer to strip out all javacall dependencies and I have a
prototype implementation for a cell tower information sensor that works on an old Qtek
(WM2003). Unfortunately, the ioctl functions for the cell tower info that I use don't work on WM5
or some other devices. So the online phoneME Feature builds only provide 4 dummy sensors.
Also, I don't do a runtime detection of which sensors are available. The list of sensors and their
properties are specified in an XML file which gets compiled into the VM, If I have some spare
time I might add a real battery sensor that uses OS functions to provide the real information.
That should work on all devices.

Davy

fabio_patricio
Offline
Joined: 2003-12-30

Hi Dave,

Thanks for the feedback.

I started a test version of the MIDP PhomeME Feature to Windows Mobile 6 with a HTC P3301.

Initially I checked the support the API's 179 and 256 (checked via getProperties). The two returned just fine. The JSR 179 with version 1.0 and JSR 256 with version 1.1. But to actually test the use of them not getting success. At this point I got a question to run the application must be digitally signed?

davyp
Offline
Joined: 2007-01-03

No your application does not need to be signed.

For using the Location API, you need to make sure you can connect to your gps with
a serial port connection. The settings of the port are specified in the midp\lib\lapi.cfg
It works on my device but I realize getting it to work is a bit cumbersome, and it even may
not work on your device.

About the Sensor API, yes, the sensors I support are dummy sensors (battery_level,
battery_charge, and temperature) that return some random values. For the first two I could
provide a real implementation because the APIs are pretty standard, and maybe I could
add a screen brightness sensor too, but other sensors are pretty device specific.

Davy

kenkar
Offline
Joined: 2008-10-06

Hi Davy!

I'm using your phoneME compilation on a Windows Mobile 6 devices (Honeywell Dolphin 7600 and 9900). I'm very thankful for your compilations, it makes my job much easier. I'm running phoneME Feature MR4, and I'm trying to get the Location API to work with the internal GPS on the devices.
When running "LocationProvider.getInstance(null)" I get a LocationProvider, but when checking the state with "lp.getState()", I always get the state LocationProvider.TEMPORARILY_UNAVAILABLE, even when outside knowing that I get signals from several satellites with a test GPS application included on the devices. My lapi.cfg file (on the 7600 device) looks like this:
"SerialPort = comm:2;baudrate:57600;bitsperchar:8;stopbits:1;parity:none".
According to the documentation the internal GPS is listening on com2, baudrate 57600 (non-configurable). Do you have any ideas why this isn't working?
Should I try to install the phoneME Advanced instead and try your "fix" with comm.jar, jcl.jar etc (even though I would prefer Feature since we would like to have a compatible version for cell phones too)?

Best regards
Ken Karlsson

davyp
Offline
Joined: 2007-01-03

Hi Ken,

Perhaps you can check if you can read the NMEA sentences of your GPS directly by creating
a CommConnection to this port.

http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/io/C...

One note though, I would not rely on the microedition.commports property to detect all ports
as it is a hardcoded property that returns all com ports from com1 to com9.

Davy

fabio_patricio
Offline
Joined: 2003-12-30

Hi Davy,

Tanks for help,

I did a test trying to connect directly into the serial port I configured in Windows Mobile.

After developing a Java code to connect via serial port in GPS (COM4). After starting the application (30 seconds) and this returns the following message: Access denied COM 4.

Any ideas?

Best regards.

davyp
Offline
Joined: 2007-01-03

Are you sure COM4 actually provides access to the NMEA sentences?

I have a small utility called "GPS Info" which allows you to set a serial port and read the
NMEA sentences. It was included with my Bluetooth GPS device, but I am sure there
are other tools with which you can check COM4.

Davy.