まずコードを投稿してから説明を書きます
記事を補足したらgitにアップロードします
コードアドレス
Git アドレス: https://gitee.com/jiangzhuqingfeng/bluetooth.git