2012年9月25日 星期二

ONVIF -- Authentication



ONVIF 的運作過程中,可以分別在 HTTP Level 或是 web service leve 進行使用者認證,根據使用者提供的帳號密碼,可將用戶分成以下四類:
  1. Administrator 
  2. Operator
  3. User
  4. Anonymous
注意:沒有認證的用戶皆歸類於 Anonymous,原文摘錄如下
Unauthenticated users are placed into the anonymous category and a device shall not allow users to be added to the anonymous user level category

2012年9月12日 星期三

The difference between ONVIF Test Tool 11.12 and 12.06

在通過 ONVIF Test Tool 11.12 之後,便想試試看 ONVIF Test Tool 12.06,此時發現測試工具一開始定義 ipcam 的 features 便已經不正確了,無法進行正確的測試。茲將測試時,自己發現的差異處整理如下:

1. 由於初始的 features define 有誤,因此後續的測試範例預期結果會與 11.12 將會不同。
例如:DEVICE-1-1-17,若測試工具所偵測的 features 包含 imaging,則此測試範例預期要成功,否則預期此範例要失敗。

2012年9月4日 星期二

RTP -- interleaved 的用法

基本的 RTSP 協定,在Setup階段會協商兩端之間將使用的 RTP/RTCP port,原則是 RTP port 為偶數,RTCP port = RTP port+1,當傳送RTP/RTCP時分別在建立兩條連線,如下例:(RTP使用3056, RTCP使用3057)
SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0
   CSeq: 1
   Transport: RTP/AVP/UDP;unicast;client_port=3056-3057

但若是RTSP 使用 interleaved 的方式,則後續的RTP/RTCP則可以沿用已經建立的連線,不需要指定對應的埠號,另外建立連線,而是在原來的TCP連線之下,改成使用 channel id 來辨別封包內容為 RTP 或 RTCP,例如:
SETUP rtsp://video.foocorp.com:554/streams/example.rm RTSP/1.0
  Cseq: 3
  Transport: rtp/avp/tcp; interleaved=0-1

此表示 channel id 0 用來傳送 RTP,channel id 1 用來傳送 RTCP。


2012年8月26日 星期日

[LINUX] 在ubuntu環境編譯 skull 的方法

編譯LDD3書上範例 skull時,遇到了一些問題,茲記錄如下:

程式碼範例下載:http://www.oreilly.com.tw/product_linux.php?id=a184
測試機器編譯環境:Linux 3.2.0-23-generic #36-Ubuntu SMP

書上的範例是適用於 Linux 2.4/2.6 版本的,因此在 3.2.0-23 核心下編譯會造成許多錯誤訊息,以下針對scull的編譯錯誤作一整理說明。

2012年8月8日 星期三

ONVIF event handling



ONVIF Event 主要基於Web Service的兩份標準 [WS-BaseNotification] 和 [WS-Topics] 而制定,分別提供了 PUSH 與 PULL 的方式,讓使用者可取得系統資訊。參考 ONVIF-Core-Specification-v211.pdf chapter9 的內容,整理如後:

一、基本定義
** Event 定義
Event是設備上主動發生或被動產生的事件,IPCam 設備會偵測系統上發生了哪些事件(Event),並讓用戶能夠訂閱此資訊。 
An event is an action or occurrence detected by a device that a client can subscribe to.
** Property 定義
Property是許多值(name value pairs)的結合,並且以 Event 的方式封裝。 
A Property is a collection of name and value pairs representing a unique and addressable set of data. They are uniquely identified by the combination of their Topic, Source and Key values and are packaged like ordinary events. A Property also contains an additional flag, stating whether it is newly created, has changed or has been deleted.

2012年8月6日 星期一

ONVIF -- Exacq NVR add a new device


Exacq NVR 新增IPCame的流程(符合 ONVIF 規範)

|Time     | 192.168.0.169                         |
|         |                   | 192.168.0.92      |                   
|43.555815000|         SetSystemDateAndTim           |SOAP/ONVIF: SetSystemDateAndTime
|         |(49184)  ------------------>  (80)     |
|44.821582000|         SetSystemDateAndTim           |SOAP/ONVIF: SetSystemDateAndTimeResponse
|         |(49184)  <------------------  (80)     |
|44.855474000|         GetDeviceInformatio           |SOAP/ONVIF: GetDeviceInformation
|         |(49185)  ------------------>  (80)     |
|45.300501000|         GetDeviceInformatio           |SOAP/ONVIF: GetDeviceInformationResponse
|         |(49185)  <------------------  (80)     |
|45.302059000|         GetNetworkInterface           |SOAP/ONVIF: GetNetworkInterfaces
|         |(49186)  ------------------>  (80)     |
|46.105645000|         GetNetworkInterface           |SOAP/ONVIF: GetNetworkInterfacesResponse
|         |(49186)  <------------------  (80)     |
|46.111014000|         GetRelayOutputs               |SOAP/ONVIF: GetRelayOutputs
|         |(49187)  ------------------>  (80)     |
|46.719881000|         GetRelayOutputsResp           |SOAP/ONVIF: GetRelayOutputsResponse
|         |(49187)  <------------------  (80)     |
|46.721747000|         GetCapabilities               |SOAP/ONVIF: GetCapabilities
|         |(49188)  ------------------>  (80)     |
|47.218333000|         GetCapabilitiesResp           |SOAP/ONVIF: GetCapabilitiesResponse
|         |(49188)  <------------------  (80)     |
|47.220273000|         GetProfiles                   |SOAP/ONVIF: GetProfiles
|         |(49189)  ------------------>  (80)     |
|48.472021000|         GetProfilesResponse           |SOAP/ONVIF: GetProfilesResponse
|         |(49189)  <------------------  (80)     |
|48.475146000|         GetVideoEncoderConf           |SOAP/ONVIF: GetVideoEncoderConfigurationOptions
|         |(49190)  ------------------>  (80)     |
|49.428644000|         GetVideoEncoderConf           |SOAP/ONVIF: GetVideoEncoderConfigurationOptionsResponse
|         |(49190)  <------------------  (80)     |
|49.429872000|         GetMetadataConfigur           |SOAP/ONVIF: GetMetadataConfigurations
|         |(49191)  ------------------>  (80)     |
|50.141905000|         GetMetadataConfigur           |SOAP/ONVIF: GetMetadataConfigurationsResponse
|         |(49191)  <------------------  (80)     |
|50.144926000|         AddMetadataConfigur           |SOAP/ONVIF: AddMetadataConfiguration
|         |(49192)  ------------------>  (80)     |
|50.415851000|         AddMetadataConfigur           |SOAP/ONVIF: AddMetadataConfigurationResponse
|         |(49192)  <------------------  (80)     |
|50.418226000|         GetStreamUri                  |SOAP/ONVIF: GetStreamUri
|         |(49193)  ------------------>  (80)     |
|52.539069000|         GetStreamUriRespons           |SOAP/ONVIF: GetStreamUriResponse
|         |(49193)  <------------------  (80)     |
|52.541886000|         SetNTP    |                   |SOAP/ONVIF: SetNTP
|         |(49194)  ------------------>  (80)     |
|52.844648000|         SetNTPResponse                |SOAP/ONVIF: SetNTPResponse
|         |(49194)  <------------------  (80)     |
|53.848110000|         SetRelayOutputState           |SOAP/ONVIF: SetRelayOutputState
|         |(49197)  ------------------>  (80)     |
|54.103767000|         SetRelayOutputState           |SOAP/ONVIF: SetRelayOutputStateResponse
|         |(49197)  <------------------  (80)     |

2012年7月31日 星期二

Open DHCP Server


以下紀錄 Open DHCP Server 的使用心得。經過筆者測試,Windows XP 與 Windows 7 64bit皆可正常使用。

1. 軟體安裝
至 http://sourceforge.net/projects/dhcpserver/ 可以下載程式(此時最新版為V1.50)
下載後,雙擊程式後會自動安裝至 C:\OpenDHCPServer 或是 C:\Program Files\OpenDHCPServer