Quantcast
Channel: Chainring Circus » CUCM
Viewing all articles
Browse latest Browse all 3

Hacking the 7926G MIDlet Development

$
0
0

Requirements
The hospital is forming our plan to handle closed loop medication administration. What that means to a patient is that their armband will scanned to verify who they are, then the medications will be scanned to verify what they are, then the medications will be administered. We are debating what hardware to purchase and how many items. This fall and winter we are due to upgrade our nurse call phones and the 7926G has become the front runner. The nurses carry it with them every where they go, and they are well cared for devices.

My boss came up with the idea of how to use the phones with our current crop of tablets. There will be a barcode on every computer with its’ name. The nurse will scan the barcode of their computer to associate their phone to the computer, then any scanned data will be sent to that associated computer. My boss wrote the listener for the Windows tablets and I wrote the code for the 7926G.

Below is an approximation of what I drew out on a sticky note. The goal was for the PC team to be able to trouble shoot the phone scanning program quickly and easily without intervention from third level help desk.
7926G Requirements

Test Server
In order to test I built this simple server to communicate with the phone while my boss worked on the Windows receiver.

cat SimpleServer.pl
#!/usr/bin/perl

use strict;
use warnings;

package SimpleServer;

use base qw(Net::Server);

sub process_request
{
        #print qq(OK\n);
    while (<STDIN>) {
        s/\r?\n$//;
        print STDERR "Received [$_]\n";
        print qq([OK]\n);
        last if /quit/i;
    }
}

SimpleServer->run(port => 3000);

Scanner MIDlet
You can download my source code here.

Creating a MIDlet project in NetBeans is left as an exercise for the reader, however, in order to be able to test the scanner on the emulator you need to add the shim to the project resources.

NetBeans Project Resources

In order to deploy the MIDlet, do not include the libraries for the scanner shim.

NetBeans Project Properties

Below are screen shots from the Scanner MIDlet.

The opening screen, a nurse scans the computer that they want to send data.
Initial Screen

The result of a scanned barcoded IP address.
Barcode Scanned

The Help screen.
Help Screen

For trouble shooting purposes I added a form for manual entry of the traget PC IP adress or hostname.
IP Address Manual Entry

Also for trouble shooting purposes here is an alert with the phones’ IP address.
Phone IP Address Alert

More trouble shooting, this time the target PC IP address.
Target PC IP Address Alert

Finally, there is checking to make sure that the target PC is actually listening. I catch the error and display this message for the end user.
PC is not listening error.

This was a fun project, so much so that I spent more than a couple weekends working on it. I would like to thank a number of people from Cisco and our partner. Thanks to David Staudt, Riley MArsh, Louis Bell, Tony Godwin, Jim Stewart, Mike Hamblett, Jim Hooker and Conrad Price. They worked as a team to make sure I was able to develop this application quickly.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images