Ch 3 - IrDA

advertisement

Chapter 3

IrDA and Bar Code IR

1

IrDA

• The Infrared Data Association ( IrDA ) defines physical specifications communications protocol standards for the short-range exchange of data over infrared light, for uses such as personal area networks (PANs).

2

IrDA

• IrDA is a very short-range example of free-space optical communication. No government regulation!

• IrDA interfaces are used in palmtop computers, mobile phones, and laptop computers

• Many laptops no longer offer IrDA in favor of

Bluetooth or WiFi which don’t need line of sight.

• For the devices to communicate via IrDA they must have a direct line of sight.

3

Bluetooth

• Bluetooth is a short-range wireless communications standard that utilizes radio-frequency transmissions in the 2.4GHz

• RF – not line of sight

• Longer distance, so can be monitored

– Needs encryption

• Industrial-Scientific-Medical (ISM) band

– potentially subject to government regulation

• Devices like garage door openers, baby monitors, and high-end cordless phones already inhabit the ISM band, though, so it's a potentially noisy part of the spectrum.

4

IrDA-Data Bluetooth

Physical Media

Communications

Range

Infrared

Up to at least 1m

RF (2.4 GHz)

10cm to 100m

Connection Type,

Direction

Point-to-Point, Narrow Angle

(30 degrees)

Multipoint, Omni-directional

Maximum Data

Rate

4Mbps (16Mbps on the way) 1Mbps (aggregate)

Security

Physical limitations offer some built-in protection

Authentication, encryption, spread spectrum

Approximate

Cost under $2

Table 1. IrDA and Bluetooth Feature Comparison under $5

5

• Can send document from PDA to printer without any wires connected!

• Use software protocol stack similar to TCP/IP

• IrDA-1.1 standard

– max data size is 2048 bytes

– maximum Xmit rate is 4 Mbps.

6

• You never have to wonder which device you are actually talking to.

• The infrared signal is emitted in a narrow cone of light and with very little signal strength.

• You've generally got to be within one meter of the other device and have your infrared transceiver pointed in its approximate direction.

• So there's not much fear of interference from other IrDA devices (except from fluorescent lights and other background producers of infrared radiation) or eavesdropping.

7

4 Layers to IrDA

• IrPHY

• IrLAP

Lowest Layer

– a physical layer that defines data rates, the encoding of individual bits, and the way that bits are combined into frames

2 nd Layer

– Link Access Protocol

– Data Link Layer of the OSI model

– provides addressing, error detection, and retransmission capabilities to ensure the reliable delivery of all packets

• IrLMP 3 rd Layer

– Link Management Protocol layer that enables multiple simultaneous conversations between the two connected systems

• Tiny TP Top Layer

– Tiny Transport Protocol

– Segmentation and Reassembly of large messages.

8

IrPHY

• Infrared Physical Layer Specification

• Lowest layer of the IrDA specifications

• Range (Standard: 1 m, low-power to low-power: 0.2 m,

Standard to low power: 0.3 m)

• Angle (minimum cone +/-15°)

• Speed (2.4 kbit/s to 16 Mbit/s)

• Modulation (Base band, no carrier)

• half-duplex mode because while transmitting receiver is blinded by the light of its own transmitter, so full duplex not possible.

9

SIR

• Serial Infrared (SIR) speeds cover those transmission speeds normally supported by an RS-232 port.

– 9600 bit/s,

– 19.2 kbit/s,

– 38.4 kbit/s,

– 57.6 kbit/s,

– 115.2 kbit/s.

10

Bit Rates

• Serial Infrared (SIR)

• MIR (Medium Infrared)

<= 115.2 kbit/s

0.576 Mbit/s and 1.152 Mbit/s

• Fast Infrared (FIR) 4 Mbit/s.

• Very Fast Infrared (VFIR) 16 Mbit/s.

• UFIR (Ultra Fast Infrared) 100 Mbit/s.

11

Bar Code IR

• Modern bar code began in 1948.

• Bernard Silver, a grad student at Drexel Institute of

Technology in Philadelphia,

• Overheard president of a local food chain asking one of the deans to undertake research to develop a system to automatically read product information during checkout.

• Silver told his friend Norman Joseph Woodland about the food chain president's request.

• Woodland was a twenty seven year old graduate student and teacher at Drexel. The problem fascinated

Woodland and he began to work on the problem.

12

UPC

• Universal Product Code.

• http://electronics.howstuffworks.com/upc.htm

• UPC symbol printed on a package has two parts:

– The machine-readable bar code

– The human-readable 12-digit UPC number

• BYG Publishing's manufacturer identification number is the first six digits of the UPC number -- 639382.

• The next five digits -- 00039 -- are the item number .

• The last digit, 3, of the UPC code is called a check digit .

13

Check Digit

• Here is how the check digit is calculated for the other 11 digits, using the code 63938200039 from "The Teenager's Guide to the Real

World" example shown above:

• Step 1 - Add together the value of all of the digits in odd positions

(digits 1, 3, 5, 7, 9 and 11).

6 + 9 + 8 + 0 + 0 + 9 = 32

• Step 2 - Multiply that number by 3.

32 * 3 = 96

• Step 3 - Add together the value of all of the digits in even positions

(digits 2, 4, 6, 8 and 10).

3 + 3 + 2 + 0 + 3 = 11

• Step 4 - Add this sum to the value in step 2.

96 + 11 = 107

• Step 5 - Take the number in Step 4. To create the check digit, determine the number that, when added to the number in step 4, is a multiple of 10.

107 + 3 = 110 The check digit is therefore 3.

14

UPC

• One thing you will notice if you start looking at UPC codes in detail is that the big manufactures have manufacturer IDs with lots of zeros in them. Here are a few:

• Post - 043000

• General Mills - 016000

• Del Monte - 024000

• Quaker Oats - 030000

15

Decoding the Bars

• First of all, look at any 12-digit bar code. It is made up of black bars and white spaces between the bars. Assume that the thinnest bar or space that you see can be called "one unit wide." The bars and spaces can therefore be seen to have proportional widths of one, two, three or four units. If you look at any bar code you can see examples of these four widths.

16

Start Code

• The start of any bar code is "1-1-1." That is, starting at the left you find a one-unitwide black bar followed by a one-unit-wide white space followed by a one-unit-wide black bar (bar-space-bar).

17

Bar Code

Following the start code, the digits are encoded as follows:

0 = 3-2-1-1

1 = 2-2-2-1

2 = 2-1-2-2

3 = 1-4-1-1

4 = 1-1-3-2

5 = 1-2-3-1

6 = 1-1-1-4

7 = 1-3-1-2

8 = 1-2-1-3

9 = 3-1-1-2

Notice that all of these encodings add up to 7.

18

The code embedded in the bars is

043000181706

19

Decoding the Bar Code

The code embedded in the bars is 043000181706

The bar code starts with the standard start code of 1-1-1 (bar-space-bar).

The zero is 3-2-1-1 (space-bar-space-bar).

• The four is 1-1-3-2 (space-bar-space-bar).

• The three is 1-4-1-1 (space-bar-space-bar).

The next three zeros are 3-2-1-1 (space-bar-space-bar).

20

• In the middle there is a standard 1-1-1-1-1 (spacebar-space-bar-space), which is important because it means the numbers on the right are optically inverted!

• So now we have bar-space-bar-space, rather than space-bar-space-bar

21

• The one is 2-2-2-1 (bar-space-bar-space).

• The eight is 1-2-1-3 (bar-space-bar-space).

• The one is 2-2-2-1 (bar-space-bar-space).

• The seven is 1-3-1-2 (bar-space-bar-space).

• The zero is 3-2-1-1 (bar-space-bar-space).

• The six is 1-1-1-4 (bar-space-bar-space).

• The stop character is a 1-1-1 (bar-space-bar).

22

23

24

25

26

Download