views:

185

answers:

4

I have a handheld scanning device running Windows 6.0. the handheld is responsible for scanning barcodes at a stationary position outdoors as people enter and leave a building. The primary concern for this application is to get people in and out as quickly as possible.

Now the handheld is communicating with a computer in another building that is behind thick concrete walls. All it does is connect to a socket, send the barcode information, and receive a small xml file in response.

What do you think would be the best way to handle the application not getting a strong signal? Should I let the OS handle the warnings and possible disconnection, or should I monitor the application and shut it down if the signal strength drops to 1 bar for a defined period of time?

The problem with letting the OS handle everything, is that I don't know if the user will have low signal strength warnings enabled. Plus if it is a weak signal, and the user continues to use the application, it will greatly slow down the queue.

If I shut it down myself, I at least ensure the user has to stop using the application and switch to a manual method, but the downside is if the weak signal was just an anomaly then I've disconnected the application and now I've stuck the user with the responsibility of trying to reconnect every few minutes and seeing if it works yet. (Once the connection is lost, it can't automatically be restored, it requires user input).

This is the first application I've made for a handheld device, so I'm not sure what the standard approach to an issue like this is. Any advice?

+2  A: 

One thing to consider is a better antenna on the wireless router (google will turn up many options). Some devices can also accept an external antenna, either natively or via a hardware hack.

On the software side, perhaps consider displaying a warning in a status area indicating that the signal strength is weak and suggesting the manual method until a better signal strength is achieved. I would certainly leave it up to the user to decide how to proceed. Few things are more irritating to an end user than software trying to be more clever than the user.

Eric J.
PS - Not wanting to drive to Fry's on a Sunday, I made a very successful DYI signal booster that got me from 1-2 bars to a solid 4 bars in a room far from my home router: http://www.binarywolf.com/249/diy-parabolic-reflector.htm
Eric J.
Well I actually don't know much about networking, but I didn't want to ask about antennaes and routers here in case it got the question closed. We were previously using a wireless router and antenna but the signal kept getting dropped either due to weak signals or interference. Is the only way to test how reliable my application will be on their hardware other than actually setting up the entire network and trying it out?
Brandon
You won't know how your app will work in their environment until you are there, but you CAN test your app's behavior with a low signal strength by shielding your router's antenna to create various levels of low signal. A tin can (e.g. coffee can) over the antenna goes a long way toward stopping it's signal.
Eric J.
A: 

Do you do anything with the result?

If not, you could just add the scanned bar code to some kind of queue which would then allow you to immediately scan the next one while the queue is processed on another thread.

Oll
Yes, the result is basically a count of how many people are currently in the building, and whether or not the person is allowed entry. So the line will be held up until a response is received.
Brandon
How are you communicating with the computer? A web service?
Oll
I just open a socket and the handheld will connect directly to it. I'm not sure what the name for that is. Networking is not my strong point.
Brandon
A: 

A good approach can be a heartbeating algorithm for your connection. Just send a “ping” to your server using your socket and wait for the “pong”.

In the production environment you can adjust the ping timeout to detect with a good accuracy when the connection is lost or is to bad for your application.

Dani Cricco
A: 

How many devices are running your application?

Onkar
1 for now, possible a few more later on.
Brandon