Slide 1

Slide 1 text

TEPRA Lite BLE 54 #wakate 2021 @puhitaku

Slide 2

Slide 2 text

Takumi Sueda @puhitaku NICT ( ) HOMMA 
 2014 2018 2020 
 Linux 


Slide 3

Slide 3 text

TEPRA 3

Slide 4

Slide 4 text

https://twitter.com/ejo 090 /status/ 425 52 334 04 306 96 448 4

Slide 5

Slide 5 text

https://twitter.com/okayan 08 /status/ 7 972 55 664 46 460 10 89 5

Slide 6

Slide 6 text

https://twitter.com/okayan 08 /status/ 5 658 60 495 74 418 43 22 6

Slide 7

Slide 7 text

1000 https://www.kingjim.co.jp/products/tepra/ 7

Slide 8

Slide 8 text

8

Slide 9

Slide 9 text

: 9

Slide 10

Slide 10 text

https://www.kingjim.co.jp/products/tepra/sr 37 0 .html 10

Slide 11

Slide 11 text

100 https://www.kingjim.co.jp/products/tepra/sr 37 0 .html 11

Slide 12

Slide 12 text


 
 12

Slide 13

Slide 13 text

https://www.kingjim.co.jp/products/brand/tepra-pro.html 13

Slide 14

Slide 14 text

OS 15,000 https://www.kingjim.co.jp/products/brand/tepra-pro.html 14

Slide 15

Slide 15 text

1 15

Slide 16

Slide 16 text

1 16

Slide 17

Slide 17 text

TEPRA Lite LR 30 
 TEPRA Lite LR 30 17

Slide 18

Slide 18 text

TEPRA Lite LR 30 https://www.kingjim.co.jp/sp/lr 3 0 / 18

Slide 19

Slide 19 text

TEPRA Lite LR 30 https://www.kingjim.co.jp/sp/lr 3 0 / 19

Slide 20

Slide 20 text

TEPRA Lite LR 30 https://www.kingjim.co.jp/sp/lr 3 0 / 20

Slide 21

Slide 21 text

TEPRA Lite LR 30 21

Slide 22

Slide 22 text

TEPRA Lite LR 30 22

Slide 23

Slide 23 text

TEPRA Lite LR 30 https://www.kingjim.co.jp/products/tepra/sr 37 0 .html 23

Slide 24

Slide 24 text

TEPRA Lite LR 30 
 24

Slide 25

Slide 25 text

TEPRA Lite LR 30 25

Slide 26

Slide 26 text

TEPRA Lite LR 30 26

Slide 27

Slide 27 text

TEPRA Lite BLE 54 #wakate 2021 @puhitaku

Slide 28

Slide 28 text

Bluetooth Low Energy (BLE) https://www.kingjim.co.jp/sp/lr 3 0 /feature/index.html 28

Slide 29

Slide 29 text

1 . Android APK 2 . BLE sni ff er 2 BLE 29 Bluefruit LE Sni ff er https://www.switch-science.com/catalog/ 3 34 7 /

Slide 30

Slide 30 text

PC Bluetooth 2 Bluetooth Bluez Linux BT Python OS 😇 BLE PC 30

Slide 31

Slide 31 text

PC Bluetooth API 
 MicroPython Wi-Fi BLE 🥰 BLE 31 ESPr® Developer 32 https://www.switch-science.com/catalog/ 3 21 0 /

Slide 32

Slide 32 text

1 . 2 . BLE Service Characteristic 
 3 . 4 . 5 . 2 4 6 . API 7 . 32 
 CC BY 2 . 0 https://www. fl ickr.com/photos/inucara/ 4 809 4 81634

Slide 33

Slide 33 text

1. 33

Slide 34

Slide 34 text

1. 34

Slide 35

Slide 35 text

1. Nordic 
 Wireshark sni ff er Python 2 Apple Silicon Mac pyenv Python 2 . 7 . 18 pyenv PR macOS + Apple Silicon + pyenv Python 3 Bluefruit LE Sni ff er Python 2 Bluefruit LE Sni ff er macOS (Apple Silicon) 35

Slide 36

Slide 36 text

2 . BLE Service 
 Characteristic 36

Slide 37

Slide 37 text

2 . GATT Service Characteristic ATT (ATTribute Protocol) 
 512 Attribute Handle 2 GATT (Generic ATTribute Protocol) 
 Attribute Service Characteristic ATT Service 
 Characteristic 
 Service 
 37 ATT GATT Service Service Declaration Declaration Characteristic Characteristic Declaration Value Descriptor Declaration Value Descriptor Characteristic Characteristic

Slide 38

Slide 38 text

2 . GATT Service Characteristic MicroPython Python (REPL) Bluetooth API bluetooth import BLE IRQ API gattc_discover_services Service discovery prop_write_without_response Characteristic MicroPython BLE 38

Slide 39

Slide 39 text

2 . GATT Service Characteristic 0x180f Battery Service … 0x2a19 Battery Level Characteristic 0xfff0 TEPRA Lite Service 0xfff1 TEPRA Lite Char. … Notify (RX) 0xfff2 TEPRA Lite Char. … Write Without Response (TX) Service Characteristic 39 Service Characteristic

Slide 40

Slide 40 text

2 . GATT Service Characteristic 0x180f Battery Service … 0x2a19 Battery Level Characteristic 0xfff0 TEPRA Lite Service 0xfff1 TEPRA Lite Char. … Notify (RX) 0xfff2 TEPRA Lite Char. … Write Without Response (TX) Service Characteristic 40 Characteristic

Slide 41

Slide 41 text

3. 
 41

Slide 42

Slide 42 text

3. 42

Slide 43

Slide 43 text

3. 43

Slide 44

Slide 44 text

3. 44 0 5

Slide 45

Slide 45 text

3. 45 f0 5c = 2 00 03 00 00 00 00 00 00 = 1 00 03 00 00 00 00 00 00 = 2

Slide 46

Slide 46 text

3. 46 00 03 00 00 00 00 00 00 2 Bytes (word) After 00 00 00 00 00 00 00 03 Before After

Slide 47

Slide 47 text

4. 47

Slide 48

Slide 48 text

4. 
 48

Slide 49

Slide 49 text

4. 1 49

Slide 50

Slide 50 text

6. 
 API 50

Slide 51

Slide 51 text

6. API 51 0 5 REST API zlib /prints POST

Slide 52

Slide 52 text

6. API 52 0 5 CLI Pillow QR

Slide 53

Slide 53 text

7. 53

Slide 54

Slide 54 text

7. https://github.com/puhitaku/tepra-lite-esp32 54 GitHub

Slide 55

Slide 55 text

55

Slide 56

Slide 56 text


 API CLI 56

Slide 57

Slide 57 text

Bluetooth 
 57 Sni ff er API Bluetooth MicroPython

Slide 58

Slide 58 text


 
 58

Slide 59

Slide 59 text

No content