BUG Community

Welcome! Log In

Forums Applications Running a basic LCD application

Subscribe to Running a basic LCD application  15 posts, 5 voices

Log in to reply to this topic
 
Jul 8, 2011 5:15pm
User_img_not_found_05_med jhernandez 6 posts

Hi,

 

I am building my first demo applications for our bug device, i built a simple application which show a screen with the gps coordinates. It runs well on the simulator but when i send it to the physical bug it doesn’t show the screen it should, instead it remains in the main bug screen.

In the bug, if I long click in myapp icon and it shows the option: “stop” as if it were running. do you know why i can not see my screen in the bug’s LCD

 

tks

Jul 14, 2011 2:41pm
Medium Bug Labs team jconnolly 285 posts

Hi,

 

I am building my first demo applications for our bug device, i built a simple application which show a screen with the gps coordinates. It runs well on the simulator but when i send it to the physical bug it doesn’t show the screen it should, instead it remains in the main bug screen.


Hi Jhernandez, sorry about the response delay.  Can you give me some information about your configuration?  For example, in your ServiceTracker you’re likely binding to some services, for example, BUGCamera_HelloWorld’s Activator:

private static final String [] services = { ICamera2Device.class.getName(), IModuleDisplay.class.getName(), ICameraModuleControl.class.getName(), IButtonEventProvider.class.getName(), }

That determines when your application’s code will run.  It may be that on the BUG Simulator, the services you require are available, but on the Physical BUG they are not.

 

In the bug, if I long click in myapp icon and it shows the option: “stop” as if it were running. do you know why i can not see my screen in the bug’s LCD

This helps manage the runtime of the bundle, but not your application.  Your bundle has started, but your app’s run method (or other method, depending on how you wrote your app) has not been called.

Jul 14, 2011 2:48pm
User_img_not_found_05_med jhernandez 6 posts

Thanks, these are the services i am tracking:

private static final String [] services={
        ILCDModuleControl.class.getName(),
        IML8953Accelerometer.class.getName(),
        IModuleDisplay.class.getName(),
        IButtonEventProvider.class.getName(),
        IPositionProvider.class.getName()
    };

 

in the Bug I have attached the GPS and the LCD modules.

Jul 14, 2011 3:00pm
Medium Bug Labs team jconnolly 285 posts

Ok great, and to determine if those services are available, with the modules attached, if you have shell access via ssh or serial, you can do:

telnet localhost 8090

you should see:

Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. (:

type:

services

And you’ll see a list similar to:

1 org.osgi.service.startlevel.StartLevel 2 org.osgi.service.packageadmin.PackageAdmin 3 org.osgi.service.log.LogService .... 26 org.apache.felix.cm.PersistenceManager service.description = Platform Filesystem Persistence Manager, service.pid = org.apache.felix.cm.file.FilePersistenceManager, service.ranking = service.vendor = Apache Software Foundation 27 org.osgi.service.cm.ConfigurationAdmin service.description = Configuration Admin Service Specification 1.2 Implementation, service.pid = org.apache.felix.cm.ConfigurationAdminservic e.vendor = Apache Software Foundation 29 org.osgi.service.log.LogService 30 org.osgi.service.log.LogReaderService (:

 

 

Jul 14, 2011 3:26pm
User_img_not_found_05_med jhernandez 6 posts

ok, i am able to type services in telnet but before, I had to remove the gps module, otherwise i get a cascade of GPS messages which do not allow me to enter the word “services”. is there a chance to avoid seeing those gps messages?

Jul 14, 2011 5:18pm
Medium Bug Labs team aturley 4 posts

jhernandez:

These messages are printed when the GPS module cannot get coordinates. It should handle this situation in a less verbose way, but it doesn’t. You should stop seeing these messages if you attatch the GPS antenna and place it somewhere where the device can get a better signal (for example, near a window if you can find one).

I’m trying to find a better solution, but that’s the best I can give you for right now.

Jul 18, 2011 12:14pm
User_img_not_found_05_med jhernandez 6 posts

I got the following from the telnet, i checked and it seems that all the services i am tracking are in the list (I highlighted those services). please let me know if you see something out of order:

p { margin-bottom: 0.21cm; }

1
org.osgi.service.startlevel.StartLevel


2
org.osgi.service.packageadmin.PackageAdmin


3 org.osgi.service.log.LogService Buffer Size = 32, Error Stream =
java.io.PrintStream, Implementation =
com.buglabs.osgi.log.LogServiceImpl, Log Level = 3, Output Stream =
java.io.PrintStream, Quiet = false, service.ranking =


4
org.osgi.service.log.LogReaderService Buffer Size =
32, Error Stream = java.io.PrintStream, Implementation =
com.buglabs.osgi.log.LogServiceImpl, Log Level = 3, Output Stream =
java.io.PrintStream, Quiet = false, service.ranking =


5
com.buglabs.bug.base.pub.ITimeProvidiml8953er


6 com.buglabs.device.IButtonEventProvider Button =
User, Provider = com.buglabs.bug.base.Activat


7
com.buglabs.bug.base.pub.IBUG20BaseControl
bug.base.version = 2.0


8
com.buglabs.bug.base.pub.IShellService


10
com.buglabs.module.IModuleControl
gps.antenna.external = false, ModuleRevision = 0, ModuleVendorID = 0,
Power State = Active, Provider =
com.buglabs.bug.module.gps.GPSModlet, Slot = 0


11
com.buglabs.module.IModuleLEDController
gps.antenna.external = false, ModuleRevision = 0, ModuleVendorID = 0,
Provider = com.buglabs.bug.module.gps.GPSModlet, Slot = 0


12
com.buglabs.bug.module.gps.pub.IGPSModuleControl
gps.antenna.external = false, ModuleRevision = 0, ModuleVendorID = 0,
Provider = com.buglabs.bug.module.gps.GPSModlet, Slot = 0


13
com.buglabs.bug.module.gps.pub.INMEARawFeed
gps.antenna.external = false, ModuleRevision = 0, ModuleVendorID = 0,
Provider = com.buglabs.bug.module.gps.GPSModlet, Slot = 0


14
com.buglabs.bug.module.gps.pub.INMEASentenceProvider
gps.antenna.external = false, ModuleRevision = 0, ModuleVendorID = 0,
Provider = com.buglabs.bug.module.gps.GPSModlet, Slot = 0


15
com.buglabs.services.ws.PublicWSProvider


16 com.buglabs.bug.module.gps.pub.IPositionProvider
service.remote.registration = true


18
com.buglabs.module.IModuleControl ModuleRevision
= 0, ModuleVendorID = 0, Power State = Active, Provider =
com.buglabs.bug.module.lcd.pub.LCDModlet, Slot = 1


19
com.buglabs.module.IModuleLEDController
service.remote.registration = trueSlot = 1


20 com.buglabs.bug.module.lcd.pub.IML8953Accelerometer
ModuleRevision = 0, ModuleVendorID = 0, Provider =
com.buglabs.bug.module.lcd.pub.LCDModlet, Slot = 1


21
com.buglabs.services.ws.PublicWSProvider


22 com.buglabs.bug.module.lcd.pub.ILCDModuleControl
service.remote.registration = trueSlot = 1


23 com.buglabs.bug.module.lcd.pub.IModuleDisplay height = ,
service.remote.registration = true, Slot = 1width =


24
com.buglabs.bug.module.pub.IModletFactory


9
com.buglabs.bug.module.pub.IModletFactory Bug-Module-Id =
0001, Source = com.buglabs.bug.module.gps.Activator


17
com.buglabs.bug.module.pub.IModletFactory


25
com.buglabs.bug.module.pub.IModletFactory


26
com.buglabs.bug.module.pub.IModletFactory


27
com.buglabs.bug.module.pub.IModletFactory Bug-Module-Id =
0007, Source = com.buglabs.bug.module.vonhippel.Activator


28
com.buglabs.bug.networking.pub.INetworking


35
com.buglabs.bug.program.pub.IUserAppManager


29
com.buglabs.services.ws.PublicWSAdmin


30
org.osgi.service.http.HttpService openPort = ,
port =


31
com.buglabs.osgi.sewing.pub.ISewingService


32
com.buglabs.osgi.shell.IShellCommandProvider


41
com.buglabs.osgi.shell.IShellCommandProvider


42
com.buglabs.osgi.shell.IShellCommandProvider


43
com.buglabs.osgi.shell.pub.IShellCommandExecutor


44
com.buglabs.osgi.shell.IShellCommandProvider


33
org.apache.felix.cm.PersistenceManager
service.description = Platform Filesystem Persistence Manager,
service.pid = org.apache.felix.cm.file.FilePersistenceManager,
service.ranking = service.vendor = Apache Software Foundation


34
org.osgi.service.cm.ConfigurationAdmin
service.description = Configuration Admin Service Specification 1.2
Implementation, service.pid =
org.apache.felix.cm.ConfigurationAdminservice.vendor = Apache
Software Foundation


36 webadmin.IBatteryInfoProvider


37
com.buglabs.application.IDesktopApp


38
com.buglabs.bug.networking.pub.IStateListener


39
com.buglabs.bug.networking.pub.ISettingsListener


40
com.buglabs.application.IDesktopApp


Jul 18, 2011 1:21pm
Medium Bug Labs team aturley 4 posts

jhernadez,

Can you post your code to Bug Net (http://www.buglabs.net/applications) and make me a collaborator so I can see if I can spot any issues? My username on Bug Net is Andrew Turley.

andy

Jul 18, 2011 5:13pm
Medium Bug Labs team aturley 4 posts

jhernandez,

Thank you for sharing your code. I think the problem is that you do not have IML8953Accelerometer.class.getName() in the services list in Activator.java. As a consequence, accelerometer is null, which cause an NPE in the GUI code, and the UI is never drawn.

I am at home without a working GPS module, so I am not able to verify this on actually hardware, but please try adding the IML8953Accelerometer to the list of services and see if that helps.

andy

Jul 18, 2011 5:39pm
User_img_not_found_05_med jhernandez 6 posts

Thanks for your comments, actually I had IML8953Accelerometer in the list of services before but I decided to remove it in order to see if it was causing the issue. I put it back and the problem is still there. let me know if you find something else. 

Jul 19, 2011 12:56pm
Medium Bug Labs team aturley 4 posts

jhernandez,

I was able to find a working GPS unit. It looks like IPositionProvider.getLatitudeLongitude() returns null if it can’t get a GPS position. Using the null LatLon object later in the code results in an NPE, and since that code is in a GUI call it prevents the GUI from being drawn.

Here’s a forum post that talks about looking at the raw position feed and parsing the data yourself. In the meantime, you should at least check to make sure that the LatLon object is not null before using it.

andy

Jul 20, 2011 1:58pm
User_img_not_found_05_med jhernandez 6 posts

I added a validation to see if LatLon is null, it fixed the problem. Thank you.

Aug 14, 2012 1:55am
User_img_not_found_06_med rubing 103 posts

Isn’t it funny how we www.coachfactorystoreec.com/ Coach Factory Store always want what we can’t have? The girl with the round and pert backside wishes that her rear were 5 times smaller. Meanwhile, the girl with the non existent posterior wishes to achieve a larger butt. Well, if the grass is greener on the other side, just water yours! If you’ve got a small behind, you can create the illusion of a larger one with butt enhancing jeans. Here’s how to do it. Look for light weight denim – This material is very stiff and heavy. If you try to stuff a flat butt into denim jeans, it will only create a flatter looking behind. A little stretch goes a long way – Your butt enhancing jeans should additionally contain some stretch. A mixture of 98 percent cotton and 2 percent lycra is best. This combination of lycra and cotton, especially when it’s in a nice tight-weave fabric that’s fitted through the hip and thigh area will help lift your buttocks. Too much lycra and your jeans may start to ripple like a pair of leggings. If there’s not enough cotton content, there won’t be enough structure to hold you up. It’s all in the pockets – The most effective trick for creating the illusion of a bigger butt is to choose jeans with flap pockets. The added bulk of the flap will enhance and add dimension to your tiny tush. True Religion is notoriously famous for their flap pocket designs. You can also try Hudson, Rock & Republic, Frankie B and Paige for addition flap pocket styles. Pocket placement – If you’re not a fan of flap pockets, or if you’ve already bought too many of them, you can also try denim with regular pockets. Be sure to aim for a pair with smaller pockets that sit higher and this will help make your rear look lifted. Cut is also important – Look for jeans with a slight tapering at www.coachfactoryonliness.com/ Coach Factory Online the knee, such as a straight leg or skinny style. This cut will make your bum look a bit larger in comparison to the rest of your body. Great styles to try are True Religion Billy, Julie or Stella, Siwy Harmah or Rose, and Hudson Emily or Paige. How low can you go – Actually, you don’t want to go too low when it comes to the jean rise. The goal is to project more, not less. A pair of low rise denim will only reduce the size of your rear. Instead, opt for a pair with a medium rise. Color me right – Since dark colors minimize, dark denim and indigo will create a slimming effect. You do not want this kind of effect on your barely there behind! Try to find light colored or medium blue denim. Grey is very flattering and will also work. Like a great bra, butt enhancing jeans can also lift and www.coachfactoryoutletusa.com/ Coach Factory Outlet separate what little you have. So it wasn’t in your genes to have a nice, round bottom. Big deal. Be happy with what you’ve got and just improvise!

Nov 7, 2012 12:41am
User_img_not_found_01_med yiyi 74 posts

Aren’t Alone: 8 Most Disappointing Recent IPOsBy SUSANNA KIMAug. 22, — With
shares of Groupon (GRPN) and Facebook (FB) hitting hitting cheap authentic jordans
hitting all-time lows in recent days, it may be easy criticize the companies’
high valuations. But the two firms have have cheap replica louis vuitton
handbags
have plenty of company in the IPO world. Many companies’
prices struggle in the year following an IPO.But it’s more more cheap authentic jordans more
than possible for those companies to make a comeback eventually. Jim Krapfel,
IPO analyst with investment firm Morningstar, points points

buy real
jordans

points to a handful of them, including Spirit Airlines (SAVE)
Carlyle Group (CG).Discount airline Spirit went public on May 26, 26, cheap replica handbags 26, 2011, at
$12 a share. Shares closed at a $11.55 that day. A year and change later (midday
Wednesday, Wednesday, louis vuitton
outlet
Wednesday, Aug. 22, 2012) shares were trading at
$19.81.Carlyle Group a IPO price of $22 when it went public in in cheap authentic air
jordans
in May. It was trading at $24.87 midday on Wednesday.But the
latest companies that had IPOs can make a big big louis vuitton alma big
comeback, here is Krapfel’s list for eight recent investor Florida Gov. Assures
Romney It’s ‘Full Speed Speed

cheap authentic air
jordans

Speed Ahead’ for GOP ConventionTropical Storm Isaac on Track to
West of Tampa During the ConventionBy AMY BINGHAMAug. 23, 2012 2012

imitation designer
handbags

2012 Florida Gov. Rick Scott today sought to calm fears a
possible hurricane threatening to close down the Republican National National
cheap louis vuitton
handbags
National Convention next week in Tampa, Fla., telling
reporters this “Right now, there is not any anticipation there will be be buy real jordans be a
cancellation.”Scott, a Republican, said it is “still too to know exactly where
Tropical Storm Isaac, which is expected expected cheap designer handbags expected to
intensify into a hurricane on Friday, will hit and, thus, too early to make
evacuation plans, or postpone postpone

cheap replica louis
vuitton handbags

Apr 7, 2013 4:44am
User_img_not_found_01_med yiyi 74 posts

he said. “That’s what we are about.” Advanced Breast Cancer the Rise in Younger WomenMetastatic Breast Cancer Rate Creeping Up Up

Cheap Ralph Lauren Shirts

Up Since 1970sBy CRYSTAL PHEND, MedPage Today Senior Staff WriterFeb. 2013— The number of young women being diagnosed with metastatic metastatic