Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Nordic nRF51822でBLEしてみました

4,609 views

Published on

Nordic nRF51822でBLEしてみました

Published in: Technology
  • DOWNLOAD THI5 BOOKS 1NTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Nordic nRF51822でBLEしてみました

  1. 1. Nordic nRF51822 で BLE してみました ● Bluetooth Low Energy(BLE) をやってみたのだ。 ● 入手しやすく、開発環境も無料で手に入る nRF51822 を使った。 ● mbed ではない、ほぼ素の nRF51822 である Braveridge 社の ボードを購入した。 ● 買ったときは mbed 版が無かったということもあるが、素の環境でやった方 が応用が利きやすいと思ったこともある。
  2. 2. 試したときの環境 nRF51822 ● IC revision : 2 ● HWID : 004D ● FLASH : 256KB ● RAM : 16KB ● SoftDevice : S110 v7.1.0 ● nRF51 SDK : v7.2.0 ● Compiler : GCC – gcc-arm-none-eabi-4_9-2014q4 ● Debugger : SEGGER J-Link LITE CortexM ● IDE : eclipse LUNA + CDT ● Monitor : TI SmartRF Packet Sniffer
  3. 3. nRF51822 のボード ● Braveridge 社の BVMCNDT52 ● J-Link とのセットで売られていたので、これを選んだ。 ● mbed のボードも売られているが、その場合はこの資料は役に立 たない ( と思う ) 。
  4. 4. デバッガを接続 ● SWD タイプ ● 書くのを忘れていたが、 nRF51822 は ARM Cortex-M0 が載って いる。 ● 赤で塗っているところに書いてある数字を入力しないと使えない
  5. 5. 開発環境の入手先 ● SoftDevice : S110 v7.1.0 ● http://www.nordicsemi.com/eng/nordic/Products/nRF51822/S110-SD-v7/30082 ● nRF51 SDK : v7.2.0 ● https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v7.x.x/ ● nRF51 Tools : v6.2.2 ● http://www.nordicsemi.com/eng/nordic/Products/nRF51822/nRF51-Tools/33444 ● Compiler : GCC – gcc-arm-none-eabi-4_9-2014q4 ● https://launchpad.net/gcc-arm-embedded ● Debugger : SEGGER J-Link LITE CortexM ● https://www.segger.com/jlink-software.html ● nRF51 Tools に入っているので、個別に入れなくてもよいかも。 ● IDE : eclipse LUNA for C/C++ Developers ● https://eclipse.org/downloads/ ● Keil : MDK-ARM Lite ● https://www.keil.com/demo/eval/arm.htm ● GCC+eclipse を書いておいてなんだが、 32KB 制限はあるもののこちらの方がはるかに楽。
  6. 6. SoftDevice ? ● nRF51822 アプリで BLE する場合は、 nRF51822 のレジスタを操作す るのでは無く、 SoftDevice に依頼する形を取る。 ● 例:アドバタイジングの開始 ● アプリ : sd_ble_gap_adv_start() を呼び出す ➢ SoftDevice への依頼に置き換えられる SVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start...) ● OS ではないが、 Linux でシステムコールしているような感じ ● 略称は SD 。主に以下だが、 S130 はメジャーバージョンになってない ● S110 : Peripheral/Broadcaster 専用 ● S120 : Central 専用 ● S130 : Central/Peripheral/Observer/Broadcaster
  7. 7. 注意すること ● バージョンの関係 ● SoftDevice のバージョンと、 SDK のバージョンは密接に関係している ● nRF51822 の revision と SoftDevice のバージョンも制限があるらしい ● 範囲外でも動かないことはないのかもしれないが、動かなくても文句が言えない。 ● “Compatibility Matrix”(ATTN-51) を見ないとわからない。 ● nRF51822 に焼いてある SoftDevice と SDK でビルドしたアプリ が不一致だと、アプリが動かない場合がある ● enum の値が変わっていたりとか。 ● 動かなくてもソースには間違いが無いので、かなり悩むことになる。 ● 購入した nRF51822 に焼かれている SoftDevice が何かわからない場合は、ま ず焼き直した方が無難。
  8. 8. サンプルアプリはどれにする? ● nRF51 SDK にはサンプルアプリも入っているので、それを使う。 ● ble_app_hrs がお手頃か。 ● ble_app_beacon がいわゆる iBeacon 形式なのだが、 確か今の iOS は iBeacon が MFi の承認を取らないと 通知しないようになったと思う。 ● 以前はアプリケーションノート nAN-29 に GCC+eclipse での説明があり、そこで ble_app_hrs を 動かすようになっていたのだ。 ● なので、 BLE の Advertising を確認できるツールを 持っているならば、どれでもよいと思う。
  9. 9. サンプルアプリを自分の環境に合わせる ● nRF51822 ボードに合わせて書き直す ● 例えば ble_app_hrs の場合、 pca10028 と pca10031 というフォルダがある ● その中に、 s110/armgcc/makefile がある ● 差分を取るとわかるが、違うのは定義名だけ ● それは examples/bsp フォルダのなかで吸収している ● 自分のボードに合わせて書き直すなり、設定を増やすなりしよう ● それでも吸収できないソースの変更 ● SOFTDEVICE_HANDLER_INIT() の引数 https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v7.x.x/doc/7.2.0/s110/html/a01070.ht ml#gaef6aabaa8887cb4d7265d7e21b3ec242 ● デフォルトでは外部に水晶発振子が接続されていることになっているため、接続されていな いボードでは「外部クロックの安定待ち」で待ったままになってしまう。 "_XTAL_" は外部発振子用、 "_RC_" は内部発振子用なので、書き換える。

×