Our first Android App… a Palm Pilot Conversion

July 23rd, 2013

nexusA client recently asked us to develop an Android application for the Nexus 7. While we are very familiar with UI’s and had developed a few iOS apps, this was our first foray into the Android world. How different could it be from the iPhone? It’s just a different language, right?

One of the first things we noticed is the level of development required. The iPhone tool-set seems to provide more default functionality. My first try at rotating the screen on the Android tablet was a complete surprise. All my data disappeared! Saving the state for screen rotation? This was unexpected. There are lots of methods for saving state in an Android app, but it turns out in the simple case you can get the SDK to do it for you. Why wouldn’t that be the default?

Our client needed to retrieve data from legacy factory-automation hardware using a proprietary protocol over Bluetooth. The goal was to replace an obsolete Palm Pilot mimicking the Palm functionality. Changes to the custom hardware would have been prohibitively expensive.

With Palm code in hand, we set out reverse engineering the software and documenting the protocol for the interface. The first snag was the UUID. Their hardware wasn’t broadcasting service UUIDs, instead it was using the Serial Port Profile. Once that was out of the way, the Android device wanted to pair. There was no documentation available. Luckily, after a few trial passwords we found one that worked. Finally paired with the device, it was time to give the protocol a try.

Reverse engineering the protocol was actually a good thing in this case. We became familiar with both the method the protocol used and the way to handle it. Once we understood the pattern, we generalized it for most of the protocol handling. Protocol handling complete, we moved onto the user interface. While the Android Listview is the standard way of doing things, it wasn’t as straightforward as I had hoped. One of the tutorials referred to it as, “powerful but slightly complicated.” I have to agree!  We did get it working and it has a fairly standard look to it; a simple black background with list items to select.

Testing the app brought a few more items to our attention. Once resolved, we were able to deliver the app to our client. This is one area which is vastly simpler than iOS deployment! We mailed the app to our client and after a few small changes, the app was up and running on their tablet. For business applications deployed internally or on a limited basis, this certainly seems like the way to go.

With one successful Android app under our belt, we are looking forward to the next one! If you’re looking for assistance with converting an old application to a mobile platform or have a new need for a mobile application, please contact us!

Sometimes We’re Blindsided by the Obvious

August 27th, 2011

Fanless Linux ComputerIf you have been doing something one way for so long, you might not see the alternatives.

Recently, we learned one of our clients was investigating a newer fanless Linux computer for their printing product. Llamawerx developed the software as well as embedded webpages for the current version. The new hardware promises to be faster, have more memory, more cache, etc., etc.

An embedded web server hosts an application designed to upgrade the translation software and manage certain parameters on the box. Since the unit operates with a read-only file system, operations remount the file system read-write, update the files, and return it to read-only. Usually, an automatic reboot takes place too. An internal speaker on the older hardware beeps when the system resets. The newer hardware reduces costs by eliminating the speaker. According to our client, this poses a problem because the customer won’t know when the system completes rebooting, and they may power-cycle the machine while the file-system is an unstable state.

Being technically astute, our client started designing a solution that would add either a speaker or an LED indicator. When we found this out, we felt there had to be a better way. Yes, his solution would replicate the original platform and would work great on a test bench, but these units will be spread around the facility out of earshot. Since I developed the web application, I suggested modifying it to add an on-screen indicator. Using Javascript, the webpage could retry connections to the web server and detect when the reboot was complete. This seems much simpler than designing an external circuit and it will work with units connected with Ethernet in other buildings.

Our client agreed, “Using a refresh of the webtools would be an excellent way to monitor the status of the box during reset conditions.” Sometimes we’re blindsided by the obvious. At Llamawerx, it’s our job to show you the alternatives.

LabWindows/CVI Success Story

July 30th, 2011

LabWindows/CVIPerhaps we can help you with the CVI?

That was the question I posed to our client, who was struggling to find time to complete a LabWindows/CVI program for his customer. During development of the embedded side of our project, I had helped him integrate a CVI program communicating over the CAN network. When I found out he signed up to do another CVI program, I offered my help.

LabWindows/CVI is a “C” development tool by National Instruments, the makers of the popular LabView program. Like other application builders, you design a screen using rich, GUI controls and tie those controls to ANSI “C” callback functions. NI provides an extensive library of GUI routines as well as more sophisticated control and analysis modules.

For this particular project, we enhanced a tab-style user interface that would read and write values to the embedded system using the CAN protocol. Libraries to read/write the CAN messages were already available, so it was a matter of modifying the user interface and “hooking up” the callback routines.

As often happens with GUI programs, it’s very easy to generate a lot of repetitive code. Nothing feels worse to a software engineer than repetitive code. With a simple look-up table and algorithm, dozens of statements were replaced, making the program easier to follow and more maintainable.

What began with me looking-over-his shoulder, pair-programming remotely, (we use a GotoMeeting like program called Glance) morphed into doing the programming. By the end of the day, he sent me the source code so that I could continue on my own. The next day, while he was tied up in meetings, I continued making progress towards our goal. During his hour drive to the customer site for testing, I was still able to work – uploading the changes right before he arrived.

In the end, we successfully delivered the enhancements his customer needed by working in parallel with a very short amount of time.

WordPress Makes Online Forms Easy

May 2nd, 2011

I want to ask you about making a form that people can fill out online. Right now I have this application form for volunteers and people have to download it, fill it out scan it and send it back. This appears to be a bit much for the less tech-savvy among us so I want to make it a bit simpler.

This message showed up one morning from Lori Carlson, President of the Ponheary Ly Foundation. Last year, I transferred the PLF’s website from Joomla to WordPress making it much easier for Lori and her volunteers to update. When it came time to add a “Contact Us” page I picked the Contact Form 7 plugin. Would it work for a longer form? I quickly replied knowing that in Cambodia, Lori would be heading to bed, and I wanted her to know I was on it.

I knew the form she was talking about: a 3 page PDF with questions volunteers fill out and email or snail mail back to the Lori. In a couple of minutes, I created a new WordPress page with a couple of sample questions from the form: a text field, a longer text area and a checkbox. A couple of mouse clicks later, I confirmed the basic validation worked and received the email. In less than an hour, Lori received the emails and a link for her review.

The amazing thing about working 11 timezones away is you work while they sleep and vice verse. At the end of the day, I received the go ahead and started adding all 37 questions, formatting the layout and editing the email templates. By the time Lori’s day was over, she had a complete volunteer form to review.

A couple of revisions later, we not only had an online form automatically emailed to the Foundation, but we also improved the navigation surrounding volunteering making the steps clearer and easier to follow.

Lori, Ponheary and everyone associated with the PLF do amazing work for the children in Cambodia. It’s very rewarding to be a small part of it.

M2M: Dumb Modem or Intelligent Device?

April 6th, 2011

Integrated M2M

Choosing the wireless module for a machine-to-machine (M2M) project is a critical part of the design process with competing trade-offs: technology, cost, familiarity, and certification to name a few. Another increasingly important factor involves selecting between a “dumb modem” and an “intelligent device.”

Traditionally, M2M communication devices consisted of two components: a host processor and a modem. The host processor executes the application software while the modem handles the communications. In a small cellular system, the host might be an 8-bit micro-controller coupled with a “dumb”  modem from Sierra Wireless, Telit, CINTERION, etc. Together, they would communicate using AT commands over a serial port.

Over time, the modem vendors sought to differentiate themselves, expanding their products and bringing more value to the table. Today, most have a number of digital inputs and outputs, analog inputs, memory, flash and various peripherals. Many also include a programming language and APIs so you can develop your application directly on the module — transforming it from a “dumb modem” to an “intelligent device.”

By eliminating the host processor and support peripherals, the design can be simplified. A simpler design usually means lower costs — less engineering time, faster time to market and shorter BOM. The software design may be easier too, since the need to communicate via AT commands over a serial port disappears.

Product managers and engineers point out that an integrated approach will “lock-in” the module vendor making it  difficult to replace the module with another vendor’s offering. Even selecting a new technology from the same vendor can cause problems. For example, a GSM and CDMA module may be pin-compatible but lack firmware making them software compatible. Manufactures face component end-of-life all the time and manage the life-cycle of their design. M2M vendors understand the long-term nature of M2M products and work diligently to provide long-term availability and compatibility.

At Llamawerx, we’ve helped clients navigate these decisions before in diverse industries like security, vehicle tracking and monitoring. By successfully building and deploying thousands of units based on Sierra Wireless’ Open AT technology, we’ve proven the integrated approach works.

To learn more about specific technologies in the Llamawerx tool chest, visit www.llamawerx.com/technology.php or contact us at info@llamawerx.com.