CC2640蓝牙建立连接困难
TI的工程师,本人使用CC2640不久,请帮忙解答一下。
我缩减了OAD targetImageA的空间留给ImageB(超过了40KB)来使用,ImageB空间变成从0x7000至0x13000,保持BLE stack空间不变,这样ImageB可以编译通过且可以烧录至Flash运行。但是我还是遇到一个问题,请帮忙分析一下,在用DeviceMonitor通过CC2650DK扫描到CC2640后连接很困难。下面是使用CC2650DK通过DeviceMonitor抓下的log,请帮助分析下是什么原因导致的建立连接困难?谢谢。
(1)大多数情况是连接直接中断,GAP Link Terminated: status=0 h=0 reason=0x3e
21:34:06.580 > AR502CG logger disconnected
21:34:07.108 > Connect request
21:34:07.219 > GAP Link Established: h=0 CI=0x0819 SL=0 TO=0x00b8
21:34:07.219 > AR502CG logger connected
21:34:07.228 > Service discovery started
21:34:07.395 > ReadByGrpTypeRsp: st=20 n=0
21:34:07.396 > GAP Link Terminated: status=0 h=0 reason=0x3e
21:34:07.396 > Failed to establish
21:34:07.396 > AR502CG logger disconnected
(2)连接消耗时间很长,发现服务以及发现特征值好像很困难
21:34:09.810 > Connect request
21:34:09.923 > GAP Link Established: h=0 CI=0x0819 SL=0 TO=0x00b8
21:34:09.923 > AR502CG logger connected
21:34:09.939 > Service discovery started
21:34:13.042 > ReadByGrpTypeRsp: st=0 n=7
21:34:19.138 > ReadByGrpTypeRsp: st=0 n=21
21:34:19.138 > ReadByGrpTypeRsp: st=26 n=0
21:34:19.138 > Primary Service Discovery done [9.201 sec]
21:34:19.144 > Characteristic description discovery started
21:34:24.049 > FindInfoRsp: st=0 n=17 fmt=1
21:34:26.049 > FindInfoRsp: st=0 n=19 fmt=2
21:34:27.057 > FindInfoRsp: st=0 n=19 fmt=2
21:34:29.056 > FindInfoRsp: st=0 n=19 fmt=2
21:34:31.056 > FindInfoRsp: st=0 n=19 fmt=2
21:34:34.048 > FindInfoRsp: st=0 n=19 fmt=2
21:34:36.048 > FindInfoRsp: st=0 n=19 fmt=2
21:34:38.047 > FindInfoRsp: st=0 n=19 fmt=2
21:34:40.047 > FindInfoRsp: st=0 n=19 fmt=2
21:34:42.047 > FindInfoRsp: st=0 n=19 fmt=2
21:34:44.047 > FindInfoRsp: st=0 n=19 fmt=2
21:34:45.199 > FindInfoRsp: st=0 n=19 fmt=2
21:34:47.054 > FindInfoRsp: st=0 n=19 fmt=2
21:34:49.054 > FindInfoRsp: st=0 n=19 fmt=2
21:34:51.054 > FindInfoRsp: st=0 n=9 fmt=1
21:34:53.053 > FindInfoRsp: st=0 n=19 fmt=2
21:34:54.573 > FindInfoRsp: st=0 n=5 fmt=1
21:34:55.677 > FindInfoRsp: st=26 n=0 fmt=1
21:34:55.677 > Characteristic Description Discovery done [36.533] sec
21:34:55.685 > Characteristic discovery started
21:34:57.053 > ReadyByTypeResp: st=0 n=8
21:34:58.045 > ReadyByTypeResp: st=0 n=22
21:35:00.045 > ReadyByTypeResp: st=26 n=0
21:35:00.045 > Characteristic Discovery done [4.360] sec
(3)连接上了但是很快就断开GAP Link Terminated: status=0 h=0 reason=0x28
09:41:52.910 > Connect request
09:41:52.959 > GAP Link Established: h=0 CI=0x0819 SL=0 TO=0x00e8
09:41:52.959 > AR502CG logger connected
09:41:52.969 > Service discovery started
09:41:53.039 > ReadByGrpTypeRsp: st=0 n=21
09:41:53.039 > ReadByGrpTypeRsp: st=26 n=0
09:41:53.039 > Primary Service Discovery done [0.71 sec]
09:41:53.045 > Characteristic description discovery started
09:41:53.103 > FindInfoRsp: st=0 n=9 fmt=1
09:41:53.167 > FindInfoRsp: st=0 n=19 fmt=2
09:41:53.231 > FindInfoRsp: st=0 n=5 fmt=1
09:41:53.295 > FindInfoRsp: st=26 n=0 fmt=1
09:41:53.295 > Characteristic Description Discovery done [0.250] sec
09:41:53.303 > Characteristic discovery started
09:41:53.359 > ReadyByTypeResp: st=0 n=22
09:41:53.423 > ReadyByTypeResp: st=26 n=0
09:41:53.423 > Characteristic Discovery done [0.120] sec
09:42:02.015 > GAP Link Terminated: status=0 h=0 reason=0x28
09:42:02.015 > AR502CG logger disconnected
国内的TI FAE都很忙,还是我的问题没有说清楚,都没有人回答吗?
Mi,
请问,
硬件都是TI的开发板?还是你自己的板子?
默认TI的例程在同样的环境下就没问题了?
蓝牙的协议库函数比较大,通常cc2640的oad都用外部的flash,估计你删减了许多功能,因此工作不正常吧。