2016年1月18日 星期一

Error Traversing Database for ipnum = XXXXXX - Perhaps database is corrupt?

(It's not solving the problem. Just a record.)
Ubuntu 15.10
wireshark 1.12.7

For unknown reason my wireshark is complaining the following:

Error Traversing Database for ipnum = XXXXXX - Perhaps database is corrupt?


#2207 (Issue with Geo Location) – Deluge
http://dev.deluge-torrent.org/ticket/2207
I have replace the geoip-database package with geoip-database-contrib and the problem seems to be resolved.

Install geoip-database-contrib require removing geoip-database and geoip-database-extra. After this the wireshark complain about the following:
Error Opening file /usr/share/GeoIP/GeoIPASNumv6.dat Error Opening file /usr/share/GeoIP/GeoIPASNum.dat Error Opening file /usr/share/GeoIP/GeoLiteCityv6.dat Error Opening file /usr/share/GeoIP/GeoLiteCity.dat 
It's not solving the problem, so I reverted to the original.

2016年1月10日 星期日

Samsung J2 cannot sync Google calender

J2預設安裝完不知道為何 S planner, Google Calender and Jort都沒有Sync到Calender data.
網路上有各種建議 可以先google一下
不過對我的情況都沒用
最後是在
[設定] -> [帳號] -> [Google] -> (my google account) 裡面
竟然找不到 [同步日曆]??

我的解法是 直接刪掉這個google account, 再重新加一個, 確認有[同步日曆]後
強迫他同步或全部立即同步即可

出師不利....好鳥

樂水部落


部落生活 歷史 遷移
植物
百年隧道/大葉鼻蝠
無毒日曬米
賞櫻泡湯

宜蘭縣大同鄉樂水社區葛瑪崙部落產業永續發展協會 - 樂水社區,東壘部落,瑪崙部落,泰雅族,智腦路,桂竹筍,鹿湖,原住民生態體驗營
http://www.leshui-atayal.org.tw/

宜蘭樂水部落。太平山底下被遺忘的樂土 @ 赤子之心闖世界 :: 痞客邦 PIXNET ::
http://k640640.pixnet.net/blog/post/54571058-%E5%AE%9C%E8%98%AD%E6%A8%82%E6%B0%B4%E9%83%A8%E8%90%BD%E3%80%82%E5%A4%AA%E5%B9%B3%E5%B1%B1%E5%BA%95%E4%B8%8B%E8%A2%AB%E9%81%BA%E5%BF%98%E7%9A%84%E6%A8%82%E5%9C%9F

吉時去行樂-樂水部落 與泰雅祭典有約 - 中時電子報
http://www.chinatimes.com/newspapers/20131130000647-260116

樂水部落位於前往宜蘭太平山必經的宜51線約11k處,從台7線的牛鬥橋轉進約半小時山路車程,是一個被日本人強制遷村形成的泰雅族聚落。
樂水部落最早發源於南投仁愛鄉,與賽德克巴萊那群人有著同樣的桀驁與剽悍,並隨著獵場與領地所需,逐漸遷到現今前往武陵農場途經的中橫支線四季一帶,打造「門諾源」部落。
日 本據台,開始理蕃,為了順利劫取太平山檜木資源,日本人派出兩位醫生,以行醫濟病方式向原住民示好。在部落張貼的「遷徙及由來」寫著這麼一個故事:兩位日 本醫生在耆老帶領下,沿蘭陽溪床進入門諾源部落,並帶來「味噌」跟「醬油」兩樣禮品,卻因色澤關係,被族人誤認為是代表羞辱的「糞」及「血」,兩位倒楣的 日本醫生就此斷頭,隨即展開持續十多年的衝突抗爭。
蕃刀與弓箭,終究敵不過子彈與大砲,為了保存血脈,部落終於投降,並就此被日本人強制從四季遷移到現地,部落居民也從原本的近千名剩下104人,差點遭到滅族。
遷村拿鋤頭 種稻吃年糕
只是,日本人還是不放心,將這群火爆分子遷村到現址,主要因這裡有著廣大平台,是太平山檜木在運送到羅東前的主要存放倉庫地,火車在此設站,派出所在此,方便管理,同時也開始教導這些泰雅族人放下弓箭,拿起鋤頭,讓樂水部落成為台灣最早種植白米、吃年糕的原住民部落。
光 復之後,太平山持續伐木,政府也選定此地設立大同鄉公所,閩南、客家等族群也相繼進入。樂水社區發展協會總幹事曾勝二說:「小時候我們部落裡有火車站、鄉 公所、電影院、醫院、郵局、理髮廳,甚至還有客家信仰的三山國王廟,漢人跟我們買米,我們跟漢人買鹽,大夥和樂融融,好似一起快樂住在西門町鬧區裡。」
可惜歡樂時光永遠特別短,隨著民國67年颱風重創,太平山鐵道中斷,民國68年大同鄉公所搬移到靠近平地的崙埤村,民國71年停止伐木,漢人遠離,產業中斷,只剩樂水部落的泰雅族人獨自被遺留在山區,伴著山豬與山羌過活。
部 落牧師簡清勇(怗楠羅信)說:「我們就這樣被遺忘了。」從民國67年開始直到民國87年,整整20年,樂水部落沒有聯外道路,連想到市區買鹽巴都得涉水越 過蘭陽溪;正繁華時,一間樂水國小就有五百多位小學生,現在全校只有25人,小學生畢業後才不過13歲,也得離鄉到外地上中學。


樂水故事|宜蘭縣大同鄉樂水社區發展協會 - 樂水社區
http://lokahsu.sunshin.org.tw/story.php

130線林道 樂水部落
http://130.yilanmr.org.tw/tribe1.htm




2015年12月25日 星期五

Using Wireshark to analysis LTE traffic


Development - The Wireshark Wiki
https://wiki.wireshark.org/Development

Chapter 9. Packet dissection
https://www.wireshark.org/docs/wsdg_html_chunked/ChapterDissection.html
9.2. Adding a basic dissector
https://www.wireshark.org/docs/wsdg_html_chunked/ChDissectAdd.html

Creating Your Own Custom Wireshark Dissector - CodeProject
http://www.codeproject.com/Articles/19426/Creating-Your-Own-Custom-Wireshark-Dissector

6.2. Overview
https://www.wireshark.org/docs/wsdg_html_chunked/ChWorksOverview.html


6.4. Capture Files
https://www.wireshark.org/docs/wsdg_html_chunked/ChWorksCaptureFiles.html

HowToDissectAnything - The Wireshark Wiki
https://wiki.wireshark.org/HowToDissectAnything
User DLT (147~162)
od -Ax -tx1 -v /tmp/cnnheaders.txt | text2pcap -l 147 - httpresp.pcap
10.20. User DLTs protocol table
https://www.wireshark.org/docs/wsug_html_chunked/ChUserDLTsSection.html

IttiAnalyzer < OpenAirInterface < Institut Eurecom TWiki
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/IttiAnalyzer
An example of LTE packet dissection can be found oai_l2l3.pcap.
https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/IttiAnalyzer/oai_l2l3.pcap

Wireshark: Re: How to use lte_rrc in wireshark?http://seclists.org/wireshark/2010/Feb/476

[Wireshark] Contents of /trunk/epan/dissectors/packet-pdcp-lte.c
http://anonsvn.wireshark.org/viewvc/trunk/epan/dissectors/packet-pdcp-lte.c?revision=31661&view=markup

MAC-LTE - The Wireshark Wiki
https://wiki.wireshark.org/MAC-LTE

RLC-LTE - The Wireshark Wiki
https://wiki.wireshark.org/RLC-LTE

RLC - The Wireshark Wiki
https://wiki.wireshark.org/RLC

LTE RRC - The Wireshark Wiki
https://wiki.wireshark.org/LTE%20RRC

Wireshark解析MAC-LTE - 简书
http://www.jianshu.com/p/4f1991302d63


OpenAirInterface


OpenAirInterface | 5G software alliance for democratising wireless innovation
http://www.openairinterface.org/

Getting Started | OpenAirInterface
http://www.openairinterface.org/?page_id=25

Towards Open Cellular Ecosystem | OpenAirInterface
http://www.openairinterface.org/?page_id=864

WebHome < OpenAirInterface < Institut Eurecom TWiki
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome

GetSources < OpenAirInterface < Institut Eurecom TWiki
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/GetSources

AutoBuild < OpenAirInterface < Institut Eurecom TWiki
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/AutoBuild

LTE spec

3GPP Releases
http://www.3gpp.org/specifications/67-releases

3GPP specification Release version matrix
http://www.3gpp.org/DynaReport/SpecReleaseMatrix.htm

Master Telecom Faster - Fast tracks into the LTE Specifications
http://www.mastertelecomfaster.com/index.php

Master LTE Faster - The SpecTool - LTE Protocols
http://www.masterltefaster.com/index.php

LTE/SAE Call Flow Diagrams @ GSM, SIP, H.323, ISUP and IMS Call Flows
http://www.eventhelix.com/realtimemantra/Telecom/#LTE_SAE_Call_Flow_Diagrams

Telecom • Networking • Software
http://www.eventhelix.com/RealtimeMantra/#.VnzvgjWkVC0

LTE (Long Term Evolution) Tutorials and Call Flows
http://www.eventhelix.com/lte/#.VnzxXDWkVC0

Networking Protocol Sequence Diagrams
http://www.eventhelix.com/Realtimemantra/Networking/#.VnzxQDWkVC2



PDCP
http://www.eventhelix.com/lte/presentations/3GPP-LTE-PDCP.pdf

2015年12月11日 星期五

Access SPI bus in u-boot and Linux


Serial Peripheral Interface Bus - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

U-boot SPI test tool

The u-boot command sspi Usage:

sspi - SPI utility command
Usage:
sspi [<bus>:]<cs>[.<mode>] <bit_len> <dout> - Send and receive bits
<bus> - Identifies the SPI bus
<cs> - Identifies the chip select
<mode> - Identifies the SPI mode to use
<bit_len> - Number of bits to send (base 10)
<dout> - Hexadecimal string that gets sent
<dout> is in hex but without the prefix "0x". All others are in decimal.

The following is SPI mode defined in u-boot/include/spi.h. But still depends on the mode that SPI controller/driver can handle:
/* SPI mode flags */
#define SPI_CPHA        0x01                    /* clock phase */
#define SPI_CPOL        0x02                    /* clock polarity */
#define SPI_MODE_0      (0|0)                   /* (original MicroWire) */
#define SPI_MODE_1      (0|SPI_CPHA)
#define SPI_MODE_2      (SPI_CPOL|0)
#define SPI_MODE_3      (SPI_CPOL|SPI_CPHA)
#define SPI_CS_HIGH     0x04                    /* CS active high */
#define SPI_LSB_FIRST   0x08                    /* per-word bits-on-wire */
#define SPI_3WIRE       0x10                    /* SI/SO signals shared */
#define SPI_LOOP        0x20                    /* loopback mode */
#define SPI_SLAVE       0x40                    /* slave mode */
#define SPI_PREAMBLE    0x80                    /* Skip preamble bytes */
It depends on the requirement of the device, as well as the data sent to the device as command. Says we require bus=0, CS=2, data len=32, data=0x51525354, the device require SPI_3WIRE, SPI_CPHA, SPI_CPOL=> mode=0x13 (19).
# sspi 0:2.19 32 51525354
51525354


Linux SPI test tool
Projet spi-tools « Christophe Blaess
http://www.blaess.fr/christophe/2014/08/12/projet-spi-tools/
https://github.com/cpb-/spi-tools
usage: ./spi-config options...
  options:
    -d --device=  use the given spi-dev character device.
    -q --query         print the current configuration.
    -m --mode=[0-3]    use the selected spi mode.
             0: low iddle level, sample on leading edge
             1: low iddle level, sample on trailing edge
             2: high iddle level, sample on leading edge
             3: high iddle level, sample on trailing edge
    -l --lsb={0,1}     LSB first (1) or MSB first (0)
    -b --bits=[7...]   bits per word
    -s --speed=   set the speed in Hz
    -h --help          this screen
    -v --version       display the version number
CPOL=1, idle state is high
CPHA=1, sample on falling
=>mode=3
But there's no 3WIRE related config, and don't know how to decide speed and lsb option.
spi-config -d /dev/spidev0.0 -m 3 -l 0 -b 8
spi-config -d /dev/spidev0.0 -q

2015年12月8日 星期二

Install Android Studio on Ubuntu 14.04.2 LTS

Ubuntu 14.04.2 LTS

sudo apt-get install default-jre

I got this when trying to install Android Studio:

JDK Required: 'tools.jar' seems to be not in Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.
It can be fixed by install JDK(I thought I already did? But I searched all the package installed but there's no tools.jar.) and export the JAVA_HOME.

Java SE Development Kit 7 - Downloads | Oracle Technology Network | Oracle
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html


Installing the JDK Software and Setting JAVA_HOME (Using the GlassFish ESB Installation CLI)
http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/

Download the JDK from Oracle.
mkdir -p  /usr/java;
cd /usr/java ;
sudo tar xf ~/Downloads/jdk-7u79-linux-x64.tar.gz ;
export JAVA_HOME=/usr/java/jdk1.7.0_79;

Using the Emulator | Android Developers
http://developer.android.com/tools/devices/emulator.html#vm-linux

Download Android Studio and SDK Tools | Android Developers
http://developer.android.com/sdk/index.html

Download Android Studio and unzipped, and enter the directory. Run the following command to start the installation of Android Studio:
cd bin;
./studio.sh

DragonBoard 410c: Module 3 Setting up Your Developing Environment
https://d396qusza40orc.cloudfront.net/phoenixassets/internet-of-things-history/C2M3-ExploringAndroidStudio.pdf



VIM plugin

史丹利部落格: Vim + Trinity + Source Explorer + Tag List + NERD_tree + ctags
闇月千瞳的部落格: 使用 SrcExpl 強化 VIM 的 Source Explorer 能力
http://yuanfarn.blogspot.tw/2013/02/srcexpl-vim-source-explorer.htmlJoe's Notepad: vim + ctags + cscope + taglist + Trinity + NERD_tree + Source Explorer
vim + ctags + cscope + taglist + Trinity + NERD_tree + Source Explorer 

Trinity - the Trinity of taglist, NERDtree and SrcExpl: an IDE works like "Source Insight" : vim online


Vim Taglist plugin
http://vim-taglist.sourceforge.net/

Ctags and Taglist: Convert Vim Editor to Beautiful Source Code Browser for Any Programming Language
http://www.thegeekstuff.com/2009/04/ctags-taglist-vi-vim-editor-as-sourece-code-browser/
:TlistOpen

minibufexpl.vim - Elegant buffer explorer - takes very little screen space : vim online
http://www.vim.org/scripts/script.php?script_id=159

MiniBufExplorer插件的使用 - - ITeye技术网站
http://suchj.iteye.com/blog/1169566
向前循环切换到每个buffer名上
向后循环切换到每个buffer名上
在打开光标所在的buffer
d 删除光标所在的buffer

2015年12月7日 星期一

VIM script


Vim - map shell command - Stack Overflow
http://stackoverflow.com/questions/9364040/vim-map-shell-command

Note some things:
  1. Don’t use map (without n and nore) unless you have a specific reason. I believe you don’t need this mapping for visual and operator-pending modes (leading n restricts mapping to normal mode only) and you also should not want this mapping to be remappable.
  2. Use to discard count you can occasionally type unless you do know you need it (third version uses two hacks that turn mapping to no-op with a side-effect and does not need ).
  3. Never forget to escape shell arguments.
  4. Version with silent ! (do not forget space after silent, this is why @David Pope’s answer does not work) has at the end. This is because using ! will always provide access to your terminal and thus redraw is needed after command has run.
  5. Versions with system() won’t work if you add an argument containing newline, it is a documented bug. If you don’t want to do so (expand('') won’t ever add newline) it is absolutely safe.
  6. t is a very useful motion. It is better to learn to use it then remap it to something. I suggest ,t as a lhs.
Mapping keys in Vim - Tutorial (Part 1) - Vim Tips Wiki - Wikia
http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_%28Part_1%29

Mapping key sequences
http://osr507doc.sco.com/en/OSUserG/_mapping_key_sequences.html

Vim documentation: help
http://vimdoc.sourceforge.net/htmldoc/help.html
Vim documentation: usr_41
http://vimdoc.sourceforge.net/htmldoc/usr_41.html
Vim documentation: map
http://vimdoc.sourceforge.net/htmldoc/map.html

Learn Vimscript the Hard Way
http://learnvimscriptthehardway.stevelosh.com/

2015年12月4日 星期五

C call graph with cscope

sudo apt-get install xdot
sudo apt-get install cscope

CallGraphviz—依據 cscope、Graphviz 以及 xdot 實作的 call graph visualizer - OpenFoundry
http://www.openfoundry.org/tw/tech-column/8352-callgraphviz-cscopegraphviz-xdot-call-graph-visualizer

git clone https://github.com/chihchun/callgraphviz.git
python visualizer.py
問題
  • 要一個一個symbol自己key進去
  • 無法刪除已key入的symbol
  • 無法Save成.dot檔案

toolchainguru: Bash: C Call Trees and Graphs
http://www.toolchainguru.com/2008/07/bash-c-call-trees-and-graphs.html
The bash script works for me with some modification.
https://github.com/mkl0301/callgraphviz/blob/master/calltree.sh

Functions supported:
  1. downstream X: functions called by X (callee)
  2. upstream X: functions that call X(caller)
  3. subgraph X Y: all code paths that lead from function X to function Y.
  4. related A, B, ... Z: all code paths between an arbitrary set of functions A, B, C, [...] Z
First you need to have your cscope.out generated. Second source the script calltree.sh:
. calltree.sh;
Then:
downstream FUNC1 LEVEL
upstream FUNC1 LEVEL
subgraph FUNC1 FUNC2
related FUNC1...FUNCn

FUNCx: Function name
LEVEL: levels to look into. 0: infinite
The latest script could take the Function name as the first parameter:
Call the built-in function by providing the function name as the first
    parameter:
        ./calltree.sh FUNC PARM1 PARM2...PARM8

Thus I could do the following directly:
./calltree.sh downstream FUNC1 LEVEL


CCTree - C Call-Tree Explorer -- Cscope based source-code browser; code flow analyzer : vim online
http://www.vim.org/scripts/script.php?script_id=2368
Vim CCTree -- Call-tree Explorer plugin
https://sites.google.com/site/vimcctree/
cctree help file
http://sites.google.com/site/vimcctree/cctree.txt
Copy cctree.vim to ~/.vim/plugins/

Load database
    :CCTreeLoadDB
(Please note that it might take a while depending on the  database size)

Save native Xref Db
   :CCTreeSaveXRefDB  cctree.out

Load native XRef Db~
    :CCTreeLoadXRefDB  cctree.out

Get reverse call tree for symbol  <C-\> <
    :CCTreeTraceReverse       
Get forward call tree for symbol
<C-\> >
    :CCTreeTraceForward
Increase depth of tree and update
<C-\> =
    :CCTreeRecurseDepthPlus     
Decrease depth of tree and update
<C-\>  -
    :CCTreeRecurseDepthMinus    



2015年12月3日 星期四

cscope

sudo apt-get install cscope

I have the  cscope_maps.vim file(check turtoial [1]), and the .vimrc thing from Vim Tips Wiki [2], but removed the quick fix part, as suggested by the [3]. After removed the quick fix part, all duplicated symbol will ask for selection, even for tags!!!

cscope -Rbk -s XXXX
-R     Recurse subdirectories during search for source files.
-b     Build the cross-reference only.-q     Enable  fast  symbol  lookup  via an inverted index.
-k     ``Kernel Mode'', turns off the use of the  default  include  dir (usually  /usr/include) when building the database, since kernel source trees generally do not use it.
-sdir  Look in dir for additional source files. This option is  ignore if source files are given on the command line.
-q     Enable  fast  symbol  lookup  via an inverted index.

-C     Ignore letter case when searching.
-d     Do not update the cross-reference.
Cscope interactive
^d: Exit cscope.
: Alternate between the menu and the list of matching lines

Contrl-\+
       c: Find functions calling this function (caller)
       d: Find functions called by this function (callee)
       e: Find this egrep pattern
       f: Find this file
       g: Find this definition
       i: Find files #including this file
       s: Find this C symbol
       t: Find this text string




[1] Vim/Cscope tutorial
http://cscope.sourceforge.net/cscope_vim_tutorial.html

Vi with Cscope
http://web.missouri.edu/~hantx/Tools/vi/TonyViNotes/node11.html
  1. Building database for Cscope:
    $ cscope -Rb
    This command makes the Cscope parse all the subdirectories (-R option) and exit without entering awkward Cscope interface.
  2. List all the uses of the symbol under the cursor:
    Ctrl+\s
    That is Control-backslash and then 's'. Select one of items in the list and hit enter, you will jump to the that use. Ctrl+t jump back.
  3. Find functions that under the cursor
    Ctrl+\d
    That is Control-backslash and then 'd'.
  4. Open the file with filename under cursor
    Ctrl+\f
    That is Control-backslash and then 'f'.
  5. Jump back from most recent jumping-off point:
    Ctrl+t
[2] Cscope - Vim Tips Wiki - Wikia
http://vim.wikia.com/wiki/Cscope
A Collection of Vi Tips
http://users.nccs.gov/~fwang2/tools/vinotes.html
Cscope Tutorial
https://courses.cs.washington.edu/courses/cse451/12sp/tutorials/tutorial_cscope.html

[3] Vi + Cscope: using "cscope find c function" in vim, finds multiple results, how to go next - Stack Overflow
http://stackoverflow.com/questions/4399519/vi-cscope-using-cscope-find-c-function-in-vim-finds-multiple-results-how

linux - How to set vim as default cscope editor? - Stack Overflow
http://stackoverflow.com/questions/28121485/how-to-set-vim-as-default-cscope-editor

Using Cscope on large projects (example: the Linux kernel)
http://cscope.sourceforge.net/large_projects.html

2015年12月1日 星期二

BASH: invoked by sh enter POSIX mode

Bash Reference Manual: Bash POSIX Mode
http://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html

 invoked as sh, Bash enters POSIX mode after reading the startup files.

Execute the following script with bash and sh, which also links to sh, get the different result:
~$ cat a
#!/bin/bash
echo a

~$ cat test
#!/bin/bash
source a
echo b

~$ ls /bin/sh -alh
lrwxrwxrwx 1 root root 4 12月  1 16:30 /bin/sh -> bash

~$ bash test
a
b

~$ ./test
a
b

~$ sh test
test: line 2: source: a: file not found




2015年11月24日 星期二

NOR flash CFI and AMD/Fujitsu Standard Command Set


Common Flash Memory Interface - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Common_Flash_Memory_Interface

Vendor Command Set & Control Interface ID Code Assignments

  1. Intel/Sharp Extended Command Set
  2. AMD/Fujitsu Standard Command Set
  3. Intel Standard Command Set
  4. AMD/Fujitsu Extended Command Set
SPANSION: Using CFI to Read and Debug Systems
https://www.spansion.com/Support/Application%20Notes/read_debug_using_CFI_an.pdf

SPANSION: S70GL256M00 256 Megabit (8 M x 32-Bit/16 M x 16-Bithttp://data.datasheetlib.com/pdf1/127/27/1272714/advanced-micro-devices-s70gl256m00_be0646f6ba.pdf
p.34 Table 10. Command Definitions (x32 Mode, WORD# = V IH )
p.35 Table 11. Command Definitions (x16 Mode, WORD# = V IL )


2015年11月22日 星期日

ALPN


I could got the following with openssl-1.0.2d. One strange thing is that the following command in red. They are the same command, the first says "ALPN h2-14", while the one after h2 says "no ALPN negotiated".
~ # (echo | openssl s_client -alpn h2-14 -connect google.com:443) | grep ALPN
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
ALPN protocol: h2-14
DONE
~ # (echo | openssl s_client -alpn h2 -connect google.com:443) | grep ALPN     
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA                     
verify error:num=20:unable to get local issuer certificate                     
DONE                                                                           
ALPN protocol: h2                                                              
~ # (echo | openssl s_client -alpn h2-14 -connect google.com:443) | grep ALPN  
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA                     
verify error:num=20:unable to get local issuer certificate                     
No ALPN negotiated                                                             
DONE                                                                           


[wiki] Application-Layer Protocol Negotiation - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation

HTTP/2 tests Openlitespeed 1.3.8 which OpenSSL version used ? | OpenLiteSpeed Community and News
http://openlitespeed.com/threads/http-2-tests-openlitespeed-1-3-8-which-openssl-version-used.1172/

ALPN check reports No ALPN negotiated - ALPN is only supported in OpenSSL 1.0.2, so wonder if OpenLiteSpeed 1.3.8 bundled OpenSSL is <1 .0.2="" br="">
/opt/h2o_openssl/bin/openssl s_client -alpn h2-14 -host OPENLITESPEEDHOST.centminmod.com -port 8082

---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
NPN check reports that NPN extension is supported = Next protocol: (1) h2-14
/opt/h2o_openssl/bin/openssl s_client -nextprotoneg h2-14 -host OPENLITESPEEDHOST.centminmod.com -port 8082

---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
Next protocol: (1) h2-14
No ALPN negotiated 
Giuseppe Ciotta's Blog – Testing NGINX HTTP/2 support
https://giuseppeciotta.net/testing-nginx-http2-support.html
(echo | openssl s_client -alpn h2 -connect giuseppeciotta.net:443) | grep ALPN
...
ALPN protocol: h2

OpenSSL - Dev - [Patch] ALPN Implementation for OpenSSL
http://openssl.6102.n7.nabble.com/Patch-ALPN-Implementation-for-OpenSSL-td45509.html

Feature #9390: Support for the ALPN TLS extension - Ruby trunk - Ruby Issue Tracking System
https://bugs.ruby-lang.org/issues/9390


linux - How to detect if a server is using SPDY - Stack Overflow
http://stackoverflow.com/questions/23742928/how-to-detect-if-a-server-is-using-spdy
openssl s_client -connect google.com:443 -nextprotoneg ''
CONNECTED(00000003)
Protocols advertised by server: spdy/3.1, spdy/3, http/1.1

 

2015年11月13日 星期五

Synergy

Synergy - Mouse and keyboard sharing software
http://synergy-project.org/


v1.4.18 is still free version
http://synergy-project.org/download/free/

Nightly Build is also available to download
https://synergy-project.org/nightly

But the standard release require login:




2015年11月1日 星期日

LTE RACH

RACH: ShareTechnote
http://www.sharetechnote.com/html/RACH_LTE.html

3GPP Long Term Evolution (LTE): Random Access Procedure in LTE
http://4g-lte-world.blogspot.tw/2013/04/random-access-procedure-rach-in-lte.html

LTE bearer and protocol layer






Long Term Evolution Protocol Overview
https://www.freescale.com/files/wireless_comm/doc/white_paper/LTEPTCLOVWWP.pdf
Long-Term Evolution Protocol: How theStandard Impacts Media Access Control
http://www.freescale.com/files/training_presentation/TP_LTE_PHY_MAC.pdf

LTE attach procedure | LTE AND BEYOND | Tech-blog on 4G/LTE and beyond..
http://www.lteandbeyond.com/2012/01/lte-attach-procedure.html

2015年10月23日 星期五

Numonyx M29EW devices report incorrect write buffer


http://datasheet.octopart.com/PC28F256M29EWLA-Micron-datasheet-11738582.pdf
p.114, CFI query return data x16 offset 0x2A and 0x2B, both x16 and x8 return 1024,

For X16/X8 mode, the maximum buffer size is 1024 bytes/256 bytes respectively.
http://git.denx.de/?p=u-boot.git;a=commit;h=c502321c4a1bc8d859ecf19b22f9d0ce03954fd6
From c502321c4a1bc8d859ecf19b22f9d0ce03954fd6 Mon Sep 17 00:00:00 2001
From: Jagannadha Sutradharudu Teki
Date: Fri, 1 Mar 2013 16:54:26 +0530
Subject: [PATCH] mtd: cfi_flash: Write buffer size adjustment for M29EW
 Numonyx devices

This patch addjusted the write buffer size for M29EW devices those
are operated in 8-bit mode.

The M29EW devices seem to report the CFI information wrong when
it's in 8 bit mode.

There's an app note from Numonyx on this issue and there's a patch
in the open source as well for Linux, but it doesn't seem to be in mainline.

Signed-off-by: Jagannadha Sutradharudu Teki
Tested-by: Jagannadha Sutradharudu Teki

CFI doens't have info for read buffer size(page size in M29EW)

2015年10月22日 星期四

tshark: cannot save captured file to a file

Cannot capture packet in uaual user, while cannot save file in privilege mode
tshark -i 1 -a duration:10 -w x.pcap

tshark: Lua: Error during loading:
 [string "/usr/share/wireshark/init.lua"]:46: dofile has been disabled due to running Wireshark as superuser. See http://wiki.wireshark.org/CaptureSetup/CapturePrivileges for help in running Wireshark as an unprivileged user.
Running as user "root" and group "root". This could be dangerous.
Capturing on 'wlan0'
tshark: The file to which the capture would be saved ("x.pcap") could not be opened: Permission denied.

http://anonscm.debian.org/viewvc/collab-maint/ext-maint/wireshark/trunk/debian/README.Debian?view=markup
groupadd wireshark
useradd -G wireshark <username>
usermod -a -G wireshark
<username>
Always remember to reboot or logout to have the change take effect!!!

https://wiki.wireshark.org/CaptureSetup/CapturePrivileges
setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap