simon lewis

Bug Labs Release 1.4.2 - asynchronous GPS API broken, synchronous works but requires polling

Back in August using Bug Labs Release 1.4.1, Simon Lewis and I got his Bug Labs bug identicon app that generates identicons based on GPS coordinates to work. Unfortunately that used the Bug Labs synchronous API i.e. polling which runs down the battery. The working version is 1.0.3 and you can see the output of 1.0.3 in the video above.

It's still broken in Bug Labs Release 1.4.2  Full yak shaving details after the jump!

So the next step was to try the asychronous API. It didn't work. The Concierge component framework would crash:

root@bug:~# tail -f /var/log/concierge.log
[Thu Jan 01 00:01:39 GMT 1970] [INFO] CoolApp 1.1.1: code != lastCode
[Thu Jan 01 00:01:39 GMT 1970] [INFO] IdenticonComponent: Initialized image and got sun.awt.qt.QtImage@86b11f3a
[Thu Jan 01 00:01:39 GMT 1970] [INFO] IdenticonComponent: image == sun.awt.qt.QtImage@86b11f3a
[Thu Jan 01 00:01:39 GMT 1970] [INFO] CoolApp 1.1.1: CoolApp.newIdenticon(...)
[Thu Jan 01 00:01:39 GMT 1970] [INFO] CoolApp 1.1.1: CoolApp.newIdenticon(...): Writing /usr/share/java/./storage/default/39/data/identicons/4915.17N_1234.19W.png
[Thu Jan 01 00:01:40 GMT 1970] [INFO] CoolApp 1.1.1: Got position update
[Thu Jan 01 00:01:40 GMT 1970] [INFO] CoolApp 1.1.1: Latitude[0.8596597123194212 rad] Longitude[-2.1480144386300855 rad]
[Thu Jan 01 00:01:40 GMT 1970] [INFO] CoolApp 1.1.1: Computing digest
[Thu Jan 01 00:01:40 GMT 1970] [INFO] CoolApp 1.1.1: Got digest
[Thu Jan 01 00:01:40 GMT 1970] [INFO] CoolApp 1.1.1: code == lastCode

II) every other time it didn't appear to run, it just hangs after it starts

ar]:
java.lang.LinkageError: trying to redefine class com.buglabs.bug.jni.common.CharDevice (bad class loader?)
    at java.lang.Class.addToLoaderCache(Native Method)
    at java.lang.Class.loadSuperClasses(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(Unknown Source)
    at ch.ethz.iks.concierge.framework.BundleClassLoader.findDelegatedClass(Unknown Source)
    at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Compiled Method)(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.loadSuperClasses(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at ch.ethz.iks.concierge.framework.BundleClassLoader.findOwnClass(Unknown Source)
    at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Compiled Method)(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.buglabs.bug.input.pub.InputEventProvider.run(Unknown Source)
    at java.lang.Thread.startup(Unknown Source)
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registering info service.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet /support
STARTING file:./com.buglabs.bug.service.jar
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet /service
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet at /service.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered resources /
STARTING file:./com.buglabs.bug.program.jar
[Thu Aug 06 21:46:14 UTC 2009] [INFO] UserAppManager init: false
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet /program
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet /configuration
STARTING file:./com.buglabs.bug.module.jar
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet /module
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet at /module.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet /package
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Registered servlet at /package.
STARTING file:./com.buglabs.bug.bmi.jar
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.gps (0001) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.camera (0005) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.lcd (0003) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.motion (0002) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.vonhippel (0007) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.audio (000A) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.wifi (0008) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Added modlet factory com.buglabs.bug.module.bugbee (0009) to map.
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Creating pipe /tmp/eventpipe
[Thu Aug 06 21:46:14 UTC 2009] [INFO] Execution Completed.  Response:
[Thu Aug 06 21:46:15 UTC 2009] [INFO] Initializing existing modules
[Thu Aug 06 21:46:15 UTC 2009] [INFO] Registering existing module with message: 0003 0 0 ADD
[Thu Aug 06 21:46:15 UTC 2009] [INFO] Started modlet from factory com.buglabs.bug.module.lcd...
[Thu Aug 06 21:46:15 UTC 2009] [INFO] Registering existing module with message: 0001 0 1 ADD
[Thu Aug 06 21:46:15 UTC 2009] [INFO] GPSModlet setting active (external) antenna
CoolAppServiceTracker: start
[Thu Aug 06 21:46:16 UTC 2009] [INFO] CoolApp 1.1.1: CoolApp.start()
[Thu Aug 06 21:46:16 UTC 2009] [INFO] Started modlet from factory com.buglabs.bug.module.gps...
[Thu Aug 06 21:46:16 UTC 2009] [INFO] Listening to event pipe. /tmp/eventpipe
STARTING file:./com.buglabs.bug.event.jar
[Thu Aug 06 21:46:16 UTC 2009] [INFO] Registered servlet /event
[Thu Aug 06 21:46:16 UTC 2009] [INFO] Registered servlet at /event.
STARTING file:./com.buglabs.bug.slp.jar
---------------------------------------------------------
  Framework restarted in 7.075 seconds.
--------------------------------------------------------- 

So I had high hopes for the recently introduced Bug Labs Release 1.4.2. I hoped that the asynchronous API would be fixed. Based on the 1.4.2 release notes, I didn't think it was fixed and today I am blogging this to confirm it's still broken in 1.4.2 Instead of a crash with a nice traceback, I now just get signal 11 with no traceback:

Poky Linux 3.1 on BUG
root@bug:~# tail -f /var/log/concierge.log 
RESTORED BUNDLE file:./com.buglabs.bug.program.jar
RESTORED BUNDLE file:./com.buglabs.bug.module.jar
RESTORED BUNDLE file:./com.buglabs.bug.bmi.jar
RESTORED BUNDLE file:./com.buglabs.bug.event.jar
RESTORED BUNDLE file:./com.buglabs.bug.slp.jar
RESTORED BUNDLE file:/usr/share/java/apps/CoolApp.jar
STARTING file:./service-tracker.jar
STARTING file:./com.buglabs.osgi.shell.jar
Process #3983 received signal 11
Process #3983 being suspended

REPOST: Hugin/Mugin 1.0 - J2ME Flickr uploader for Series 60 Nokia cameraphones

Just re-posting this because the URLs have changed and people are looking for it. NOTE: that it may no longer work because flickr have changed their authentication APIs and this software is UNSUPPORTED!

Here are the files:

  1. Hugin/Mugin binaries
  2. Hugin/Mugin source

From Roland Tanglao's Weblog: Hugin/Mugin 1.0 - J2ME Flickr uploader for Series 60 Nokia cameraphones.:

QUOTE

LATER: I have added a Public Hugin/Mugin Flickr group. Please post your comments there.

After a prolonged testing and development period, Hugin/Mugin (Hugin and Mugin are Norse gods that Simon likes! This program was formally known as FlickrLive) is available for general release:

WHAT: Hugin/Mugin is a J2ME Flickr uploader for Series 60 cameraphone phones. It enables almost real time uploading (e.g. with a 30 second delay on the Canadian mobile carrier Fido's GPRS network) of photos from your phone directly to Flickr. No muss, no fuss, no chain of pain. It comes as two midlets: one to configure called Hugin/Mugin Settings (Flickr userid, password, tags, etc.) and one to actually upload called Hugin/Mugin

WHO IS THIS FOR: Power Users, techies and geeks. Sorry, but with the current cameraphone state of the art, I can't recommend this to normal people!

HOW TO INSTALL: download this Hugin/Mugin Zip file (60 K zip). Unzip it and transfer the .jar and the .jad files to your phone. Install it by opening the Jad.

HOW TO USE: Run the configuration midlet, Hugin/Mugin Settings, and put in your default tags, title, camera resolution and flickr id and password. Then when you want to take a photo, run Hugin/Mugin. Click to take a picture and upload!

LICENSE: Free, GPL

SUPPORT: none, ok, best effort :-) which means leave a comment here or on your blog and I'll do my best to answer any questions

TESTED ON: Nokia 7610 ONLY! I believe it should work on other Series 60 phones like the 6600 and 6630 but I don't know for sure.

REQUIREMENTS: Series 60 Nokia phone AND some kind of mobile data service like GPRS, EV-DO, 3G, 1X, etc.

SOURCE: will be available tomorrow when I have time to post it and it will be GPL'ed

AUTHOR: Simon Lewis, my programming maven (really! Simon can and has almost programmed everything from CORBA frameworks to apps from Lisp to C, C++, Java, Smalltalk etc.) friend in the UK; I didn't write one line of code. I'm just the product manager :-) which means I just did the testing and helped with the requirements.

PROBLEMS: More details in the release notes tomorrow with the source but J2ME on the 7610 doesn't appear to let you upload true 1 megapixel images. Instead you get pixelated 640x480. Sad but true! Still it's cool to have pixelated 640x480 images uploaded to Flickr in pseudo real-time. I hope that by releasing the source tomorrow that somebody will be able to work around this.

UNQUOTE

Subscribe to RSS - simon lewis