background image

3. protocol for Camera Function control

• Host Communication Flow Diagram

• Communication Format

1) Packet Format

1-1) Basic inform

- Packet Start Code = 'S'

- Packet End Code = 'T'

- Checkum = binary value of a binary value of data, ignore carry

1-2) White Request

1

2

3-4

5

6

7

8-11

12-

(11+2n)

(12+2n)-

(13+2n)

14+2n

'S'

'@'

RS485 address Fixed 2 Byte num (Max 4) 'W' Address

Data

Checksum

'T'

- n is number of byte num

- @ is indicator that the packet use the RS485 address.

  You can Use without '@' and RS485 adress

1-3) Read Request

1

2

3-4

5

6

7

8-11

12-13

14

'S'

'@'

RS485 address Fixed 2 Byte num Max 4 'R' Address

Checksum

'T'

1-4) Read Response

1

2

3-4

5

6

7

8-11

12-

(11+2n)

(12+2n)-

(13+2n)

14+2n

'S'

'@'

RS485 address Fixed 2 Byte num Max 4 'P' Address

Data

Checksum

'T'

1-5) ACK / NACK format

ACK

1

2

3-4

5

6

7

8

9

10

11

12

'S'

'@'

RS485 address Warning code

'K'

'F'

'F'

'0'

'0'

'T'

NACK

1

2

3-4

5

6

7

8

9

10

11

12

'S'

'@' RS485 address

Error_code

'N'

'F'

'F'

'0'

'0'

'T'

1-6) Error Code

# No Code

Description

## No Code

Description

0x00 ADJ_OK

No err

0x06

ADJ_BAD_WR

Try to write to read only 

address

0x01 ADJ_BAD_CHKSUM Check sum err

0x07

ADJ_BAD_RD

Try to read from write only 

address

0x02 ADJ_NO_ADDR

Dest. Addres is 

not exist

0x08

ADJ_BAD_FORMAT Command format error

0x03 ADJ_BAD_ADDR

Dest. Addres is 

not exist partially 

in block packet

0x09

Reserved

0x04 ADJ_BIG_CMD

Command size 

is too big

0x0a

Reserved

0x05 ADJ_TIMEOUT

Time out

1-7) Warning Code

# No Code

Description

# No Code

Description

0x10 ADJ_OK

No err

0x16 ADJ_BAD_WR

Try to write to read only 

address

0x11 ADJ_BAD_CHKSUM Check sum err

0x17 ADJ_BAD_RD

Try to read from write only 

address

0x12 ADJ_NO_ADDR

Dest. Addres is 

not exist

0x18 ADJ_BAD_FORMAT Command format error

0x13 ADJ_BAD_ADDR

Dest. Addres is 

not exist partially 

in block packet

0x19 Reserved

-

0x14 ADJ_BIG_CMD

Command size is 

too big

0x1a Reserved

-

0x15 ADJ_TIMEOUT

Time out

2) Packet Examples

2-1) White request eaamples 1

Supposed Value

Write to Address

1234h

Write Data

1234h

Data Size

2 [Bytes]

RS485 Address

03h

- Checksum = 12h + 34h + 12h + 34h = 8ch

- Transmission Data

#

HOST

SEND Direction

CAMERA

DATA

1

"S@0322W123412348CT"

2

ACK or NACK

2-2) White request eaamples 2

Supposed Value

Write to Address

1234h

Write Data

AABBh & CCDDh

Data Size

2 [Bytes] x 2 = 4 [Bytes]

RS485 Address

03h

- Checksum = 12h + 34h + AAh + BBh + CCh + DDh + 354h = 54ch

- Transmission Data

#

HOST

SEND Direction

CAMERA

DATA

1

"S@0324W1234AABBCCDD54T"

2

ACK or NACK

OSD MANUAL

MAIN MENU

1st Sub MENU

2nd Sub MENU

3rd Sub MENU

4th Sub MENU

EXPOSURE

BRIGHTNESS 0 ~ 20

AE MODE

NORMAL/DEBLUR

AE WINDOW

( RS-485 Only )

AE Window OSD

OFF / ON

AE WINDOW V START 36 ~ V Max

AE WINDOW V END

V Start ~ 920

AE WINDOW H START 40 ~ H Max

AE WINDOW H END

H Start ~ 1044

RETURN

BACK / EXIT

SHUTTER

AUTO / 

MANUAL /

FLICKER

LEVEL

1/30(25),1/60(50),1/120(1

00),1/240,1/500,1/1K,1/4K

,1/8K,1/16K,1/30K

RETURN

BACK / EXIT

DSS

Off / X2 / X3 / X4 / X5 / X6 / X7 / X8

AGC

0 ~ 20

RESET DATA

BACK / DEF

RETURN

BACK / EXIT

WHITE

BALANCE

WB MODE

AUTO / AUTOext

/ PUSH / MANUAL

COLOR TEMP

LOW/MIDDLE/HIGH

R-GAIN

0 ~ 20

B-GAIN

0 ~ 20

RETURN

BACK / EXIT

SATURATION

0 ~ 20

RESET DATA

BACK / DEF

RETURN

BACK / EXIT

D-WDR / 

BLC

OFF / BLC / D-WDR

H-POS

0 ~ 20

V-POS

0 ~ 20

H-SIZE

0 ~ 20

V-SIZE

0 ~ 20

RETURN

BACK / EXIT

DNR

OFF / LOW / MIDDLE / HIGH

DAY &

NIGHT

AUTO/ COLOR / 

B&W

AGC THRES

0 ~ 20

AGC MARGIN

0 ~ 20

DELAY

LOW / MIDDLE / HIGH

RESET DATA

BACK / DEF

RETURN

BACK / EXIT

IMAGE

SHARPNESS

0 ~ 20

GAMMA

0 / 1 / 2 / 3 / 4

MIRROR

OFF / ON

FLIP

OFF / ON

DZOOM

1.0X / 1.1X / 1.2X / 1.3X  ……  7.7X / 7.8X / 7.9X / 8.0X

DEFOG

OFF / ON

MODE

AUTO / MANUAL

LEVEL

LOW / MIDDLE / HIGH

RETURN

BACK / EXIT

LENS SHADING OFF / ON

WEIGHT

0% ~ 100%

RETURN

BACK / EXIT

RESET DATA

BACK / DEF

RETURN

BACK / EXIT

SPECIAL

FOCUS ASSIST OFF / ON

PRIVACY

OFF / ON

ZONE NUM

0 ~ 15

ZONE OP

OFF / ON

H-POS

0 ~ 60

V-POS

0 ~ 40 

H-SIZE

0 ~ 40

V-SIZE

0 ~ 40

Y LEVEL

0 ~ 10

CR LEVEL

0 ~ 10

CB LEVEL

0 ~ 10

RETURN

BACK / EXIT

HLMASK

OFF / ON

LEVEL

0 ~ 20

COLOR

BLK / WHI / YEL / CYN / 

GRN / MAG / RED / BLU

RETURN

BACK / EXIT

PATTERN

OFF / ON

RESET DATA

BACK / DEF

RETURN

BACK / EXIT

SYSTEM

COMM. ADJUST

( RS-485 Only )

CAMERA ID

1 ~ 254

BAUD RATE

2400 / 4800 / 9600 / 

19200 / 38400 / 57600 / 

115200 bps

APPLY & EXIT

OK / ON

RETURN

BACK / EXIT

SDI FORMAT

1080P / 720P

FRAME RATE

30(60) / 25(50)

CVBS FORMAT

( W/O RS-485 )

NTSC / PAL

CVBS FORMAT NTSC / PAL
APPLY

OK / ON

LANGUAGE

ENG / CHN / CHN(S)

SYSTEM INFO

S/W VERSION
SET VERSION

R ETURN

BACK / EXIT

REBOOT
RETURN

BACK / EXIT

• Function Description

0. SETUP

- EXPOSURE: Go sub menu for camera exposure control.

- WHITE BALANCE: Go sub menu for camera white balance control.

- WDR/BLC: Go sub menu for camera WDR or BLC action.

- DNR: Control noise reduction setting.

- DAY & NIGHT: Go sub menu for camera day & night control.

- IMAGE: Go sub menu for adjust image functions.

- SPECIAL: Go sub menu for special feature control.

- SYSTEM: Go sub menu for system control & information.

- Reset Data All: Reset camera’s all feature data to default value.

1. EXPOSURE

- BRIGHTNESS: Adjust image brightness value.

- AE MODE: Adjust AE control Mode.

- AE WINDOW: Adjust AE WEIGHT Size. ( RS-485 Only )

AE WIN V START: Select AE window vertical Start position.

AE WIN V END: Select AE window vertical End position.

AE WIN H START: Select AE window Horizontal Start position.

AE WIN H END: Select AE window Horizontal End position.

- SHUTTER: Select shutter speed control type.

LEVEL: Adjust shutter speed at manual shutter mode.

- DSS: Adjust digital slow shutter control level.

- AGC: Adjust max gain level for brightness control.

2. WHITE BALANCE

- WB MODE: Select white balance control mode.

AUTO: Full auto control mode in color temperature rage 2300K~10000K

AUTOext: Extened auto mode for special illumination.

PUSH: Enable fix the control setting for specific environment. 

            Push & release, for fix WB control setting

MANUAL: Enable WB control setting by user’s intention.

>COLOR TEMP:Select color temperature range for WB control at manual mode

>R-GAIN: Adjust red color gain for WB control at maual mode.

>B-GAIN: Adjust blue color gain for WB control at manual mode.

- SATURATION: Adjust image brightness value.

3. WDR/BLC

- MODE: Select WDR for BLC mode.

BLC: Act in Backlight compensation mode.

D-WDR: Digital wide dynamic range control.

- BLC H-POS: Select BLC control zone vertical position.

- BLC V-POS: Select BLC control zone horizontal position.

- BLC H-SIZE: Select BLC control zone vertical size.

- BLC V-SIZE: Select BLC control zone horizontal size.

4. DNR

: Reduce image’s noise

5. DAY & NIGHT

- MODE: Select DN( Digital Day & Night control ) mode.

AUTO: Camera controlled automatically to decide day or night 

             environment using AGC calculation data.

COLOR: Fix to mode at day environment setting. Make video image act in color.

B&W: Fix to mode at night environment setting. Make video image act in B/W.

> AGC THRES: Threshold level for Change Day to Night or Night to Day mode.

> AGC MARGIN: Hysteresis Level for Change Day to Night or Night to Day mode.

> DELAY: Delay Time for change day or Night Mode at Auto mode.

6. IMAGE

- SHARPNESS: Adjust image sharpness level.

- GAMMA: Gamma Curve Select.

- MIRROR: Vertical Mirror Setting.

- FLIP: Horizontal flip setting.

- DZOOM: Select digital zoom magnification.

- DEFOG: Enable Defog compensation.

LEVEL: Defog compensation Level change at Auto / Manual mode.

-LENS SHADING: Enable lens shading compensation.

7. SPECIAL

- FOCUS ASSIST: Enable Lens Focus Assist OSD. ( 1080P Mode Only ).

- PRIVACY: Setting for protect private area in image using mask setting.

ZONE NUM. : Select private mask zone number.

ZONE DISP. : Select zone mask display on/off.

H-POS : Select zone horizontal position.

V-POS : Select zone vertical position.

H-SIZE : Select zone horizontal size.

V-SIZE : Select zone vertical size.

Y LEVEL : Select mask color ( Y Level ).

CR LEVEL : Select mask color ( CR Level ).

CB LEVEL : Select mask color ( CB Level ).

- HLMASK: Mask image high light area.

LEVEL : Select high light level. COLOR : Select mask color

- PATTERN: Color bar display Enable.

8. SYSTEM

- COMM. ADJUST: RS-485 Communication Setting mode. ( RS-485 Only )

CAMERA ID: RS-485 CAM ID Select.

BAUDRATE: RS-485 Communication Speed Select.

Apply & Exit: Apply all RS-485 Setting changed at once.

- SDI FORMAT: 1080P / 720P

- SDI FPS: 30 or 25 fps in 1080p mode, 720P Mode: 60 / 50 fps.

- CVBS FORMAT( W/O RS-485 ): NTSC / PAL

- APPLY: Apply all video setting changed at once. Use the Set button to apply.

- SYSTEM INFO

S/W VERSION: Camera’s basic software version.

SET VERSION: Camera’s feature control setting version.

1. Communication Specification

RateBaud

Default 9600bps

Data bits

8 bits

Stop bits

1 bits

CAM ID

Default "1"

Parity Check

None

Supported Protocol

PELCO-D, PELCO-P

2. PELCO protocol for OSD remote control

• PELCO-D

BYTE 1

BYTE 2

BYTE 3

BYTE 4

BYTE 5

BYTE 6

BYTE 7

UP KEY

0 x FF

Cam ID

0 x 00

0 x 08

0 x 00

0x0B~0x3F

ChkSum

DOWN KEY

0 x FF

Cam ID

0 x 00

0 x 10

0 x 00

0x0B~0x3F

ChkSum

LEFT KEY

0 x FF

Cam ID

0 x 00

0 x 04

0x0B~0x3F

0 x 00

ChkSum

RIGHT KEY

0 x FF

Cam ID

0 x 00

0 x 02

0x0B~0x3F

0 x 00

ChkSum

MENU ENTER KEY 0 x FF

Cam ID

0 x 00

0 x 07

0 x 00

0 x 5F

ChkSum

- Cam ID : 0x00 ~ 0x1F

- ChkSum : The Check Sum is the 8 bit (modulo 256) sum of the payload bytes 

                  (Byte2 ~ Byte6) in the Command.

- [ 0x0A~0x3F ] means accept any value(between 0x0A ~ 0x3F) on command action.

• PELCO-P

BYTE 1 BYTE 2 BYTE 3 BYTE 4

BYTE 5

BYTE 6

BYTE 7

BYTE 8

UP KEY

0 x A0

Cam ID

0 x 00

0 x 08

0 x 00

0x0B~0x3F

0 x AF

ChkSum

DOWN KEY

0 x A0

Cam ID

0 x 00

0 x 10

0 x 00

0x0B~0x3F

0 x AF

ChkSum

LEFT KEY

0 x A0

Cam ID

0 x 00

0 x 04 0x0B~0x3F

0 x 00

0 x AF

ChkSum

RIGHT KEY

0 x A0

Cam ID

0 x 00

0 x 02 0x0B~0x3F

0 x 00

0 x AF

ChkSum

MENU ENTER KEY 0 x A0

Cam ID

0 x 00

0 x 07

0 x 00

0 x 5F

0 x AF

ChkSum

- Cam ID : 0x00 ~ 0x1F

- ChkSum : The Check Sum is an XOR sum of Byte1 ~ Byte7

- [ 0x0A~0x3F ] means accept any value(between 0x0A ~ 0x3F) on command action.

RS-485

HOST

White Request

Read Request

Read Request

ACK

ACK

ACK

CAMERA

• Camera CSR

- Base Address = 0x4000.

- Control Address = Base A Offset

Offset

Symbol

Decription

Note

0001

-

Reserved

-

0002

-

Reserved

-

0003

-

Reserved

-

0004

-

Reserved

-

0005

OSD Menu key Enter

[1]: action, self clear

Write Only

0006

OSD Menu key Right

[1]: action, self clear

Write Only

0007

OSD Menu key Left

[1]: action, self clear

Write Only

0008

OSD Menu key up

[1]: action, self clear

Write Only

0009

OSD Menu key Down

[1]: action, self clear

Write Only

000A

Brightness

0 ~ 20

Read / Write

000B

AE Mode

[0]: Normal / [1]: Deblur

Read / Write

000C

Shutter

[0]: Auto / [1]: Manual / [2]: Flicker

Read / Write

000D

Manual Shutter Speed

0

1 / 30

6

1 / 2000

Read / Write

1

1 / 60

7

1 / 4000

2

1 / 120

8

1 / 8000

3

1 / 240

9

1 / 16000

4

1 / 500

10

1 / 30000

5

1 / 1000

000E

DSS

0 ~ 7

Read / Write

000F

Max AGC

0 ~ 20

Read / Write

0010

AWB Mode

0

Auto

2

Push

Read / Write

1

Auto Ext

3

Manual

0011

AWB Saturation

0 ~ 20

Read / Write

0012

MWB Color Temp.

[0]: Low / [1]: Middle / [2]: High

Read / Write

0013

MWB R Gain

0 ~ 20

Read / Write

0014

MWB B Gain

0 ~ 20

Read / Write

0015

WDR Mode

[0]: Off / [1]: WDR

[2]: HBLC / [3]: D-WDR

Read / Write

0016

BLC OSD

[0]: Off

[1]: On

Read / Write

0017

BLC Position X

0 ~ 20

Read / Write

0018

BLC Position Y

0 ~ 20

Read / Write

0019

BLC Size X

0 ~ 20

Read / Write

001A

BLC Size X

0 ~ 20

Read / Write

001B

DNR

[0]: Off / [1]: Low / [2]: Middle / [3]: High

Read / Write

001C

Day & Night Mode

[0]: Auto / [1]: Color / [2]: BW

Read / Write

001D

DN Threshold

0 ~ 20

Read / Write

001E

DN Margin

0 ~ 20

Read / Write

001F

DN Delay

0 ~ 10

Read / Write

0020

Sharpness

0 ~ 20

Read / Write

0021

Gamma

[0]: 0.45 / [1]: 0.50 / [2]: 0.55 / [3]: 0.60 / [4]:0.65

Read / Write

0022

Flip

[0]: Off / [1]: H Flip / [2]: V Flip / [3]: HV Flip

Read / Write

0023

D-Zoom

0 ~ 70

Read / Write

0024

Defog

[0]: Off / [1]: On

Read / Write

0025

Defog Mode

[0]: Manual / [1]: Auto

Read / Write

0026

Defog Level

[0]: Low / [1]: Middle / [2]: High

Read / Write

0027

Lens Shading

[0]: Off / [1]: On

Read / Write

0028

Shading Level

0 ~ 100

Read / Write

0029

Privacy Zone Num

0 ~ 15

Read / Write

002A

Privacy On

[0]: Off / [1]: On

Read / Write

002B

Privacy H Position

0 ~ 60

Read / Write

002C

Privacy V Position

0 ~ 40

Read / Write

002D

Privacy H Size

0 ~ 40

Read / Write

002E

Privacy V Size

0 ~ 40

Read / Write

002F

Privacy Y Color

0 ~ 20

Read / Write

0030

Privacy Cb Color

0 ~ 20

Read / Write

0031

Privacy Cr Color

0 ~ 20

Read / Write

0032

HLC

[0]: Off / [1]: On

Read / Write

0033

HLC Level

0 ~ 20

Read / Write

0034

HLC Color

0

BLK

4

GRN

Read / Write

1

WHT

5

MAG

2

YEL

6

RED

3

CYN

7

BLU

0035

Color Pattern

[0]: Off / [1]: On

Read / Write

0036

Cam ID

0 ~ 255

Read / Write

0037

Baud rate

0

2400 bps

4

38400 bps

Read / Write

1

4800 bps

5

57600 bps

2

9600 bps

6

115200 bps

3

19200 bps

0038

SDI Format

[0]: 720p / [1]: 1080p

Read / Write

0039

Frame Rate

720p

[0]: 60hz / [1]: 50hz

Read / Write

1080p

[0]: 30hz / [1]: 25hz

003A

AE Window OSD

[0]: Off / [1]: On

Read / Write

003B

AE Window V Start

0x24 ~ V Max

Read / Write

003C

AE Window V End

V Start ~ 0 x 398

Read / Write

003D

AE Window H Start

0x28 ~ H Max

Read / Write

003E

AE Window H End

H Start ~ 0 x 414

Read / Write

003F

-

Reserved

-

0040

Reboot

Write Only

0041

Default Setting

Write Only

0042

Parameter

Write Only

2-2) Read request eaamples

Supposed Value

Read from Address

1234h

Data value in Address

AA11h

Data Size

2 [Bytes]

RS485 Address

03h

- Host Send Date Checksum = 12h + 34h = 464h -> 64h

- Camera Response Data Checksum = 12h + 34h + AAh + 11h =101h -> 01h

- Transmission Data

#

HOST

SEND Direction

CAMERA

DATA

1

"S@0322R12346T"

2

ACK

(if NACK then Proc. End)

3

"S@0322P1234AA1101T"

4

ACK 0r NACK

Отзывы: