Tuesday, October 30, 2007

CC error

Two weeks a go I was in a meeting – the issue was about CC error , since no one really knew what is "cc error" , I was asked to figure out what is CC error , well … this was a task with no real information in hand , actually I knew its something to do with video multicasting , so I was looking for some clue about cc error in UDP/RTP header , but ,,, found basically nothing , the problem was I did not know what 'cc' stands for . Then I assumed that may be CC error is related to the MPEG-2 frame - ..ha ha … yha I was correct , cc = 'continuity counter' …. so the cc error is "continuity counter error" , this is used for keeping a track of the sequence of the MPEG-2 frames , and if you are seeing "cc error" at the clients end when you are using some video stream analyzer like "IQmedia" , the error can be mainly due to ,

1) one packet repeat more than twice

2) packets out of sequence

3) packet loss

each UDP packet of 1316 bytes carry 7 MPEG-2 frames of 188bytes each – each MPEG-2 frames has 4 byte header and the last byte is for continuity counter .

ETH

IP

UDP

FR-1

FR-2

FR-3

FR-4

FR-5

FR-6

FR-7

Eth…

Frame – 1 (FR-1)

SYN(8)

TEI(1)

PUSI(1)

TP(1)

PID(13)

TSC(2)

AF(2)

CC (4)

Video

DHCP infinite lease

Found something interesting , This happened with Many major DOCSIS 2.0 cable modem brands. The problems is if you set the DHCP lease time to infinite – that is the 32-bits in the DHCP header (option-51) that defines the DHCP lease time is set to

FF FF FF FF

if it is set to the maximum value , the cable modem will fail to register with the CMTS , the maximum value you can use is 7F FF FF FF , yha the most significant bit is made zero ,

0111

1111

1111

1111

1111

1111

1111

1111

7

F

F

F

F

F

F

F

I used the DHCP-turbo server where there is an option to set an infinite lease .

DHCP infinite lease ,

I wrote a small MATLAB code to calculate how many Days , hours , minutes and seconds is 7F FF FF FF

--------------------------------------------

format long

x=hex2dec('7fffffff');

days = fix(x/(3600*24))

y = x - days*3600*24;

hours = fix(y/3600)

z = y - hours*3600;

minutes = fix(z/60)

seconds = z - minutes*60

---------------------------------------------

answer :

>> dhcplease

days = 24855

hours = 3

minutes = 14

seconds = 7