The text of a manual · part 11 of 13
TREQ-M4 Mobile Data Terminal Manual: Chapter 7. Optional Peripherals
Pages 71 to 84 of 98, from TREQ-M4 Mobile Data Terminal Manual
The original document is the PDF (2.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the QSI Corp TREQ-M4, Beijer TREQ-M4 and Micronet TREQ-M4
Page 71
CHAPTER 7
OPTIONAL PERIPHERALS 7.1 USB USB mass storage devices may be accessed programmatically via the standard C file I/O routines (e.g., fopen, fwrite, etc.) or the Windows API functions: CreateFile, ReadFile, WriteFile, and so on. Refer to the documents listed in section 6.1.2, “Related Documents” for more information. The USB-to-serial converter used for the ActiveSync connection described in Chapter 5, “Connect to a PC Via ActiveSync” is an optional USB peripheral. This device uses an FTDI chipset for the USB to serial conversion. The TREQ-M4 includes driver support for this chipset. USB-to-serial converters with other chipsets are not natively supported and will require additional third-party Windows CE drivers. The standard COM port interface described in section 6.3.5, “Serial Ports” can be used to interface with this device. Many other optional USB device peripherals may be attached to the TREQ-M4. Beijer Electronics supports mass storage, USB-to-serial converter, keyboard/mouse human interface, and hub devices. Wired Ethernet and 802.11b/g WiFi adapters are also supported (refer to section 7.2 and section 7.3). Other devices may be attached and used provided there are available Windows CE 6.0 drivers that will run on an ARM platform. APIs for these devices must be provided by a third party or from custom drivers.
7.2 Wireless Ethernet The TREQ-M4 provides 802.11b/g wireless Ethernet capability via an external USB WiFi adapter: Xterasys model XN-3135G. For more information about the adapter refer to: http://www.xterasys.com/product/xn3135g.htm. This device utilizes the Ralink RT2501USB chipset. Drivers for this device are included in the TREQ-M4 file distribution. Other USB WiFi devices that include the same Ralink chipset may work with the Xterasys drivers on the TREQ-M4. Windows CE provides a programmatic interface for using the WiFi adapter via the Winsock API. Refer to section 6.3.6, “Network” for more information on Winsock. Wireless Ethernet adapter configuration in Windows CE is provided by the Wireless Zero Configuration service. For more information about this service refer to: http://msdn.microsoft.com/en-us/library/aa916223.aspx.
TREQ-M4 Mobile Data Terminal
61
Page 72
Ethernet (over USB)
Optional Peripherals
Figure 30 illustrates the Wireless Zero Configuration after the USB WiFi adapter has been inserted.
Figure 30 Wireless Zero Configuration
7.3 Ethernet (over USB) The TREQ-M4 supports USB-to-wired Ethernet adapters based on the ASIX AX88772 chipset. Drivers for devices based on this chipset are included in the file distribution. Nintendo® Wii™ USB LAN adapters based on the AX88772 chipset will work with the TREQ-M4. When the adapter is inserted, the TREQ-M4 will display a new connectoid labeled AX887721 in the Network and Dial-up Connections dialog box (see Figure 13, “Network Connections”). This new Ethernet connection may be managed in the same way as the DM9CE1 internal Ethernet connection. Refer to section 4.1.6, “Network and Dial-up Connections” for more details.
Figure 31 Network Connections, New Connectoids
62
TREQ-M4 Mobile Data Terminal
Page 73
Optional Peripherals
Magnetic Card Reader
7.4 Magnetic Card Reader The TREQ-M4’s card reader device is bidirectional: a card is read by sliding it either forward or backward. The card reader provides input to Windows CE via keyboard emulation. Characters encoded on a one, two, or three magnetic stripe card are sent in the form of Windows messages to an application as if the same characters were typed on a USB keyboard. Applications need only to receive and decode the virtual key codes sent via the WM_KEYDOWN message as the card is swiped. Refer to the following MSDN article for more information on the WM_KEYDOWN message: http://msdn.microsoft.com/en-us/library/aa921842.aspx. CAUTION
☞
If a key is pressed on a USB keyboard that is connected to the TREQ-M4 while the card reader is transmitting characters, the data from the card reader may get corrupted. Figure 32 illustrates how the QEditCE.exe program intercepted and displayed a sequence of six swipes of a magnetic card. The last few characters may differ depending on the direction of the swipe.
Figure 32 Magnetic Card Swipe Example
7.5 Bluetooth The TREQ-M4 provides several connectivity options when configured with the Bluetooth option and paired with another Bluetooth device. Virtual serial port, personal area network, human interface device, and headset connectivity options are described in detail in this section. These options have some native application support that allows use and testing of the Bluetooth connection. Other options are available via APIs and Bluetooth Profiles provided by Windows CE. Refer to the following MSDN articles for more information about these topics: http://msdn.microsoft.com/en-us/library/aa916530.aspx http://msdn.microsoft.com/en-us/library/aa915866.aspx
TREQ-M4 Mobile Data Terminal
63
Page 74
Bluetooth
7.5.1
Optional Peripherals
Pairing Use the Bluetooth Manager Control Panel applet to pair Bluetooth devices (refer to section 4.1.8, “Bluetooth Manager”).
Figure 33 Bluetooth Manager Initiate pairing as follows. 1. Select one of the “Untrusted” entries, and then press --> to move the selected device to the “Trusted” window. A prompt appears asking if you need to authenticate the device with which you are trying to pair. 2. First try pairing with a device without authenticating. Tap [No] at the prompt. If successful, the pairing operation will finish by adding the device entry to the “Trusted” window. 3. Now try to pair with authentication by tapping [Yes] when prompted for authentication. A PIN code dialog box appears as shown in Figure 34. This is the security code that is used for authentication and encryption with the other Bluetooth device. In the example illustrated, a USB to Bluetooth adapter was used on the PC to pair with a TREQ-M4 terminal.
Figure 34 Bluetooth Manager Requesting Pairing Authentication
64
TREQ-M4 Mobile Data Terminal
Page 75
Optional Peripherals
Bluetooth
4. Enter a code of your choice. It is recommended to use at least eight random characters. The device with which you are trying to pair should open a similar dialog box prompting for a security code.
Figure 35 PC Requesting Pairing Authentication 5. Enter the same code on the remote device immediately. The two devices should be paired at this point. Pairing is confirmed when the Bluetooth Manager moves the “Untrusted” device to the “Trusted” window.
7.5.2 qbtM4 Beijer Electronics provides a utility called qbtM4.exe (refer to section 4.7.2, “Beijer Electronics”) that can be used for a number of Bluetooth troubleshooting and development tasks involving service discovery and scanning operations. This application also contains a built-in test feature that may be used for characterizing throughput and signal strength when the application is executed on two connected TREQ-M4 terminals. Figure 36 shows the qbtM4 application after running device and service scans. In this example, the TREQ-M4 has detected a USB Bluetooth adapter on a PC advertising a serial port service.
TREQ-M4 Mobile Data Terminal
65
Page 76
Bluetooth
Optional Peripherals
Figure 36 qbtM4 Bluetooth Utility Application To test throughput and signal strength, do the following. 1. On one TREQ-M4 terminal, start the qbtM4.exe application. 2. Perform a scan by tapping [Scan for Devices]. 3. Highlight the other terminal in the “Detected” window, and then tap [Test]. The Bluetooth Connection Test control panel is displayed. 4. Follow the same steps on another TREQ-M4 terminal by scanning and selecting the first terminal and then opening the Bluetooth Connection Test control panel. 5. Once both units are ready to start the connection test, configure one of the units to operate as a server by tapping the [Server/Client] toggle button until “Server” appears. 6. Tap [Connect]. 7. Configure the remaining terminal as a client by tapping [Server/Client] until “Client” appears. 8. Tap [Connect] on the client terminal.
66
TREQ-M4 Mobile Data Terminal
Page 77
Optional Peripherals
Bluetooth
Figure 37 shows the Connection Test and Test Settings dialog boxes.
Figure 37 qbtM4 Connection Test and Test Settings As the connection test runs, the received signal strength (RSSI) and throughput are displayed in both bar graph and decimal form. The Test Settings dialog box allows configuration of the data block transfer size. The default is a four Kbyte payload.
7.5.3
Virtual Serial Port The TREQ-M4’s Bluetooth device can be used to establish a virtual serial port connection with another Bluetooth device (such as a PC with a Bluetooth adapter). 1. First scan and pair with a remote device that supports the serial port profile. The serial port service is identified by an icon consisting of a blue circle enclosing two arrows that appear to chase one another. 2. After moving this service to the “Trusted” window in the Bluetooth Manager, right-click on the service, and select the Active option from the resulting menu (see Figure 38). This registers a virtual com port or Bluetooth serial port on the terminal, and it assigns the new serial port a device name with the prefix BSP. At this point, the index associated with this prefix is unknown to the user.
Figure 38 Activate Bluetooth Serial Port Service
TREQ-M4 Mobile Data Terminal
67
Page 78
Bluetooth
Optional Peripherals
3. Launch the MinTermCE program on the TREQ-M4 (refer to section 4.7.2, “Beijer Electronics”). 4. Select a new serial port from the COM Port drop-down list that starts with “BSP.” The Bluetooth Manager does not identify which index is assigned to the new virtual serial port (suffix). If this is the first Bluetooth serial port created on the device, the index is one, thus the desired port would be “BSP1.” You will need to use trial-and-error in MinTermCE to find the correct Bluetooth serial port because invalid ports cause an error. Figure 39 shows an active virtual serial port connection using MinTermCE.
Figure 39 Bluetooth Virtual Serial Port Connection in MinTermCE You can also check the HKEY_LOCAL_MACHINE\Drivers\Active registry keys for a “BSP#” device to determine the correct port. Figure 40 shows how the RegEditCE program (see section 4.7.2, “Beijer Electronics”) can be used to check these keys.
Figure 40 Examining Active Driver Registry Keys With RegEditCE 5. After selecting the correct serial port in MinTermCE, activate the port by pressing the Port Open icon. This connects the serial port service of the terminal with the serial port service
68
TREQ-M4 Mobile Data Terminal
Page 79
Optional Peripherals
Bluetooth of the remote device. Follow the steps required by the remote device to accept the virtual serial port connection. 6. Open a terminal emulator on the remote device (such as HyperTerm on a PC), and select the proper serial port for the remote device’s Bluetooth serial port. 7. Once the terminal emulator is connected, type some test messages and send them to the terminal. Do the same on the terminal to ensure that the terminal can both send and receive messages over the Bluetooth serial port. Figure 41 shows an example session from a terminal emulation program running on a PC’s Bluetooth serial port (COM22).
Figure 41 Bluetooth PC Virtual Serial Port Connection Without a specialized application, the terminal will only act as a client that initiates these Bluetooth serial port connections. The standard COM port interface described in section 6.3.5, “Serial Ports” can be used to programmatically interface with the Bluetooth serial port device. Use BSP#: as the driver port name instead of COM#:.
7.5.4
Personal Area Network The TREQ-M4’s Bluetooth device can be used to establish a Personal Area Network (PAN) connection with another Bluetooth device (such as a PC with a Bluetooth adapter). 1. First scan and pair with a remote device that supports the Personal Area Networking profile. The PAN service is identified by an icon consisting of two PC monitors with a drawn wire connection.
TREQ-M4 Mobile Data Terminal
69
Page 80
Bluetooth
Optional Peripherals
2. After moving this service to the “Trusted” window in the Bluetooth Manager, right-click the service, and select the Active option from the resulting menu (see the third service icon in Figure 38 above). This registers a new network connection with Windows CE. 3. The Network and Dial-up Connections Control Panel applet contains an additional connectoid called “BTPAN1” that reflects the newly registered network connection. Use the Properties dialog box for this connectoid to set IP configuration parameters. Refer to section 4.1.6, “Network and Dial-up Connections” for a description of this Control Panel applet and instructions on how to set up IP configuration parameters. Figure 42 illustrates the Properties for the Bluetooth connectoid and some sample IP parameters. This example shows a connection with a static IP address.
Figure 42 Bluetooth Connectoid IP Configuration 4. Follow a similar setup on the paired device. On a PC running Windows XP, use the Bluetooth Network Connections dialog box to set up IP configuration parameters. This dialog box is accessible from the Network Connections Control Panel application. Figure 43 illustrates this setup. This example shows a connection with a static IP address that is on the same subnet as the TREQ-M4 device.
70
TREQ-M4 Mobile Data Terminal
Page 81
Optional Peripherals
Bluetooth
Figure 43 Bluetooth PC Connection IP Configuration and Ping Test 5. Use the ping program to test the PAN connection. Figures 43 and 44 show a successful ping test.
TREQ-M4 Mobile Data Terminal
71
Page 82
Bluetooth
Optional Peripherals
Figure 44 Ping Test of the PAN Connection on the TREQ-M4 The standard Winsock API can be used to programmatically interface with paired Bluetooth devices over a PAN connection. Refer to section 6.3.6, “Network” for more details.
7.5.5
Human Interface Device The TREQ-M4’s Bluetooth device can be used to support Bluetooth-enabled mice, keyboards, and other Human Interface Devices (HID). 1. First enable a keyboard and mouse for discovery, and then perform a scan operation in the Bluetooth Manager. This scan should produce entries in the “Untrusted” window. 2. Pair with the HID devices by selecting them one at a time and moving them to the “Trusted” window. During the pairing operation, the selection of whether or not to use authentication will depend on the keyboard or mouse that is being paired. The behavior of these devices varies. This is because there is no method for entering a security code of your choice on the remote device. Often, these devices will have some means for providing a secure authentication but the TREQ-M4 may not support this. If you are unsure, use an unauthenticated pairing procedure. 3. Once paired, right-click on the device in the “Trusted” window of the Bluetooth Manager and select Active. This should perform the operations needed to use the service specified by the entry in the “Trusted” window. Perform these steps for each HID device. 4. Move the mouse, or type on the keyboard to ensure that the Bluetooth devices are working properly with the TREQ-M4.
72
TREQ-M4 Mobile Data Terminal
Page 83
Optional Peripherals
7.5.6
Bluetooth
Headset Profile The TREQ-M4’s Bluetooth device can be used with audio headsets that support the Bluetooth Headset Profile (HSP). 1. First enable a headset for discovery, and then perform a scan operation in the Bluetooth Manager. This scan should produce entries in the “Untrusted” window. 2. Pair with the HSP device by selecting it and moving it to the “Trusted” window. During the pairing operation, the selection of whether or not to use authentication will depend on the headset that is being paired. The behavior of these devices varies. This is because there is no method for entering a security code of your choice on the remote device. Often, these devices will have some means for providing a secure authentication but the TREQ-M4 may not support this. If you are unsure, use an unauthenticated pairing procedure. 3. Once paired, right-click on the device in the “Trusted” window of the Bluetooth Manager and select Active. This will perform the operations needed to use the service specified by the entry in the “Trusted” window. Perform these steps for the HSP device you wish to use. 4. On the TREQ-M4 terminal, start the BTAGMicVolCE.exe application (refer to section 4.7.2, “Beijer Electronics”), which will open the Bluetooth Audio Gateway and allow you to change the headset microphone volume. The headset microphone volume ranges from 0 to 15 and the suggested setting is a value of 7 or less. 5. You can now record the audio from the headset to a file on the TREQ-M4 (default output is 1.wav saved to the MyDevice folder) by running the application WaveRecCE.exe or RecSndCE.exe, both of which are described in section 4.7.2, “Beijer Electronics.” RecSndCE.exe will record up to 5 seconds of audio on the TREQ-M4 and then play it back through the speaker if the “In Device” box on RecSndCE is set to 0, and it will play back through the headset if the “In Device” box is set to 1.
TREQ-M4 Mobile Data Terminal
73
Page 84
Bluetooth
Optional Peripherals
Notes
74
TREQ-M4 Mobile Data Terminal