OPN2002

Revision as of 28 October 2010 14:21 by smcghee (Comments | Contribs) | (Support Platforms) m

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.

Downloads

Concepts and Definitions

  • 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.
  • Embedded Firmware: The embedded OS and application that is present on the OPN2002, and required for its function.
  • Embedded OS: A binary common to all OPN2002s that enables the OPN2002 to function and exposes an API that the OPN2002's embedded applications utilize to "drive" the device.
  • Default Firmware, OS, or Application: Refers to standard Opticon software for the OPN2002, typically installed on the OPN2002 at the factory and present out-of-the-box. The OS version string is always RBGVXXYY, where XX denotes the major revision and YY denotes the minor revision. The application version string is RFGAAABB, where AAA denotes the major revision and BB denotes the minor revision. Occasionally, the first 'A' in RFGAAABB is a letter, denoting the Opticon office responsible for developing the software.

Supported Platforms

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

Supported platforms 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: OpticonRL transforms received serial data into keyboard presses, in effect "wedging" barcode data into applications.

Setup & Configuration

Usage

Upgrading

SDK

FAQ

OS Release Log

Links


SDK

Of crucial note is that the OPN2002 does not have an SDK for the platforms it supports. Given the fact that it can transmit data serially via Bluetooth SPP or its USB port, or can transmit data as a Bluetooth HID (keyboard) device, SDKs for the various platforms the OPN2002 supports are not required. This is because the manufacturers of those platforms provide APIs for accessing serial ports and managing Bluetooth connections.

When talking about an SDK in relation to the OPN2002, what is referred to is the C-Library Kit. With the C-Library Kit installed, developers are able to create and customize embedded applications for the OPN2002, thus changing and customizing its behavior to better suit their use cases.

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 how do I know if the OPN2002 has stored data or not when using Bluetooth?

Have you tried the csp2GetDSR() function (GetDSR() for the .NET wrapper)? It simulates the RTS signal over Bluetooth VCP; the RTS signal is normally how the OPN2001 signals that it has data to be downloaded. DSR stands for Data-Signal-Ready.

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 first. With the OPN2002's standard software, this is done by holding the small clear key for 5 seconds. All of the aformentioned 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 (with the standard software, 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?

It depends. Are you reconnecting the OPN2002 as a master or a slave? If you're reconnecting the OPN2002 in the same mode you first paired it to the host with, you'll use that same serial port you opened on the host when the pairing took place. If you're reconnecting in the other mode, it will be with a separate serial port.

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. With the OPN2002's default firmware (OS and application), 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. With default firmware, the clear key serves to toggle making the OPN2002 discoverable AND connectable simultaneously; given the limited number of buttons on the device, this is necessary.

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

This feature has been added to a new OS and application for the OPN2002 which is currently in internal beta testing.

Am I able to change the defaults of the OPN2002's embedded application and the OPN2002 itself?

Yes. You can either customize the embedded application to set new defaults for the application, the scan engine, or the device itself; or you can use the Universal Menu Book to configure certain options and have them "memorized" (saved to flash).

Can I customize, or provide my own handlers, for certain Universal Menu Book codes?

Yes; check out the ExecuteMenuLabel() function in the C-Library Kit's help file.

I can't pair to a PC using the WIDCOMM stack when my OPN2002 is in HID mode. Help!

What's happening here is that the WIDCOMM stack is presuming that it will dynamically determine the PIN code the OPN2002 should supply during pair time. If your OPN2002 is set to use a predefined, fixed PIN code, then the pairing process will error out. Setting the OPN2002 to use a dynamic PIN code will fix the problem and enable you to pair the OPN2002 to your PC.

OS Release Log

Links