Skip to content

Instantly share code, notes, and snippets.

@erwinchang
erwinchang / framebuffer.c
Created February 15, 2017 09:43 — forked from FredEckert/framebuffer.c
Paint Pixels to Screen via Linux FrameBuffer
/*
To test that the Linux framebuffer is set up correctly, and that the device permissions
are correct, use the program below which opens the frame buffer and draws a gradient-
filled red square:
retrieved from:
Testing the Linux Framebuffer for Qtopia Core (qt4-x11-4.2.2)
http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html
*/
@erwinchang
erwinchang / dtv-test.md
Last active February 17, 2017 08:45
dtv test
############# ONVIF Broadcast ############# Begin
<ONVIF> onvifSendProbeV2 ---> UUID=[urn:uuid:1419d68a-1dd2-11b2-a105-7EEB4BA5B27E]
<ONVIF> onvifSendProbeV1 ---> UUID=[urn:uuid:1419d68a-1dd2-11b2-a105-D53E5AF9AD7E]
<ONVIF> onvifParseProbeMatchV1 ---> TYPE=[ONVIF], MAC=[94:86:D4:00:02:43], IP=[10.0.0.141], Port=[80]
<ONVIF> Device Found!! IP:10.0.0.141 <-> MAC:94:86:D4:00:02:43
<Event> SET_CONFIGURE CH(0) 94:86:D4:00:02:43,10.0.0.141,,ONVIF,(null),0,(null),0,80
<searchCallbackWrapper> 94:86:D4:00:02:43,10.0.0.141,,ONVIF,(null),0,(null),0,80 
<ReadSearchMsgValues> 94:86:D4:00:02:43,10.0.0.141,,ONVIF,(null),0,(null),0,80
<ReadSearchMsgValues> 94:86:D4:00:02:43,10.0.0.141,,ONVIF,(null),0,(null),0,80
@erwinchang
erwinchang / hifb.md
Last active February 21, 2017 03:48
hi3535 hifb

記錄hi3535 hifb

  • cmd
cmd note cmddata
FBIOGET_VSCREENINFO 获取屏幕可变信息 struct fb_var_screeninfo
FBIOPUT_VSCREENINFO 设置屏幕可变信息
FBIOGET_FSCREENINFO 获取屏幕固定信息 struct fb_fix_screeninfo
FBIOPAN_DISPLAY 设置 PAN显示 struct fb_var_screeninfo
@erwinchang
erwinchang / hi3535-product-hifb.md
Last active February 21, 2017 03:59
hi335板子 hifb log

HI3535 板子

  • HI3535 HiFb
    • 使用ARGB1555 , 16bit
    • Alpha Enable 關閉
    • colorkey 0x7c1f , 即為r(255),g(0),b(255)
# cat hifb0
layer name                       :layer_0 
Open count                       :2
Show state                       :ON
@erwinchang
erwinchang / pactl-list
Last active February 22, 2017 09:21
pulseaudio log
Module #0
Name: module-device-restore
Argument:
Usage counter: n/a
Properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore the volume/mute state of devices"
module.version = "8.0"
Module #1
@erwinchang
erwinchang / onvif-test.md
Last active February 24, 2017 08:55
使用curl測試ONVIF

onvif

  • test1
curl 10.0.0.141:80/onvif/device_service -d '<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>'

onvif-getsystemdateandtime

@erwinchang
erwinchang / onvif.md
Last active March 3, 2017 09:55
onvif note

onvif

  • [Client to ONVIF NVT devices Profile S: cameras][1]

  • [ onvif规范的实现:使用gSOAP创建SOAP调用实例 ][2]

    • 了解gSOAP用法(server及client)
  • [ONVIF Implementation 實作 FAQ 中文][4]

  • [onvif-gsoap-by-example][5]

  • [ONVIF / gSOAP in C++ by example][6]

  • Onvif GetProfile Response
  • 由trt:GetProfilesResponse的tt:SourceToken決定VideoServer頻道(每個頻道內會有大小碼流)
<ONVIF> OnvifDoGetProfiles ---> DeviceType=[VIDEO SERVER], channelNumber=[4], profileCount=[8]
<ONVIF> OnvifDoGetProfiles ---> ch=[0], pToken=[h264], Res=[1920x1080]
<ONVIF> OnvifDoGetProfiles ---> ch=[0], pToken=[h264_2], Res=[640x480]
<ONVIF> OnvifDoGetProfiles ---> ch=[1], pToken=[h264_3], Res=[1920x1080]
<ONVIF> OnvifDoGetProfiles ---> ch=[1], pToken=[h264_4], Res=[640x360]
<ONVIF> OnvifDoGetProfiles ---> ch=[2], pToken=[h264_5], Res=[1920x1080]
<ONVIF> OnvifDoGetProfiles ---> ch=[2], pToken=[h264_6], Res=[640x360]
* 開機3天(有3支斷連)
```
top - 09:41:49 up 3 days, 19:02, 1 user, load average: 139.81, 133.58, 132.44
Tasks: 135 total, 2 running, 133 sleeping, 0 stopped, 0 zombie
%Cpu(s): 72.3 us, 4.7 sy, 0.0 ni, 21.8 id, 0.2 wa, 0.0 hi, 0.9 si, 0.0 st
KiB Mem : 3940984 total, 76888 free, 1826940 used, 2037156 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 1717124 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
768 root 20 0 16.709g 1.458g 23608 S 302.0 38.8 14955:47 nvr