| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

BugLabsBug

Page history last edited by Bjoern Hartmann 11 years ago

Jul-05-2009 Session #1

First session to try and get my BugLabs development kit up and running.

My ultimate goal is to get two LCD modules running on my bug and implement some back-of-device input techniques.

I'm running the latest Dragonfly SDK (installed via update site) on Eclipse 3.4 Ganymede  under WinXP.

 

After connecting my modules, the second LCD module would not be listed on http://10.10.10.10/module

Poking around on the website, I found that I should probably upgrade kernel from 1.4 to 1.4.1

I followed directions on

http://bugcommunity.com/wiki/index.php/Upgrading_BUG_Kernel

Pre-upgrade:

root@bug:/dev# cat /proc/version

Linux version 2.6.27.2 (buildbot@darner) (gcc version 4.1.2) #104 PREEMPT Thu Mar 12 11:32:33 EDT 2009

Post-upgrade:

root@bug:~# cat /proc/version

Linux version 2.6.27.2 (buildbot@darner) (gcc version 4.1.2) #116 PREEMPT Tue Jun 2 13:02:08 EDT 2009

So the upgrade was successful, however, I still cant' see the second LCD.

 

LCD Configuration:

LCD1 is in slot # 0.

LCD2 is in slot # 3.

LCD2 lights up when it is in slot3 (and only in slot3); I can also see and use the standard UI in that case, but the screen simply isn't listed.

Backtracking #1: Let's just get a simple app to run:

=======================

Trying to follow example "Create a basic GUI" (http://bugcommunity.com/wiki/index.php/Create_a_basic_GUI)

 - when I "Launch Virtual BUG", it never shows up in my list of Target BUGs.

 

Lower right hand corner of Eclipse has a "Connecting to: http:/...8082: (0%) Status with cycling progress bar. (URL is http://127.0.0.1:8082)

After some search, I found on this post:

http://community.buglabs.net/forums/5/topics/414

which refers to a known WinXP bug, that requires you to press enter in the console log to start the virtual bug. (Note: you can't do that while in modal "new project" dialog", so you'll have to start it ahead of time before you create a new project)

 

While the virtual bug now shows up, I still get some error messages in the Console during the build. So let's simplify again:

 

Backtracking: Let's just get "Hello World" to run....

 

Tried the simple "Hello World" from http://bugcommunity.com/wiki/index.php/Create_a_basic_application. This also does not run - note the error in the console log:

 

 

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

  Concierge OSGi 1.0.0.RC2 on Windows XP 5.1 starting ...

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

Logger initialized, loglevel is DEBUG

purging storage ...

INSTALLING file:/E:/pkg/eclipse/configuration/org.eclipse.osgi/bundles/198/1/.cp/jars/cg_framework.jar
[ lots of stuff cut ]

STARTING file:/E:/dev/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/BugHelloWorld.jar
java.lang.ClassNotFoundException: bughelloworld.Activator
    at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:600)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)
    at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
    at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
    at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
    at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
    at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle [17]: file:/E:/dev/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/BugHelloWorld.jar
    at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:463)
    at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)
    at ch.ethz.iks.concierge.framework.Framework$SystemBundle.setLevel(Framework.java:2468)
    at ch.ethz.iks.concierge.framework.Framework$SystemBundle.access$0(Framework.java:2428)
    at ch.ethz.iks.concierge.framework.Framework.startup(Framework.java:485)
    at ch.ethz.iks.concierge.framework.Framework.main(Framework.java:315)
STARTING file:/E:/pkg/eclipse/plugins/com.buglabs.dragonfly.bug.kernel_1.0.0.v200905151522_P/kernel/com.buglabs.bug.emulator.awt.jar
[... more stuff cut]
(: ---------------------------------------------------------

  Framework started in 2.016 seconds.

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

So I get a java.lang.ClassNotFoundException: Error. After some more time looking through forums, I find this:

http://community.buglabs.net/forums/4-BUG-SDK/topics/275-java-lang-NoClassDefFoundError-on-startup

"Check your app's MANIFEST.MF (it's under META-INF). If you click on the last tab, also named MAINFEST.MF, do you see com.buglabs.application in the Import-Package section? If not, add it and try running your application again.

(I took a functioning application, removed that entry from my manifest and got the exact same class error you have when I ran it.)"

-> i have no entry at all. Pasting it in doesn't help either though.

 

 

Above error in a nutshell: once I have a command line in console, execute:

 

 

(: start BugHelloWorld

Error occurred while executing command:

Cannot resolve bundle activator Bundle [17]: file:/E:/dev/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/BugHelloWorld.jar

org.osgi.framework.BundleException: Cannot resolve bundle activator Bundle [17]: file:/E:/dev/.metadata/.plugins/com.buglabs.osgi.concierge.runtime/bundles/BugHelloWorld.jar

at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:463)

at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)

at ch.ethz.iks.concierge.framework.BundleImpl.start(BundleImpl.java:412)

at com.buglabs.osgi.shell.commands.concierge.Start.execute(Start.java:57)

at com.buglabs.osgi.shell.internal.ConsoleListener.run(ConsoleListener.java:137)

java.lang.ClassNotFoundException: bughelloworld.Activator

at ch.ethz.iks.concierge.framework.BundleClassLoader.findClass(BundleClassLoader.java:600)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at ch.ethz.iks.concierge.framework.BundleClassLoader.resolveBundle(BundleClassLoader.java:450)

at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(BundleImpl.java:438)

at ch.ethz.iks.concierge.framework.BundleImpl.start(BundleImpl.java:412)

at com.buglabs.osgi.shell.commands.concierge.Start.execute(Start.java:57)

    at com.buglabs.osgi.shell.internal.ConsoleListener.run(ConsoleListener.java:137)

 

 

I finally got it to work after messing around with the MANIFEST.MF file, so it reads:

Manifest-Version: 1.0

Bundle-Name: BugHelloWorld

Bundle-Activator: bughelloworld.Activator

Bundle-SymbolicName: BugHelloWorld

Bundle-Version: 1.0.0

Bug-Bundle-Type: Application

Provide-Package: bughelloworld

Eclipse-AutoStart: false

 

I'll abandon for today and maybe try again next weekend.

 

 

Jul-05-2009 Session #2

It turns out the real problem (tm) last time was not an incomplete Manifest.mf file, but the fact that Bug apps don't get auto-compiled in the Eclipse IDE, something that I had not expected, since they are written in Java.

If I first explicitly build, then run in the Virtual bug, hello world works fine.

 

Now back to the previous goal of getting the simple AWT GUI test to run.

First, I needed to recalibrate the touch screen. Instructions are at  http://community.buglabs.net/forums/8/topics/356

Recalibrate touch screen

root@bug:~# rm /etc/pointercal

root@bug:~# /etc/init.d/xserver-nodm-bug restart

Now i can download apps to the bug, but once they are on the bug hardware, nothing happens.

Here's a forum thread with related comments.

http://community.buglabs.net/forums/5-Applications/topics/405-Application-don-t-get-downloaded-to-device

Important bits:

User applications get downloaded to /usr/share/java/apps

to check what went wrong, do cat /var/log/concierge.log

in my case, I get the following error in the concierge log:

BugGuiServiceTracker: start

[Thu Jan 01 00:21:23 GMT 1970] [ERROR] An error occured while trying to start bundle: /usr/share/java/apps/BugGui.jar: Error starting bundle Bundle [40]: file:/usr/share/java/apps/BugGui.jar

[Thu Jan 01 00:21:23 GMT 1970] [ERROR] Nested Exception: sun.awt.qt.QtGraphicsEnvironment

java.lang.NoClassDefFoundError: sun.awt.qt.QtGraphicsEnvironment

        at java.lang.Class.runStaticInitializers(Unknown Source)

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Unknown Source)

        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)

        at java.awt.Window.<init>(Unknown Source)

        at java.awt.Frame.<init>(Unknown Source)

        at java.awt.Frame.<init>(Unknown Source)

        at com.buglabs.bug.module.lcd.pub.LCDModlet.getFrame(Unknown Source)

        at buggui.app.BugGuiApp.createUI(Unknown Source)

        at buggui.app.BugGuiApp.<init>(Unknown Source)

        at buggui.servicetracker.BugGuiServiceTracker.doStart(Unknown Source)

        at com.buglabs.application.AbstractServiceTracker.addingService(Unknown Source)

        at org.osgi.util.tracker.ServiceTracker$Tracked.track(Unknown Source)

        at org.osgi.util.tracker.ServiceTracker.open(Unknown Source)

        at buggui.Activator.start(Unknown Source)

        at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)

        at ch.ethz.iks.concierge.framework.BundleImpl.start(Unknown Source)

        at com.buglabs.bug.program.UserAppManager.startApp(Unknown Source)

        at com.buglabs.bug.program.UserAppManager.processQueue(Unknown Source)

        at com.buglabs.bug.program.UserAppManager.run(Unknown Source)

        at com.buglabs.bug.program.ProgramServlet.doPost(Unknown Source)

        at javax.servlet.http.HttpServlet.service(Unknown Source)

        at javax.servlet.http.HttpServlet.service(Unknown Source)

        at com.buglabs.osgi.http.HttpServer.processRequest(Unknown Source)

        at com.buglabs.osgi.http.HttpServer.run(Unknown Source)

        at java.lang.Thread.startup(Unknown Source)

[Thu Jan 01 00:21:23 GMT 1970] [ERROR] Failed to start application bundle: /usr/share/java/apps/BugGui.jar

        Exception: Error starting bundle Bundle [40]: file:/usr/share/java/apps/BugGui.jar

org.osgi.framework.BundleException: Error starting bundle Bundle [40]: file:/usr/share/java/apps/BugGui.jar

        at ch.ethz.iks.concierge.framework.BundleImpl.startBundle(Unknown Source)

        at ch.ethz.iks.concierge.framework.BundleImpl.start(Unknown Source)

        at com.buglabs.bug.program.UserAppManager.startApp(Unknown Source)

        at com.buglabs.bug.program.UserAppManager.processQueue(Unknown Source)

        at com.buglabs.bug.program.UserAppManager.run(Unknown Source)

        at com.buglabs.bug.program.ProgramServlet.doPost(Unknown Source)

        at javax.servlet.http.HttpServlet.service(Unknown Source)

        at javax.servlet.http.HttpServlet.service(Unknown Source)

        at com.buglabs.osgi.http.HttpServer.processRequest(Unknown Source)

        at com.buglabs.osgi.http.HttpServer.run(Unknown Source)

        at java.lang.Thread.startup(Unknown Source)

 

 

This suggests my file system may not be what it should be and important jars are missing. I don't have the time to sort through the file system process (http://bugcommunity.com/wiki/index.php/Upgrade_your_BUG_memory_card#Memory_Card_Flashing_via_a_Linux_LiveCD) and don't have a working memory card writer at the moment, so this will have to wait.

 

Jul-07-2009

 

Andrew updated the memory card for me based on the instructions at http://bugcommunity.com/wiki/index.php/Upgrade_your_BUG_memory_card using a Linux virtual machine (my winxp machine refuses to boot off a liveCD USB stick.).

sudo e2fsck -f /dev/sdb1 reported some errors so there is a chance that the memory card is bad.

Connecting the bug back home launched a second installation of the ethernet driver -- I'm not sure why it didn't reuse the first connection I configured two days ago. After I reconfigured that second connection to 10.10.10.10, I could not connect to the bug through either SSH or the web browser -- eight got a connection refused error so the necessary servers are probably not running on the bug.

 

Jul-28-2009

The nice folks from BUGlabs sent me an up-to-date SD card and after installing it, I can finally see the BUG from my host machine and push applications to it - the GUI test finally runs. Yay!

Comments (0)

You don't have permission to comment on this page.