2017年6月18日 星期日

Bus Analyzer : Bus Hound


src:
http://perisoft.net/bushound/details.htm

notes:
a good utility for BUS analysis and emulation

2016年10月1日 星期六

IoT Cloud Solution

mot:
[16'10/2]:
   - find solution for IoT cloud service

src:
[16'10/2]:
  http://www.digikey.tw/zh/articles/techzone/2014/aug/mcu-vendors-make-iot-connections-to-the-cloud-practically-plug-and-play

ref:
[16'10/2]:
  http://electronics.stackexchange.com/questions/28792/what-is-dual-quad-i-o


notes:
[16'10/2]:
  - LAMP is not feasible due to security concern. Ex: DoS,
  - solution w/ security communication : SSL/TLS
   - Encrypt : AES, DES, CRC, SHA, MD5 
  -  MCU w/ security module : PIC32MZ EC (Microchip Technology)  , Tiva C (Texas Instruments) 
   - SQI is flash interface w/ 4 IO could have 4 times speed than SPI. No mater 1,2,4 line communication, they are still half-duplex instead of full-duplex
   - IAAS/PAAS provider : Amazon, Salesforce, Microsoft, IBM, Google, Fujitsu, NTT, AT&T, Verizon, Deutsche Telekom
...etc.

TODO:
[16'10/2]:
  - keep to track solution w/ security & account management.

2016年2月1日 星期一

2015年9月6日 星期日

Hadoop



Commetns:
- distributed architecture for compunting & storage
- could run in 3 modes : standalone , pseudo districuted, fully distributed
- client-server architect :
Server : run Name Node + Job Tracker
Client : run Data Node + Task Tracker
- the execution liverage counts on : MapReduce which is executed in slave side
-  HDFS is the filesystem used in hardoop, it will be kept in 3 different place. 2 is near-end side and the other is in far-end side
- HBASE is like a database could use for saving data after Reduce


Reference book:
- Windoop應用實作指南-掌握Hadoop翱翔雲端 by 許清榮,林奇暻, 買大誠


Thinking:
- if our traget data is distributed everywhere, maybe it's a way to handle locally and migrate.
- the point is map & key, the application must be divided & indexed via a key.

2015年5月4日 星期一

JNI coding

src:
http://blogforopensource.blogspot.tw/2012/08/jni-sample-java-code.html



notes:
15'5/5 :
- javah is used for JNI header
- pay attention to the c compile. It may need extra compiler like VC++




contents:

Blogging after a long time..


JNI - Java Native Interface.


Java interface to non­Java code.
It is Java's link to the "outside world"

•  Native methods are compiled into a dynamic link
  library (.dll, .so, etc.)
•  OS loads and links the library into the process
  that is running the Java Virtual Machine
•  Part of the Java Developer Kit(JDK),
  serves as a glue between Java side and
  native side of an application
• Allows Java code that runs inside a Java Virtual
  Machine (JVM) to inter operate with applications and
  libraries written in other programming languages,
  such as C, C++, and assembly

JNI w.r.t Operating System :


JNI Sequence:


If you are really interested in JNI,

You can find a Sample Code from here.

http://code.google.com/p/onlineexaminationsysteminjava/downloads/detail?name=samplejnicode.zip&can=2&q=

Reference:

http://patriot.net/~tvalesky/jninative.html
0 

Add a comment


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

Native Method example using JNI

Trivial JNI example
  1. Declare your native methods in an otherwise normal Java class.
    public class nativetest
    {
     public native String sayHello(String s);
     public static void main(String[] argv)
     {
      String retval = null;
      nativetest nt = new nativetest();
      retval = nt.sayHello("Beavis");
      System.out.println("Invocation returned " + retval);
     }
    }
    
  2. javac nativetest.java
    Standard Java compile
  3. javah -jni nativetest
    Generates .h files. Here is the code.
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include 
    /* Header for class nativetest */
    
    #ifndef _Included_nativetest
    #define _Included_nativetest
    #ifdef __cplusplus
    extern "C" {
    #endif
    /*
     * Class:     nativetest
     * Method:    sayHello
     * Signature: (Ljava/lang/String;)Ljava/lang/String;
     */
    JNIEXPORT jstring JNICALL Java_nativetest_sayHello
      (JNIEnv *, jobject, jstring);
    
    #ifdef __cplusplus
    }
    #endif
    #endif
    
  4. Write your native code, using the .h file generated above Copy the function prototype from the .h file and paste it in.
    #include "nativetest.h" /*double quotes tells it to search current directory*/
    
    JNIEXPORT jstring JNICALL Java_nativetest_sayHello
      (JNIEnv *env, jobject thisobject, jstring js)
    
    {
     return js;
    }
    
  5. Compile
    cl -c /Ic:\jdk1.1.6\include /Ic:\jdk1.1.6\include\win32 nativetest.c 
    link /libpath=c:\jdk1.1.6\lib nativetest.obj /dll
    
    The above uses Microsoft Visual C++ command-line tools.
  6. Modify your Java class to load the library.
    public class nativetest
    {
     static {
      System.loadLibrary("nativetest");
     }
     public native String sayHello(String s);
     public static void main(String[] argv)
     {
      String retval = null;
      nativetest nt = new nativetest();
      retval = nt.sayHello("Beavis");
      System.out.println("Invocation returned " + retval);
     }
    }
    
  7. run the example
    C:\jni\hello>java nativetest
    Invocation returned Beavis
    


    notes:

    2015年5月2日 星期六

    Mose code


    src:
    http://nomad1999.tripod.com/general/d015.htm

    content:



    通訊知識
    文, 表, 程式:  Blackmore

    摩斯電碼進階 
    (這一整頁有點大, 還請大家耐心些, 訓練程式在最下面)
      
    摩斯電碼說明
    1.摩斯電碼的組成英碼每組通常為五字
    例: VCDSG GTTUU POPOQ DDBNL GTRDY TTFUU DDRTY QROOP SXCGY GTTEJ
    中碼(數字碼)通常每組四字
    例:5548 9038 4830 8402 4850 5848 4830 47302 5849 4820
    2.摩斯電碼的聲響只有長短音的分別  " . "  中文練習讀音為"滴"  " - "中文練習讀音為"答"
    而電碼長短之時間如下:
    一個字 如 Z " --.." 
    " . " 的時間為一個單位  " - " 的時間為三個單位 
    " . "和 " - "的間隔時間為三個單位
     
    字和字 如 GR 為 --.  .-.        這時字和字間格的時間為三個單位
     
    字組和字組 GTRED  POQAZ  時間間格為五個時間單位
      
    詳細摩斯電碼表
    .  中文練習時念做"滴"       -  中文練習時念做"答"
    摩斯電碼及電話讀音法
    Letter摩斯電碼EnglishAmerican InternationalNATOAmerican (police)
    A.-AndrewAbelAmsterdamAlfaAdam
    B-...BenjaminBakerBaltimoreBravoBoy
    C-.-.CharlieCharlieCasablancaCharlieCharlie
    D-..DavidDogDenmarkDeltaDavid
    E.EdwardEasyEdisonEchoEdward
    F..-.FrederickFoxFloridaFoxtrotFrank
    G--.GeorgeGeorgeGallipoliGolfGeorge
    H....HarryHowHavanaHotelHenry
    I..IsaacItemItalyIndiaIda
    J.---JackJigJerusalemJulietJohn
    K-.-KingKingKilogramKiloKing
    L.-..LucyLoveLiverpoolLimaLincoln
    M--MaryMikeMadagascarMikeMary
    N-.NelliNanNew YorkNovemberNora
    O---OliverOboeOsloOscarOcean
    P.--.PeterPeterParisPapaPaul
    Q--.-QueenieQueenQuebecQuebecQueen
    R.-.RobertRogerRomaRomeoRobert
    S...SugarSugarSantiagoSierraSam
    T-TommyTareTripoliTangoTom
    U..-UncleUncleUppsalaUniformUnion
    V...-VictorVictorValenciaVictorVictor
    W.--WilliamWilliamWashingtonWhiskyWilliam
    X-..-XmasX (eks)XanthippeX-rayX-ray
    Y-.--YellowYokeYokohamaYankeeYoung
    Z--..ZebraZebraZürichZuluZebra
     
    數字及標點符號
    數字短碼長碼標點符號Code
    1.-.----句點 。.-.-.-
    2..-..---逗點 ,--..--
    3...--...--Colon---...
    4....-....-問號  ?..--..
    5..........撇號 ‵.----.
    6-....-....連字號  --....-
    7--...--...Fraction bar-..-.
    8-..---..括號(   )-.--.-
    9-.----.引號『 』.-..-.
    0------  
    訓練程式
    在上面的input欄輸入英文字母或文字,選擇速度後按下play即可
    英碼型式:FFKRP FKEOD SSKPQ XZLKF KOAQG KPLYO
    中碼型式:1245 6543 5533 6672 0954 3367 9707 1273 0836
    你也可以下載回去練習(內容包含練習表格,電報來去電紙)

    完成日期99-08-26, 最後修改日期99-08-26
    註: 本文是轉錄自Blackmore先生原放置於男人殺手站的文章
    此文獲得Blackmore先生同意轉載於此, Nomad僅做校對與重新排版的工作
    在此特別再一次的感謝Blackmore 先生能授權本站轉載這部分的內容~~

    2015年3月17日 星期二

    EVT DVT PVT

    src:
    http://paul0306-home.blogspot.tw/2012/12/evtdvtpvt.html

    notes:
    - 15'3/17 : these 3 terms are easily confused.
    Actually, these term is close to HW validation including MFG (PVT for producible?).

    content:

    新產品在進行開發時,通常都會經過研發設計及工廠試投驗證階段,透過試產來取得樣品機,一方面是可以拿來作進一步的測試,也可以讓工廠盡早瞭解這個產品的製程並準備量產事宜,工廠也可以提出來自製造生產的意見(DFM, Design For Manufacturing),免得研發把東西設計出來,但卻出現工廠不能生產的情況。


    新產品在開發上一般會有三個試產的驗證階段,每個階段都可以有好幾次或是直接跳過,原則上應視實際需求而定,還有不要為了試產而試產,試產一定要有目的或必須性,否則試產既浪費錢又浪費時間。


    EVT : Engineering Verification Test (工程驗證測試階段)

    一般這個階段所生產出來的樣品只有電路板,研發工程師通常會先把他想要驗證的想法或是無法決定的設計擺在這種板子上進行驗證除錯使用

    如果研發的產品屬於全新的平台,第一次剛設計出來時,問題通常很多,到底要採取哪種可行的設計方案?所以有可能會有好幾次的 EVT修改

    這個階段的機構外殼如非使用舊有模具,便會使用mockup來進行驗證,主要目的是在模具發包製作前,用來驗證機構外殼設計是否符合需求,因為真正的模具費用很貴,所以要先驗證才能開模。

    如果設計是屬於修改既有的產品設計,那就會比較簡單,因為不會有太多的新技術,也就不需要太多的 EVT驗證,有時候我們也會視情況直接跳過 EVT而進入DVT。




    DVT: Design Verification Test (設計驗證測試階段)

    這是研發的第二階段,所有設計的驗證應該都已經完成了。這個時候會把機構的外殼加上來,另外電路板也要達到實際的尺寸大小,這樣才可以把電路板整個放到機構殼之中。

    這個階段要驗證整機的功能,重點是把設計及製造及安規的相關問題找出來並解決,以確保所有的設計都符合規格,而且可以導入生產。



    PVT: Production Verification Test(生產驗證測試階段)

    本階段的產品設計應該已經全部完成,設計驗證也告一段落。這個階段試產的目的是要做量產前的製造流程測試,所以必須要生產一定數量的產品,而且所有的生產程序都要符合製造廠的標準程序。

    另外還要確認所有的治工具、測試治具及生產設備數量是否可以符合量產的產能(capacity)需求,在這個階段工廠的PE人員就非常的重要,經由研發的手要把產品導入正式量產,這中間的工作一點都不輕鬆及時的對策及時和研發單位進行設計確認及反映、工廠各製程的文件撰寫及生產線人員及跟進都是一個新產品在導入時成功的關鍵。