Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
4GPiとslee-pi3でRaspberryPiを SMS起動する
Search
shikajiro
March 17, 2021
Programming
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
4GPiとslee-pi3でRaspberryPiを SMS起動する
shikajiro
March 17, 2021
More Decks by shikajiro
See All by shikajiro
大規模データをAIに活かすワークフローツールの紹介 / zozotech_gcp_02
shikajiro
0
3.8k
GCPでFacebookMessanger運用してみた
shikajiro
0
36
Other Decks in Programming
See All in Programming
ActionController meets Protocol Buffers
sorah
0
520
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
SREの越境 / SRE Collaboration
y0hgi
2
310
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
The Rails Doctrine Decade
koic
2
590
golang-bob.pdf
iwatsukayura
0
130
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
540
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
420
Event is what happens
moro
2
770
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Claude Code のすすめ
schroneko
67
230k
RailsConf 2023
tenderlove
30
1.6k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Transcript
4GPiとslee-pi3で RaspberryPiを SMS起動する 4GPiとslee-pi3の組み合わせ紹介 メカトラックス エバンジェリスト しかじろう
None
メカトラックスは電子回路・組込ソフト・センサー・機構な どハードウエア全般の開発と製造を行う会社です。 4G(LTE)通信モジュール「4GPi」をはじめとしたラズベ リーパイ向けの各種オリジナル製品の開発・販売やそれ らを活用したプロトタイピング、小ロット製造にも対応して います。
今日お伝えしたいこと RaspberryPiでSMSを 使うことで可能性がまた 一つ広がる
目次 - 4GPiとslee-Pi3の紹介 - ハードウェアの準備 - ソフトウェアの準備 - SORACOM Napterで開発環境構築
- SMSによる起動
4GPiの紹介 - RaspberryPi用の4G(LTE)通信モジュール - SORACOM認定デバイス - 電源を4GPiからRaspberryPiに供給するので安 定稼働できる - 4GPi専用ツール・OSも提供
- 自分で探したり準備しなくて良い - ドキュメントはGithubで公開 - 他の基板もスタックできる - 一部GPIO切り替え可能
4GPiは安定したインター ネット環境を RaspberryPiに提供す る
slee-Pi3の紹介 - 電源管理/死活監視モジュール - タイマー動作で低消費電力化 - RTC(Real Time Clock)搭載 -
指定日時に起動、指定間隔で起動/終了 - 待機時電流 約10uA - ハートビート・サービス監視 - ラズパイやサービスが無反応になったら強 制的に再起動 - 専用ツールをgithubで提供
slee-Pi3は安定した電 源・省エネ・動作環境を RaspberryPiに提供す る
4GPiとslee-Pi3でどこで もIoTがより実現できる
ハードウェアの準備 - SORACOM IOT SIM - ジャンパピンの設定 - 電源 -
SMS
SORACOM IoT SIM - SMS対応のSIM - SORACOM IoT SIM plan01s
電源の流れ 4GPi slee-Pi3 RaspberryPi
None
None
None
ソフトウェアの準備 - OS 4gpi-buster-lite-20200902 (Raspbian) - ジャンパピン設定 - slee-pi関連ライブラリ追加 -
SORACOM設定 - ファイアーウォール
# # 4GPi settings # # Power off 4GPi at
shutdown AUTO_OFF=0 # Enable the modem to wake up on ring during standby WAKE_ON_RING=1 # Store SMS at Wake-on-Ring (WAKE_ON_RING=1 is required) STORE_SMS_ON_RING=0 /etc/default/4gpi
$ sudo apt-get update $ sudo apt-get install sleepi3-firmware sleepi3-utils
sleepi3-monitor slee-pi ライブラリ
$ sudo nmcli con add type gsm ifname "*" con-name
soracom apn soracom.io user sora password sora SORACOMネットワーク
$ sudo ufw disable or $ sudo ufw insert 1
allow ssh ファイアーウォール
リモート開発環境の構築 - SORACOM Napter - 4G SSH開発環境
$ ssh -p 36792
[email protected]
SSHログイン
SMS起動 - ネットワーク範囲 - SORACOM コンソール - API呼び出し
“ IoT SIM は同じオペレーター配下の SIM 同士で SMS の送信ができます。他のオペ レーター配下の SIM
や SORACOM 以外 の SIM、plan-D などの特定地域向け IoT SIM とは SMS の送受信はできませ ん。 “ 注意
$ curl -X POST -H "Content-Type: application/json" -H "Accept: application/json"
-d "{\"email\": \"< ログインID>\",\"password\": \"< パスワード>\"}" "https://g.api.soracom.io/v1/auth" $ curl -X POST -H "content-type:application/json" -H "X-Soracom-API-Key: <apiKey>" -H "X-Soracom-Token: <token>" -d "{\"body\":\"<メッセージ>\"}" https://g.api.soracom.io/v1/subscribers/<imsi>/send_sms API呼び出しのSMS送信
SMS APIを使うことで バッチやwebサービスに RaspberryPiの起動を 組み込めれる
None
まとめ - 4GPiとslee-Pi3を使えば「どこでも」の幅が広が る - SMSを使えば今までにない動かし方ができる