Wednesday, October 2, 2019

Connecting older LS 4278 scanners to an iPad


The LS4278 model was discontinued in 2012:

It has been superseded by the LI4278 model:

If you have not ordered equipment yet, choose the LI4278.

If you order an LS4278 the device might not come with a printed manual (only one for the cradle). Unfortunately you need various command barcodes printed in the manual to get the device set up, and it is unable to scan a barcode from a computer monitor. You will need to print out various sections of the downloaded PDF manual in order to get things working.

The LS4278 fails to pair via bluetooth with the iPad initially. Apparently iOS requires (or at least supports) some special bluetooth profiles for keyboard support. Zebra provides some instructions for bluetooth pairing with iPad for the newer LI4278 device, but it must be running one of the newer firmware versions:

The instructions for iPad would NOT work with the older LS4278 model. However, I updated the firmware using their 123Scan configuration utility. Sadly the update tool hung after it installed the new firmware when attempting to reboot the scanner. The firmware update seems to be successful though.

This solved nothing. The scanner still does not recognize some of the special iPad pairing instruction barcodes. I think the special bluetooth pairing instructions may be a bit misleading though; I was eventually able to pair it using standard bluetooth HID keyboard device profile. It seems they only allow some sort of "virtual keyboard toggle" using a quick double-click of the scanner trigger, but this was not obvious from the linked article.

At any rate, after configuring the scanner to pair via bluetooth, the iPad would find the scanner, show a spinner after trying to pair, and then provide an unhelpful "pairing device unsuccessful" message. I could see a quick flash of some window that was too quick to read before this. I recorded a screen capture video of the process and paused it at the appropriate point to find that it was asking for the client device to enter a randomly generated PIN code. I later discovered that there is a way to switch the scanner device from static pin code to "Variable PIN Code" mode. However, the instructions are SO unclear on how to make this work.

Here is the full procedure that worked for me for pairing one of these devices to iOS:
  1. Reboot your iOS device (may not be necessary, but I had some trouble from the host device side as well).
  2. Install latest firmware on Zebra scanner. As of this writing, I have LS4278 device running firmware "Release 019 - 2015.10.20 (NBRACAAM-NBCACAAR)". Presumably this is the last version that will be released for this device given the date.
  3. You must have the printed manual to perform the following. The manual is over 300 pages long. If you do not have it, download the PDF from here and print chapter 4 "Radio Communications" and Appendix E "Alphanumeric Bar Codes".
  4. Reset the scanner to factory defaults (there is a code for this somewhere in the manual, or through 123Scan configuration app).
  5. From chapter 4, scan in order:
    1. Host Type: Bluetooth Keyboard Emulation (HID Slave)
    2. Discoverable Mode: General Discoverable Mode
    3. Keyboard Type: North American Standard (may not be necessary)
    4. PIN Code: Variable PIN Code
  6. On iPad, go into Settings -> Bluetooth. The scanner device should appear. Attempt to pair. iPad will display a PIN code to enter on the scanner.
  7. Using printed barcodes from Appendix E, enter the requested PIN code, followed by the "End Of Message" barcode.
    1. NOTE: The manual includes an Appendix D "Numeric Bar Codes" with barcodes for 0-9 and "Cancel" DO NOT attempt to use these barcodes. They don't work, and as soon as the first one is scanned, the pairing process ends as "unsuccessful" in the iPad.
  8. Pairing should be successful after this.
Just when you thought we were in the clear....

Turns out that when you have a bluetooth HID keyboard device attached to the iPad, it will no longer display the on screen keyboard (at all). There is no workaround for this:

The special iPad instructions for the newer LI4278 scanner device allow you to bring up the on screen keyboard using a quick double-click of the scanner trigger. Since this won't work with the LS4278, I used a female USB type-A to lightning bolt adapter to connect a physical keyboard to the ipad. Now both scanner and physical keyboard work.

Finally, the scanner may be too fast for some iPads.  This may manifest in dropped characters while scanning into a Mosaic web page.  Consult your manual and find the command barcodes for setting "HID Keyboard Keystroke Delay" The options are "No Delay 0ms (default)", "Medium Delay 20ms", and "Long Delay 40ms".  We have found that the 40ms delay fixes issues.

[This information provided courtesy Mathias Smith who spent quite a bit of time and effort working through these issues!]