OPN2002

Revision as of 24 August 2010 20:46 by Administrator (Comments | Contribs) | (Links) m

About

The OPN2002 is Opticon's most popular Bluetooth scanner. Armed with a variety of connection options and the ability to run customizable embedded applications created with the C-Library Kit, the OPN2002 is an incredible versatile scanner in the same attractive form factor of the OPN2001.

Concepts and Vernacular

  • Fixed PIN: a PIN code that is preset in the OPN2002. Typically the last 4 characters of the OPN2002's Bluetooth name.
  • Dynamic PIN: a PIN code that is determined at pair time by the Bluetooth host.
  • HID: Human Interface Device. In the case of the OPN2002, it's recognized as a Bluetooth HID keyboard, meaning that each character of a scanned barcode is transmitted to the host as a keyboard press. HID devices cannot be used as a master at pair time, but after pairing with a Bluetooth host, can switch roles and become master devices for reconnection purposes.
  • SPP (VCP): Serial Port Profile (Virtual COM Port). In the case of the OPN2002, it sends data serially to a serial port on the Bluetooth host. Software running on the host can read from that serial port to capture the data.

Supported Platforms

The OPN2002 is usable on most platforms and with most Bluetooth stacks.

Supported systems include:

  • Mac OS X
  • iOS 4+ (including iPads running iOS 3.2) (currently HID only)
  • Windows (all flavors)
  • Windows Mobile
  • Linux
  • Android (SPP only)
  • BlackBerry (SPP only)

Note that OpticonRL is available for those platforms that only permit Bluetooth SPP (as well as some that permit both). For example, versions of OpticonRL exist for both Android and BlackBerry. This enables ISVs and end-users to get barcode data into their applications with a minimal amount of effort.

FAQ

I'm trying to connect the OPN2002 to my Mac in VCP mode, but I can't seem to get the pairing to complete.

So Unix machines - which is what a Mac essentially is - have their serial ports implemented in a different way, from what you might be used to with a Windows PC. When a serial device is connected to the Mac, and the kernel is able to map a valid kernel driver to it, a POSIX device file is created under /dev/ for that serial port. After that, programs can read and write to this file, which becomes the same thing as reading and writing from a serial port. Windows uses a similar concept with COM (serial) ports, just implemented slightly differently.
Now, when you connect the OPN2002 to the Mac using Bluetooth VCP (SPP), one of these POSIX device files is created in /dev/. To finish the initial connection, that file must be opened with some program - namely yours. To test this yourself, you can use the Terminal program, and run the 'cat' command against the new file that was created under /dev/ while the pairing process was taking place. After that, the initial pairing should complete successfully.

I have the OPN2001 Simulation Application installed on my OPN2002. The OPN2002 seems to behave as an OPN2001 in USB mode, but I can't poll or download scans over Bluetooth. What gives?

Have you tried the getDSR() function? It simulates the RTS signal over Bluetooth VCP; the RTS signal is normally how the OPN2001 signals that it has data to be downloaded.

Why doesn't my pairing seem to finish when I try to connect my OPN2002 in SPP mode?

The (outgoing) serial port needs to be opened on the Bluetooth host after pairing is complete if the OPN2002 is connecting as a slave; if the OPN2002 is connecting as a master, the (incoming) serial port on the Bluetooth host must be open prior to the pairing attempt for the pairing to succeed.

Why doesn't the OPN2002 reconnect? I'm paired and everything!

If the OPN2002 is to reconnect in slave mode, the user must make the OPN2002 connectable by pressing the small clear key for 5 seconds. This is true for both HID and SPP mode; however, SPP has the additional caveat of the Bluetooth host opening its (outgoing) serial port in order for the reconnection to truly finish. In master mode, the user must make the OPN2002 initiate a reconnection to the Bluetooth host by holding the trigger key for 5 seconds; however, SPP has the additional caveat of the Bluetooth host having already opened its (incoming) serial port prior to the reconnection attempt in order for the reconnection to ultimately finish.

I bought one of those cool CRD2000 things, which holds and charges 10 OPN2002s. Can I use that to load software on, or download data from, multiple OPN2002s at once?

Yes. After the release of OS RBGV0207 and Appload version 1.39, it became possible to update the software on multiple OPN2002s in a single CRD2000. It operates in a sequential fashion, moving from one OPN2002 to the next.
If you have an embedded application on the OPN2002 that stores scanned barcode data, you can also download the stored data from multiple OPN2002s using Opticon's NetO32 program - assuming each OPN2002 has a unique terminal ID set.

Will my COM port change if I reconnect my scanner in SPP mode, but I already have a pairing established between the two devices?

Nope.

Is there a way to make the OPN2002 connectable but not discoverable?

Uh-uh. (They both occur when you hold down the little clear key; the way you use it will determine if the OPN2002 is ultimately being connectable or discoverable.)

Can I send commands to my OPN2002 over Bluetooth SPP?

Sure. You can send Universal Menu Book commands, in the format <ESC><COMMAND><CR>. E.g. <ESC>Z1<CR> returns the software version. You can also customize the OPN2002's embedded application to support whatever commands and/or protocol you define.

Can I connect to the OPN2002 when it's not discoverable?

No; a Bluetooth device must be discoverable and/or connectable to be connected to.

Why doesn't the OPN2002 have an "Eject key" function to quickly toggle the iPad/iPhone/iPod system soft keyboard?

Unfortunately, whatever method Apple uses to implement this behavior has been obfuscated from even incredibly technical users and savvy developers. We've put efforts into figuring it out, but to no avail; until Apple decides to release this information, or create a way for non-keyboard Bluetooth HID keyboards (scanners) to do this, then it won't be possible. In the meantime, to get around this, one may create a custom input view (soft keyboard) in their iOS application, and display it, even when the OPN2002 is connected. See sample code posted on Opticon USA's main website.

OS Release Log

Links