# 呼叫行程電話
###### tags: `Speaker` `System`
## 關鍵字
- "打給", "撥打"
- 打給 (名字)
- 撥打 (10位數電話號碼)
- "Call", "Dial"
- call (name)
- dial (10 digit phone number)
- "查看行事歷", "新增行事歷", "新增提醒"
- 查看行事歷(X日)
- 新增行事歷(X日, Y時, Z活動內容)
- 新增提醒(X日, Y時, Z活動內容)
- "check calendar", "add calendar", "add notice"
- check calendar(X日)
- add calendar(X日, Y時, Z活動內容)
- add notice(X日, Y時, Z活動內容)
#### 回應:
- 撥通電話
- “查無此人”
- 播放行事歷內容
- “您沒有預訂行程”
## API
- Google calendar API
## 方法
- 音箱藍芽連接手機,撥打電話,再由智慧喇叭播放收音
- 音箱藍芽連接手機,透過 Google Calendar 查看行事歷上要求日期的內容與新增內容
## 實做
- 先用樹莓派虛擬機嘗試用Python(PyBluez)藍芽連接手機
- 使用 ofono 套件
### 可能問題
1. 不確定raspberry pi 4 on-board bluetooth 是否支援HFP(Hands-free profile)
2. iphone 的 spec 需要noise cancelation
## 參考資料
- python藍芽連接手機
https://shengyu7697.github.io/python-bluetooth-first-program/
- 藍芽連接手機
https://wiki.tizen.org/Connecting_to_a_Smartphone_with_Bluetooth_and_Making_Phone_Calls
<!-- research added by 鳳梨 -->
- [使用 HFP(hands-free-profile)在raspberry pi撥打電話的教學](https://scribles.net/hfp-on-raspberry-pi/)
- [一些 HFP raspberry implement github code ](https://github.com/littlecraft/phony)
- [Apple accessories design guidelines](https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf)
- [Bluetooth HFP v1.8 Specs](https://www.bluetooth.com/specifications/specs/hands-free-profile-1-8/)
<!-- end of research -->