1. 程式人生 > >MTK方案GPON ONU註冊流程和OMCI分析

MTK方案GPON ONU註冊流程和OMCI分析

進入串列埠登入:輸入以下指令 開啟GPON ONU OMCI報文除錯指令:
echo msg init 1 > /proc/gpon/debug
echo msg oam 1 > /proc/gpon/debug
echo msg err 1 > /proc/gpon/debug
echo msg omci 1 > /proc/gpon/debug
ONU 啟用概述
ONU的啟用過程由OLT控制,其啟用過程大致如下:
1.ONU 通過 Upstream_Overhead 訊息接收工作引數
2.ONU 根據接收到的工作引數調整自己的引數(如:傳送光功率)
3.OLT 通過 Serial_Number Acquisition 流程發現新 ONU 的序列號
4.OLT 給所有新 ONU 分配 ONU-ID
5.OLT 測量新 ONU 的均衡時延
6.OLT 將測量的均衡時延傳送給 ONU
7.ONU 根據均衡時延調整其上行幀的傳送起始點
以上啟用過程是通過互動上下行標記(flag)以及PLOAM訊息來完成的

tcphy[2]: Link-down!!!str = 0tcphy[2]: Link-up at 100F. tx_amp_save=0.tcphy[10]: boosten=1 agccode=5 zfgain=5 ch_idx=23 snr=3 set olt type: 0
echo used greatest stack depth: 9644 bytes left
sendOmciCmdMsg open message queue fail![4415850ms]PLOAM: State change O5 —> O1
a) 初始狀態 Initial-state(O1)
該狀態的ONU剛剛上電,仍處於LOS/LOF。一旦接收到下行流,LOS和LOF消除,ONU
就轉移到待機狀態(O2)
[4415860ms]PLOAM: State change O1 —> O2

b) 待機狀態 Standby-state(O2)
該 狀 態 的 ONU 已 經 接 收 到 下 行 流 , 在 等 待 接 收 網 絡 參 數 。 當 ONU 接 收 到Upstream_Overhead訊息後根據這些網路引數進行相關配置(如:定界符、功率模式、預置的均衡時延)並轉移到序列號狀態(O3)
[4419560ms]PLOAM: Rx Upstream_Overhead.(FF012000 00AAAB59 83200000),state O2
[4419570ms]PLOAM: State change O2 —> O3

c) 序列號狀態 Serial-Number-state(O3)
OLT給所有處於該狀態的ONU傳送Serial-Number Request訊息,以發現新的ONU以及
他們的序列號。當OLT發現了新的ONU後,ONU就等待OLT給它指配ONU-ID。OLT通過
Assign_ONU-ID訊息來指配ONU-ID。ONU獲得ONU-ID後就轉移到測距狀態(O4)

[4419570ms]Receive the PLOAM message same:FF012000
[4419570ms]Receive the PLOAM message same:FF012000
[4419570ms]PLOAM: Receive Extended_Burst_Length message.(FF14770F 00000000 00000000)
[4419570ms]PLOAM: Setting the O3/O4 type 3 preamble. Overflow: 0, Rec. Value: 119, Set Value: 119
[4419570ms]Receive the PLOAM message same:FF14770F
[4419570ms]Receive the PLOAM message same:FF14770F
[4420350ms]PLOAM: Rx Upstream_Overhead.(FF012000 00AAAB59 83200000),state O3
[4420360ms]Receive the PLOAM message same:FF012000
[4420360ms]Receive the PLOAM message same:FF012000
[4420360ms]PLOAM: Receive Extended_Burst_Length message.(FF14770F 00000000 00000000)
[4420360ms]PLOAM: Setting the O3/O4 type 3 preamble. Overflow: 0, Rec. Value: 119, Set Value: 119
[4420360ms]Receive the PLOAM message same:FF14770F
[4420360ms]Receive the PLOAM message same:FF14770F
[4420360ms]PLOAM: Receive Assign_ONU_ID message.(FF030448 48474E80 031F6800)
[4420360ms]PLOAM: State change O3 —> O4
Serial_Number Acquisition流程:
首先OLT暫停對上行頻寬的授權,從而產生一個安靜期。等待一段測距延時之後,OLT傳送Serial_Number Request。處於Serial_Number 狀 態 ( O3 ) 的 ONU 接 收 到 Serial_Number Request 後 等 待 一 段SN-Response-Time時間(見8.7.1 節)再發送響應訊息。OLT收到響應訊息後傳送Assign_ONU-ID訊息,ONU進入測距狀態(O4)。}

測距過程:
首先OLT產生一個安靜時段,之後OLT給所有ONU傳送Ranging Request訊息。ONU接收到Ranging Request訊息後等待Ranging-Response-Time(見8.7.2節)再發送Serial-Number訊息。OLT接收到Serial-Number訊息後傳送Assign Ranging Time
訊息,ONU接收到Ranging Time訊息後進入執行狀態(O5)
[4420360ms]Receive the PLOAM message same:FF030448
[4420360ms]Receive the PLOAM message same:FF030448
[4420370ms]Receive PLOAM message filed.
[4420700ms]PLOAM: Receive Ranging_Time message.(04040000 040E2100 00000000)
[4420700ms]PLOAM: Receive the main path EqD, 40e21.
[4420700ms]PLOAM: Setting the main path EqD in O4, ByteDelay:40e20, BitDelay:1.
d) 測距狀態 Ranging-state(O4)
Assign Ranging Time不同的ONU傳送訊號到達OLT時應保持同步,為此每個ONU需要一個均衡時延,該引數是在測距狀態中測得的。ONU接收到Ranging_Time訊息後轉移到執行狀態(O5)。
[4420700ms]PLOAM: State change O4 —> O5
[4420710ms]Receive the PLOAM message same: 4040000
[4420730ms]Receive the PLOAM message same: 4040000
str = 1[4420820ms]PLOAM: Receive Request_Password message.(04090000 00000000 00000000)
[4420820ms]PLOAM: Send password message.(04020000 00000000 00000000)
[4420870ms]PLOAM: Receive Request_Key message.(040D0000 00000000 00000000)
[4420870ms]PLOAM: Send encryption key message.(04050100 AD107C74 45F6AC03)
[4420870ms]PLOAM: Send encryption key message.(04050101 5BE2C75D 40A86664)
[4420940ms]PLOAM: Receive Key_Switching_Time message.(041323AE 558A0000 00000000)
[4420950ms]PLOAM: Send acknowledge PLOAM message.
[4420960ms]PLOAM: Send acknowledge message.(04091304 1323AE55 8A000000)
[4420960ms]Receive the PLOAM message same: 41323AE
[4420970ms]Receive the PLOAM message same: 41323AE
[4423330ms]PLOAM: Receive Configure_PortID message.(040E0100 40000000 00000000)
[4423340ms]PLOAM: Send acknowledge PLOAM message.
[4423350ms]PLOAM: Send acknowledge message.(04090E04 0E010040 00000000)
[4423350ms]Receive the PLOAM message same: 40E0100
[4423350ms]Receive the PLOAM message same: 40E0100
[4423360ms]PLOAM: Receive Encrypted_PortID message.(04080200 40000000 00000000)
[4423360ms]PLOAM: Send acknowledge PLOAM message.
[4423360ms]PLOAM: Send acknowledge message.(04090804 08020040 00000000)
[4423370ms]Receive the PLOAM message same: 4080200
[4423390ms]Receive the PLOAM message same: 4080200
[4423390ms]PLOAM: Receive BER_Interval message.(04120000 00000000 00000000)
[4423400ms]PLOAM: Send acknowledge PLOAM message.
[4423410ms]PLOAM: Send acknowledge message.(04091204 12000000 00000000)
[4423410ms]Receive the PLOAM message same: 4120000
[4423420ms]Receive the PLOAM message same: 4120000
[4423420ms]PLOAM: Receive Assign_AllocID message.(040A0040 01000000 00000000)
[4423430ms]PLOAM: OLT Assign ALLOC_ID 4
[4423430ms]PLOAM: Send acknowledge PLOAM message.
[4423440ms]PLOAM: Send acknowledge message.(04090A04 0A004001 00000000)
[4423450ms]Receive the PLOAM message same: 40A0040
[4423450ms]Receive the PLOAM message same: 40A0040

e) 執行狀態 Operation-state(O5)
處於該狀態的ONU可以在OLT的控制下發送上行資料以及PLOAM訊息,該狀態中的
ONU也可根據需求建立其他連線。當測距成功後,所有的ONU都依據各自的均衡時延發送訊號,以保持上行幀的同步。不同ONU傳送的訊號將分別到達OLT,但每個訊號會正好出現在上行幀中它應該出現的位置上。
暫停執行中的ONU:在正常執行時,OLT可能使ONU暫停傳送訊號以獲得其它ONU的
序列號或對其它ONU進行測距。OLT持續一段時間停止對所有上行頻寬的授權,ONU按照正常的方式工作,由於沒有接收到授權就不會發送訊號,從而產生一個安靜時段,這樣OLT就使得所有ONU暫停傳送訊號。
f) POPUP 狀態 POPUP-state(O6)
當處於執行狀態(O5)的ONU檢測到LOS或LOF時就進入到該狀態。在該狀態中ONU
立即停止傳送訊號,這樣OLT將檢測到該ONU的LOS告警。
當ODN光纖中斷時,許多ONU都會進入到該狀態,從網路可靠性考慮,此時應採用以
下方式之一:
如果啟用了保護倒換,所有的ONU將倒換到備用光纖上。這時所有ONU將重新進行測
距,為此OLT傳送Broadcast POPUP訊息通知所有ONU進入到測距狀態(O4)。
如果沒有保護倒換但ONU具有內部保護能力,OLT傳送Directed POPUP訊息通知ONU
進入執行狀態(O5)。當ONU進入到O5狀態時,OLT需要先對該ONU進行檢測,之後再
恢復該ONU的業務。
如果ONU沒有從LOS或LOF中恢復過來,ONU就不會收到Broadcast POPUP訊息或
Directed POPUP訊息,經過TO2時間後ONU進入初始狀態(O1)。
g) 緊急停止狀態 Emergency-Stop-state(O7)
當ONU接收到的Disable_Serial_Number訊息帶有“Disable”選項時,ONU就進入到緊急停止狀態(O7)並關閉鐳射器。在O7狀態下,ONU被禁止傳送訊號。如果ONU沒有成功進入到O7狀態,並且OLT仍能繼續接收到ONU傳送的訊號,OLT將產生Dfi告警。
當ONU的故障排除後,OLT傳送帶有“Enable”選項的Disable_Serial_Number訊息,從而啟用該ONU。ONU接收到訊息後進入待機狀態(O2),所有的引數(包括序列號和ONU-ID)將被重新檢查

接下來進行OMCI init 和 mib sync 資訊 分析
OMCI報文分析:
**20 0b:**TCI(teansaction correlation identity 2byte)
49:(0100 1001)拆分4:是AR=1(0100),9:ME_type( get )(1 byte) (AR=1是指OLT下發請求)
0a :device indefier type(1byte)(固定)
01 01:ME_Class=257 ==ONT2-G
00 00:ME_ID

                            【40 00 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00 00 28】

:ME_Contents;40 00:ME_Entity_MASK(即0100 0000:OLT下發請求257 實體的第2個屬性值:OMCC Version)
剩餘綠色部分是 Attribute of value(除了ME_Entity_ID外第一個算起) ;
[4423830ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 0b 49 0a 01 01 00 00  40 00 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

AR =1: MIB reset
4f :AR=1 ME_type=f(MIB reset)(AR=1是指OLT下發請求)
00 02:ME_Class==ONT data
00 00:ME_ID 在ONT-data裡預設都為00

[4423850ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 0c 4f 0a 00 02 00 00  00 00 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

29(0010 1001):AK=1(ONU響應OLT的請求);9是ME_type(get)
01 01:ME_class=257=ONT2-G
00:result or reaon(0:表示執行成功)
40 00:ME_Entity_MASK(即0100 0000:OLT下發請求257 實體的第2個屬性值:OMCC Version)
a0 00 00 00 00
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00:Equipment ID(20byte)

[4423870ms]TX SKB LEN:44, TX MSG: 00000907, 00100000 
0000: 20 0b 29 0a 01 01 00 00  【00 40 00 a0 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28】 

AK=1: MIB reset response
[4424070ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 0c 2f 0a 00 02 00 00  00 00 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

4d:AR=1 ME-type=d=13(MIB upload)
00 02:ME_class==2 ==ONT data

[4424090ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 0d 4d 0a 00 02 00 00  00 00 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

2d:Ak=1 ME-type=d=13(MIB upload response)
00 02:ME_class==2 ==ONT data
01 b1:ME_numbers of subsequent

[4424110ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 0d 2d 0a 00 02 00 00  01 b1 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

4e:AR=1 ME-type=d=14(MIB upload nest)
00 02:ME_class==2 ==ONT data

[4424130ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 0e 4e 0a 00 02 00 00  00 00 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

2e:AK=1 ME-type=d=14(MIB upload nest response)
00 02:ME_class==2 ==ONT data
00 02(byte14-15):ME_Entity of object ==ME_Class
00 00:sub_ME_ID=00 00
80 00:Sub_ME_Entity_Mask(1000 0000:響應第一個屬性值:MIB data Sync)

[4424150ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 0e 2e 0a 00 02 00 00  00 02 00 00 80 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

4e:AR=1 ME-type=d=14(MIB upload nest)
00 02:ME_class==2 ==ONT data
00 01:ME_numbers of subsequent

[4424170ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 0f 4e 0a 00 02 00 00  00 01 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28

2e:AK=1 ME-type=d=14(MIB upload nest response)
00 02:ME_class=2 =ONT data
00 05:Sub_ME_Class = CardHolder
01 80 :Sub_ME_ID=484
f0 00:Sub_ME_Mask==1111 0000 0000 0000:第1,2,3,4個屬性值
48 31 38 47 4e 2d 34 31 31:H18GN-411(第4個屬性值)
[4424190ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 0f 2e 0a 00 02 00 00  00 05 01 80 f0 00 f8 f8  
0010: 01 48 31 38 47 4e 2d 34  31 31 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

4e:AR=1 ME-type=d=14(MIB upload nest)
00 02:ME_class==2 ==ONT data
00 02:ME_numbers of subsequent

[4424210ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 10 4e 0a 00 02 00 00  00 02 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

2e:AK=1 ME-type=d=14(MIB upload nest response)
00 02:ME_class2 ONT data
00 05:Sub_ME_Class = CardHolder
01 80 :Sub_ME_ID
484
f0 80:Sub_ME_Mask
1111 1000 0000 0000:第1,2,3,4,5個屬性值
48 31 38 47 4e 2d 34 31 31:H18GN-411(第4個屬性值)

[4424230ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 10 2e 0a 00 02 00 00  00 05 01 80 0f 80 48 31  
0010: 38 47 4e 2d 34 31 31 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

4e:AR=1 ME-type=d=14(MIB upload nest)
00 02:ME_class==2 ==ONT data
00 03:ME_numbers of subsequent
[4424250ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 11 4e 0a 00 02 00 00  00 03 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

2e:AK=1 ME-type=d=14(MIB upload nest response)
00 02:ME_class2 ONT data
00 05:Sub_ME_Class = CardHolder
01 02 :Sub_ME_ID
258
f0 00:Sub_ME_Mask
1111 0000 0000 0000:第1,2,3,4個屬性值
48 31 38 47 4e 2d 34 31 31:H18GN-411(第4個屬性值)

[4424270ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 11 2e 0a 00 02 00 00  00 05 01 02 f0 00 18 18  
0010: 03 48 31 38 47 4e 2d 34  31 31 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

[4424290ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 12 4e 0a 00 02 00 00  00 04 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

[4424310ms]TX SKB LEN:44, TX MSG: 00000907, 00100000

0000: 20 12 2e 0a 00 02 00 00  00 05 01 02 0f 80 48 31  
0010: 38 47 4e 2d 34 31 31 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28 

[4424330ms]RX PKT LEN: 44, Rx Msg: 00000410, 00178000

0000: 20 13 4e 0a 00 02 00 00  00 05 00 00 00 00 00 00  
0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
0020: 00 00 00 00 00 00 00 00  00 00 00 28