SMT-5800: Bluetooth GPSdevice discovery failed

cyberhobo's picture

I've searched enough to know that this isn't a huge surprise, but I've put enough effort into it that I thought it might be worth recording for others.

The SMT-5800 is a smartphone running windows mobile 6 (or CE OS 5.2.1238). I was happy to connect it via Bluetooth to my QSTARZ BT-1200 Ultra GPS logger using serial port COM0 in the Bluetooth setup. I can use BeeLineGPS to interact with it.

Next I wanted to be able to download tracks from it on an extended hike. I found BT747_J2ME, but it seems that even though J2ME is listed in the specs for the SMT-5800, there is no virtual machine installed. I managed to "app unlock" the phone and install Esmertec Jbed. After that BT747_J2ME from getjar.com installs and runs.

One thing I'm not sure about is whether there's a better option for a Java VM on this phone.

Now BT747 starts up with the subject error message. The application log says:

[Info] No BT address set
[Info] Setup up console to file
[Info] Setup up console to file
[Info] Basedir set to:/MemoryCard
[Info] Discvoering Bluetooth devices.
[Error] Problem with Bluetooth device discovery. Operation returned null.

One thing I'm not sure about is whether there's a way to tell BT747 to try COM0. I've tried changing that to other COM ports in the phone's Bluetooth settings, but it doesn't seem to make a difference.

mdeweerd's picture

Thanks for sharing. Regarding

Thanks for sharing.

Regarding BT_J2ME: I do not know how the app can be instructed to use 'COM0' - there is surely a method that is likely different from the discovery method currently used (which is using standard JSR82).
It would be interesting to eventually know how to do this normal discovery or how to use 'COM0' in J2ME.

The other option is to install Superwaba (from the BT747 project on sourceforge) and then install the SuperWaba version of BT747. The latter comes down to selecting the right cab from the dist directory and put it on your Windows Mobile device. The Superwaba version uses the com ports.

Almost

Thanks - I'd noticed the CAB files in /dist, but somehow I missed the SuperWaba dependency. The SuperWaba CAB installs okay, but I'm not sure if it works correctly. It pops up a startup screen that doesn't respond to any input except switching back to the desktop.

I'd hoped one of the HTC CABs would work with this phone, but it won't install them, complaining they were intended for a different device.

Thanks for the suggestions!

mdeweerd's picture

There is no 'HTC specific'

There is no 'HTC specific' CAB file and your best choice is probably 'PocketPC_ARM.CAB'.

If you managed to install SuperWaba, then you should manage to install a BT747 CAB.

Superwaba does popup a screen with not much to offer. This is basically a proof that it works - it runs a simple program on the Virtual Machine. The BT747 package (for SuperWaba) will when lauching the installed BT747 use the SuperWaba VM to run BT747 on.

cyberhobo's picture

Sadness

I get the same result for all the CAB files in /dist. I'm not sure what the special requirements are for a smartphone, but I know there is usually a different CAB for PocketPC and Smartphone.

I wish I was savvy enough to try building one, but I don't think I'll have time for the learning curve.

mdeweerd's picture

Since you succeeded in

Since you succeeded in installing SuperWaba, you should succeed in installing BT747 for SuperWaba. What was the CAB file that worked for you regarding SuperWaba itself?

If you have ActiveSync installed, the script 'BT747_Install.bat' in the dist directory might do the trick. Some users said this script worked well for them - it is created by the standard build process.

mdeweerd's picture

Maybe a J2ME solution

I may have found the method to connect to the com port in J2ME.
I need to finish implementation first though and it is not certain that is is a solution.

cyberhobo's picture

superwaba.WindowsMobile.CAB

This CAB installed without complaint.

The install script fails, I think due to changes in Windows Vista. The location of CEAppMgr.exe is \Windows\WindowsMobile\CEAppMgr.exe. If I pass BT747_Install.ini to that, it says the "The application cannot be installed due to an invalid setup file".

Thanks so much for your attention - if I get this running I will certainly contribute to the project.

mdeweerd's picture

J2ME trial + a new track

This is good news actually. I did not realize that the WindowMobile.CAB is specific - I thought it was for the other devices too.

I looked it up in the documentation and I found this:
Windows Mobile 5 / 6 devices: there's a special cab for these devices, under SuperWabaSDK\bin\installers\vm\ce\superwaba.WindowsMobile.CAB. This cab will not be installed when you click in the bat file; you must copy it by hand to the pda, and open the cab file using the pda's windows explorer. Note: if you want to generate install files for WM5 instead of Pocket PC, you must rename the file SuperWabaSDK\bin\tools\makecab\CabwizSP.exe to Cabwiz.exe (first, backup the current cabwiz.exe), then run Exegen /z to generate the cab files. Note that CabwizSP (SP for SmartPhone) generates cab files that are incompatible with old Pocket PC devices.

So this is going to make generation a bit strange because the standard procedure is to rename a file :-(.

Further, I've been working on J2ME - I'ld like to get that working too. For the moment (0.3.17), has something extra in the interface. Connection / Settings (Protocol). You'll se a rectangle with Bluetooth in it. Select it, click ok to get the list. If all goes well you'll see something else than bluetooth in the list too (COM0, COM1, ... ?). This selection does not have any influence for the moment - I still need to act on it elsewhere in the code.

cyberhobo's picture

No ports listed

That is a strange procedure. It sounds a little desperate, like me!

Unfortunately I see only Bluetooth in the Connection / Settings (Protocol) / Port list in 0.3.17. I guess it's possible that the Jbed VM isn't aware of the ports.

mdeweerd's picture

J2ME must be possible

http://wiki.trekbuddy.net/index.php/Devices list Devices useable with trekbuddy and jbed is listed for some devices connecting to COM4. Maybe I should not care about the list that can be retrieved and just let you choose...

mdeweerd's picture

Correction

I was doing the wrong thing. The ports are listed in the System Properties and I was getting the Application properties.

My emulator still does not provide any port (because it does not have any), but hopefully you have more success with this correction (0.3.18).

cyberhobo's picture

Trying Trekbuddy

I notice that more permissions are requested during installation, including Connector.comm and Connector.socket. But still, the needed "Serial" option in Settings / Location / Provider doesn't show up, I only get Internal, Stream, and Simulator. There may be a clue in Info / Technical where the value for Ports is true; null.

More evidence that Jbed doesn't see the port on my phone?

mdeweerd's picture

Maybe you are right about the Serial Support by Jbed

but I would not give up.

http://forum.mgmaps.com/viewtopic.php?t=1854 says that Jbed does not support serial ports.
http://www.allbusiness.com/technology/software-services-applications/613... says there is a new release with support for Bluetooth Serial Profile -> maybe you can get an update.
The other solution would be to use GPSport - a serial port to TCP forwarder. I am not sure that in its current state it does the work both ways because trekbuddy only needs to know what is coming from the GPS - not send anything to it.

Did you try my fixed version 0.3.18 ?

Further, I managed to build cab files using the suggested method. The names of the cab files are the same ;-(, but I am certain they were built using the other exe (I checked using a process monitor). I had some problems in my build setup (I upgraded my IDE yesterday so I was looking for trouble).
You can temporarily get these from this site: http://bt747.free.fr/WindowsMobile.zip . I'll delete that after your feedback. Hopefully one of these CABs work. I will now try the changed complete build process (to build both types of CABs in one process).

cyberhobo's picture

Still no ports

I got distracted trying J9 instead of Jbed, but it isn't usable on my phone.

So with 0.3.18 and Jbed I still see no ports listed.

Did you see the date on that announcement - June 2001! I would hope the 2009 image I'm using has it.

Thanks for the CABs - I'll try them now...

cyberhobo's picture

HPC211_ARM.CAB from WindowsMobile.zip installs!

It was the first I tried. I now have the interface up, I need to go hit the documentation to figure out if it's talking to the GPS. Thank you!

mdeweerd's picture

Excellent news!

Now you still need to tackle the right port setup.
If you can see the current GPS position on the connection tab, then you know that you can receive data.
You'll know that you can send data when you get 'normal' numbers for the memory usage for instance.
On my end: I am still building the entire package... You can test that once it is done.
If ok, I need to repeat this for the 'Stable' version (1.68.25).

cyberhobo's picture

So close and then - Application Error

I couldn't get a connection with Bluetooth set to COM0, so I changed it to COM1. It still wouldn't connect, but when I turned on logging on the GPS, something happened, and then I got an error. Repeating the pattern seems to be that I connect on the Con tab and the view switches to the Log tab. Things seem to happening on the log tab, it looks like it's working. But the navigation still looks like it's on the Con tab - the boxes highlighted when I scroll match those controls and nothing on the Log tab. As soon as I click something, it crashes. Here's the console log:


038005 opening 0@115200
038034 00000037
...
096142 opening 1@115200
096926 Ok
176907 An error was found in the program being run by SuperWaba VM.

Error: Uncaught exception java/lang/NullPointerException

Please notify...

177066 ======= End =======

I'm still not sure SuperWaba is running correctly - many of the phone buttons don't respond, and the only way to escape the application is use the "home" button.

cyberhobo's picture

Trekbuddy + GPSPort works

Trekbuddy shows my position using socket://127.0.0.1:20175 for Location / Provider / Stream.

mdeweerd's picture

Strange that it does not say

Strange that it does not say in which part the problem is.
Did you try the other cabs? They are in principle related to the processor model and the one that you chose seemed an old model to me.

I have now built the stable version (1.68.26) and you can use it to rule out the intensive changes in the 2.X version as a cause for you problems. The dist directory has a 'WindowsMobile' subdirectory where the new type of builds are.

cyberhobo's picture

All ARM CABs the same

I did try all the ARM cabs with the same results. I know my phone model (LIBR100) is the same as the HTC S720. I'm not sure why the processor would matter when running in a virtual machine, but I'll try anything :)

Will that new build show up on SourceForge?

mdeweerd's picture

The new build is already

The new build is already there in the development section:
https://sourceforge.net/project/showfiles.php?group_id=196368&package_id... .

There must be something specific, the filesizes are different and are supposed to target different platforms. But I did not write SuperWaba. Maybe it has to do with the 'boot' code launching SuperWaba itself.

cyberhobo's picture

Same Results

Yes, there must be something processor-specific. If I install the MIPS CAB, it won't run ("not a valid WindowsCE application").

The new build ARM CABs produce the same Application Error after connecting.

mdeweerd's picture

;-(((

Unfortunately this columns becomes smaller and smaller...

I noticed that these SP cabs are a lot smaller than the other cabs, so I did some other tests to ensure that my process is ok and I did not find it wasn't.

If the error was inside the BT747 program it self, the log generated by SuperWaba should indicate where the error occurred (class, method).
Because the stable version gives the same result, I currently am a bit out of ideas.

The only other solution is to use GPSport which seems to work for you in trekbuddy. I'll let you check out if communication can go both ways with GPSport (send/receive). Maybe an extension to GPSport must be requested.
If bidirectional communication is possible, I can code it into the J2ME version. Maybe in SuperWaba too.

cyberhobo's picture

No GpsPort, No GpsGate - I admit defeat

I can see in the GpsPort source that communication is only in one direction.

GpsGate only supports device with touchscreens. I see this quite often, and it may even be that SuperWaba needs a touchscreen to work correctly on my device.

You've made a valiant effort, thank you!

mdeweerd's picture

NO need to give up.

Your analysis of GpsPort is in line with mine. I do think though that it should not be too difficult to make it bidirectionnal - maybe ask the author. When done, it is not to difficult to add to J2ME.

Superwaba is best with touchscreen, but it has a mode when you do not have a touchscreen - buttons get a green border and you can move around like that.

I am always up for a challenge ;-).

Remember, as Benjamin Disraeli, Former British Prime Minister, said, 'The key to success is constancy to purpose'.

cyberhobo's picture

Short On Time

I don't often give up! But I leave in less than a week to begin my hiking and mapping project. I'll need to work out an alternate workflow to manage tracks while I'm in the field, and I have lots of other preparations to make also.

For future reference, though, I do get the green outlines. When the tab switches automatically from Con to Log, the green outlines stay as they were on the Con tab. I can move it among the six "phantom" controls, but when I click, it's over. I do wonder if a manual tab change instead of the automatic one would prevent the error. I can change tabs before connection.

mdeweerd's picture

So basically you are saying

So basically you are saying that the problem occurs when you have to click/select after the connection with this automatic change.

I can adapt BT747 to not change automatically when there is no touchscreen. Maybe it solves the issue then.

cyberhobo's picture

Worth a try

If you're willing and it's something that can be done before I leave, I'll test it!

mdeweerd's picture

BT747_1.68.27

I've made the change (a matter of adding the appropriate if condition in the appropriate location), and the build is done.

As usual, available here

cyberhobo's picture

Hope Returns!

I can connect, and manually change to the Log tab! I don't have a log to download right now, so I'll have to go collect one. But now I feel optimistic!

The only remaining issue I see is not a showstopper: there's no way to exit. I can switch back to Windows with the home key, but the application will pop up again now and then. Even 'Stop All' in the task manager doesn't end it. For me, though, I plan to boot the phone, download tracks, and shut down again, so it shouldn't matter.

(Sorry I've made a mess of this thread!)

Post new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Lines and paragraphs break automatically.
  • Use the special tag [adsense:format:slot] or [adsense:format:[group]:[channel][:slot]] or [adsense:block:location] to display Google AdSense ads.
  • Images can be added to this post.

More information about formatting options