Software:Accessing the OSGi Console

From BUGwiki

Jump to: navigation, search

The OSGi framework Felix runs on the BUG and acts as the host for BUG applications and libraries. The console allows users to interact with the runtime environment, to manage OSGi bundles and find out more information about what's going on. Additionally, bundles can be installed directly from the console.


Getting to the Console

Accessing the OSGi console from within BUG command line

To connect to the console while logged into your BUG, type:

telnet localhost 8090

Accessing the OSGi console on BUG Simulator

To interact with the OSGi console while using the BUG Simulator, simply use the console in Eclipse!

Accessing the OSGi console from the host

To connect to the console from the host machine, simply

telnet <ip of BUG> 8090

Common Commands and Tasks

root@bug20:~# telnet localhost 8090
Connected to localhost.localdomain.
Escape character is '^]'.

Now you can get help:

(: help
 Command Usage____________________________Description___________________________________________________________________________
 bundles [filter]                         Returns a list of bundles present in current OSGi runtime environment.                
 consumers [(bundle id | bundle name)]... Returns a list of services that each bundle consumes is currently consuming.          
 disconnect                               Disconnect the shell.                                                                 

You can see all the installed bundles like this:

(: bundles
 0 active System Bundle              3.0.1     System Bundle                                                     
 1 active BUG Base Services          2.0.12172 file:/usr/share/java/bundle/com.buglabs.bug.base.jar              
 2 active BMI Bundle                 2.0.12265 file:/usr/share/java/bundle/com.buglabs.bug.bmi.jar               
 3 active BUG SDK Event System       2.0.11642 file:/usr/share/java/bundle/com.buglabs.bug.event.jar             
 4 active BUG JNI Accelerometer      2.0.11405 file:/usr/share/java/bundle/com.buglabs.bug.jni.accelerometer.jar 
 5 active BUG JNI CAMERA             2.0.12266 file:/usr/share/java/bundle/        

See Also

Personal tools