Android GATT Discover过程抓包

17 篇文章 4 订阅

Tool: Frontline BPA600
Slave: Voice Remote Control
Master: HuaWei P20

Sniffer packets:

Frame#  Role    Opcode                       Handle    UUID                                 Database      Error code       Frame size    Delta              TimeStamp
18,516	Master	Read by Group Type Request	   1	   Primary Service	                    af9aba6f(S)		                  33		                    2020/4/1 9:29:53.567168
18,542	Slave	Read by Group Type Response	   10	   Battery	                            af9aba6f(S)		                  46	     00:00:00.022731	2020/4/1 9:29:53.589899
18,543	Master	Read by Group Type Request	   14	   Primary Service	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.597168
18,548	Slave	Read by Group Type Response	   21	   Human Interface Device	            af9aba6f(S)		                  40	     00:00:00.015231	2020/4/1 9:29:53.612399
18,557	Master	Read by Group Type Request	   57	   Primary Service	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.619668
18,575	Slave	Read by Group Type Response	   57	   Unknown UUID [0xfef6]	            af9aba6f(S)		                  48	     00:00:00.022731	2020/4/1 9:29:53.642399
18,576	Master	Read by Group Type Request	   70	   Primary Service	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:53.649669
18,596	Slave	Error Response	               70	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.657400
18,598	Master	Read By Type Request	       1	   Include	                            af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.664669
18,601	Slave	Error Response	               1	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.672400
18,614	Master	Read By Type Request	       1	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.679669
18,634	Slave	Read By Type Response	       5	   Appearance	                        af9aba6f(S)		                  42	     00:00:00.015231	2020/4/1 9:29:53.694900
18,637	Master	Read By Type Request	       5	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.702169
18,640	Slave	Error Response	               5	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.709900
18,641	Master	Read By Type Request	       6	   Include	                            af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:53.717170
18,655	Slave	Error Response	               6	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007730	2020/4/1 9:29:53.724900
18,657	Master	Read By Type Request	       6	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:53.732170
18,672	Slave	Read By Type Response	       8	   Service Changed	                    af9aba6f(S)		                  35	     00:00:00.015231	2020/4/1 9:29:53.747401
18,673	Master	Read By Type Request	       8	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.754670
18,679	Slave	Error Response	               8	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.762401
18,680	Master	Find Information Request	   9	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:53.769670
18,691	Slave	Find Information Response	   9	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007731	2020/4/1 9:29:53.777401
18,700	Master	Read By Type Request	       10	   Include	                            af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.784670
18,716	Slave	Error Response	               10	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.792401
18,720	Master	Read By Type Request	       10	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:53.799671
18,732	Slave	Read By Type Response	       12	   Battery Level	                    af9aba6f(S)		                  35	     00:00:00.015230	2020/4/1 9:29:53.814901
18,735	Master	Read By Type Request	       12	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:53.822171
18,743	Slave	Error Response	               12	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007730	2020/4/1 9:29:53.829901
18,752	Master	Find Information Request	   13	   	                                    af9aba6f(S)		                  31	     00:00:00.007270	2020/4/1 9:29:53.837171
18,756	Slave	Find Information Response	   13	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007731	2020/4/1 9:29:53.844902
18,761	Master	Read By Type Request	       14	   Include	                            af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.852171
18,764	Slave	Error Response	               14	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.859902
18,770	Master	Read By Type Request	       14	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.867171
18,777	Slave	Read By Type Response	       18	   Manufacturer Name                    af9aba6f(S)		                  42	     00:00:00.015231	2020/4/1 9:29:53.882402
18,805	Slave	Read By Type Response	       20	   PNP ID	                            af9aba6f(S)		                  35	     00:00:00.022500	2020/4/1 9:29:53.904902
18,806	Master	Read By Type Request	       20	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:53.912172
18,809	Slave	Error Response	               20	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.919903
18,811	Master	Read By Type Request	       21	   Include	                            af9aba6f(S)		                  33	     00:00:00.007268	2020/4/1 9:29:53.927171
18,819	Slave	Error Response	               21	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:53.934902
18,826	Master	Read By Type Request	       21	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007268	2020/4/1 9:29:53.942170
18,842	Slave	Read By Type Response	       25	   Report Map	                        af9aba6f(S)		                  42	     00:00:00.015230	2020/4/1 9:29:53.957400
18,844	Master	Read By Type Request	       25	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.964669
18,852	Slave	Read By Type Response	       30	   Boot Keyboard Input Report	        af9aba6f(S)		                  42	     00:00:00.015229	2020/4/1 9:29:53.979898
18,854	Master	Read By Type Request	       30	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:53.987167
18,871	Slave	Read By Type Response	       35	   Boot Mouse Input Report	            af9aba6f(S)		                  42	     00:00:00.015230	2020/4/1 9:29:54.002397
18,877	Master	Read By Type Request	       35	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:54.009666
18,888	Slave	Read By Type Response	       42	   HID Report	                        af9aba6f(S)		                  42	     00:00:00.015231	2020/4/1 9:29:54.024897
18,889	Master	Read By Type Request	       42	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:54.032166
18,899	Slave	Read By Type Response	       50	   HID Report	                        af9aba6f(S)		                  42	     00:00:00.015231	2020/4/1 9:29:54.047397
18,905	Master	Read By Type Request	       50	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:54.054667
18,920	Slave	Read By Type Response	       56	   Protocol Mode	                    af9aba6f(S)		                  42	     00:00:00.015231	2020/4/1 9:29:54.069898
18,921	Master	Read By Type Request	       56	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:54.077167
18,928	Slave	Error Response	               56	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007731	2020/4/1 9:29:54.084898
18,929	Master	Find Information Request	   26	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:54.092167
18,937	Slave	Find Information Response	   26	   External Report Reference	        af9aba6f(S)		                  32	     00:00:00.007730	2020/4/1 9:29:54.099897
18,945	Master	Find Information Request	   31	   	                                    af9aba6f(S)		                  31	     00:00:00.007270	2020/4/1 9:29:54.107167
18,952	Slave	Find Information Response	   31	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007729	2020/4/1 9:29:54.114896
18,960	Master	Find Information Request	   36	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:54.122165
18,963	Slave	Find Information Response	   36	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007731	2020/4/1 9:29:54.129896
18,964	Master	Find Information Request	   39	   	                                    af9aba6f(S)		                  31	     00:00:00.007268	2020/4/1 9:29:54.137164
18,967	Slave	Find Information Response	   40	   Report Reference	                    af9aba6f(S)		                  36	     00:00:00.007730	2020/4/1 9:29:54.144894
18,972	Master	Find Information Request	   43	   	                                    af9aba6f(S)		                  31	     00:00:00.007268	2020/4/1 9:29:54.152162
18,978	Slave	Find Information Response	   44	   Report Reference	                    af9aba6f(S)		                  36	     00:00:00.007730	2020/4/1 9:29:54.159892
18,983	Master	Find Information Request	   47	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:54.167161
18,990	Slave	Find Information Response	   48	   Report Reference	                    af9aba6f(S)		                  36	     00:00:00.007730	2020/4/1 9:29:54.174891
18,991	Master	Find Information Request	   51	   	                                    af9aba6f(S)		                  31	     00:00:00.007268	2020/4/1 9:29:54.182159
18,996	Slave	Find Information Response	   51	   Report Reference	                    af9aba6f(S)		                  32	     00:00:00.007730	2020/4/1 9:29:54.189889
19,000	Master	Find Information Request	   54	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:54.197158
19,010	Slave	Find Information Response	   54	   Report Reference	                    af9aba6f(S)		                  32	     00:00:00.007730	2020/4/1 9:29:54.204888
19,019	Master	Read By Type Request	       57	   Include	                            af9aba6f(S)		                  33	     00:00:00.007268	2020/4/1 9:29:54.212156
19,026	Slave	Error Response	               57	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007732	2020/4/1 9:29:54.219888
19,033	Master	Read By Type Request	       57	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007268	2020/4/1 9:29:54.227156
19,047	Slave	Read By Type Response	       59	   Unknown UUID [0x0002]	            af9aba6f(S)		                  49	     00:00:00.022728	2020/4/1 9:29:54.249884
19,051	Master	Read By Type Request	       59	   Characteristic                  	    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:54.257154
19,069	Slave	Read By Type Response	       62	   Unknown UUID [0x0003]	            af9aba6f(S)		                  49	     00:00:00.022728	2020/4/1 9:29:54.279882
19,078	Master	Read By Type Request	       62	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007270	2020/4/1 9:29:54.287152
19,122	Slave	Read By Type Response	       65	   Unknown UUID [0x0004]	            af9aba6f(S)		                  49	     00:00:00.022728	2020/4/1 9:29:54.309880
19,137	Master	Read By Type Request	       65	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007269	2020/4/1 9:29:54.317149
19,182	Slave	Read By Type Response	       68	   Unknown UUID [0x0005]	            af9aba6f(S)		                  49	     00:00:00.022730	2020/4/1 9:29:54.339879
19,193	Master	Read By Type Request	       68	   Characteristic	                    af9aba6f(S)		                  33	     00:00:00.007268	2020/4/1 9:29:54.347147
19,208	Slave	Error Response	               68	   	                                    af9aba6f(S)	Attribute Not Found	  31	     00:00:00.007730	2020/4/1 9:29:54.354877
19,219	Master	Find Information Request	   60	   	                                    af9aba6f(S)		                  31	     00:00:00.007270	2020/4/1 9:29:54.362147
19,233	Slave	Find Information Response	   60	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007729	2020/4/1 9:29:54.369876
19,242	Master	Find Information Request	   63	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:54.377145
19,257	Slave	Find Information Response	   63	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007730	2020/4/1 9:29:54.384875
19,270	Master	Find Information Request	   66	   	                                    af9aba6f(S)		                  31	     00:00:00.007268	2020/4/1 9:29:54.392143
19,282	Slave	Find Information Response	   66	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007730	2020/4/1 9:29:54.399873
19,291	Master	Find Information Request	   69	   	                                    af9aba6f(S)		                  31	     00:00:00.007269	2020/4/1 9:29:54.407142
19,313	Slave	Find Information Response	   69	   Client Characteristic Configuration	af9aba6f(S)		                  32	     00:00:00.007730	2020/4/1 9:29:54.414872
19,407	Master	Read By Type Request	       1	   PNP ID	                            af9aba6f(S)		                  33	     00:00:00.059764	2020/4/1 9:29:54.474636
19,449	Slave	Read By Type Response	       20	   PNP ID	                            af9aba6f(S)		                  37	     00:00:00.026480	2020/4/1 9:29:54.501116
19,624	Master	Read Request	               23	   HID Information	                    af9aba6f(S)		                  29	     00:00:00.097269	2020/4/1 9:29:54.598385
19,706	Slave	Read Response	               23	   HID Information	                    af9aba6f(S)		                  31	     00:00:00.048980	2020/4/1 9:29:54.647365
19,773	Master	Read Request	               25	   Report Map	                        af9aba6f(S)		                  29	     00:00:00.048519	2020/4/1 9:29:54.695884
19,858	Slave	Read Response	               25	   Report Map	                        af9aba6f(S)		                  49	     00:00:00.048981	2020/4/1 9:29:54.744865
19,935	Master	Read Blob Request	           25	   	                                    af9aba6f(S)		                  31	     00:00:00.048520	2020/4/1 9:29:54.793385
20,027	Slave	Read Blob Response	           25	   	                                    af9aba6f(S)		                  49	     00:00:00.060232	2020/4/1 9:29:54.853617
20,043	Master	Read Blob Request	           25	   	                                    af9aba6f(S)		                  31	     00:00:00.012271	2020/4/1 9:29:54.865888
20,956	Slave	Read Blob Response	           25	   	                                    af9aba6f(S)		                  49	     00:00:00.575223	2020/4/1 9:29:55.441111
20,977	Master	Read Blob Request	           25	   	                                    af9aba6f(S)		                  31	     00:00:00.012269	2020/4/1 9:29:55.453380
21,023	Slave	Read Blob Response	           25	   	                                    af9aba6f(S)		                  39	     00:00:00.025231	2020/4/1 9:29:55.478611
21,038	Master	Read Request	               26	   External Report Reference	        af9aba6f(S)		                  29	     00:00:00.012269	2020/4/1 9:29:55.490880
21,075	Slave	Read Response	               26	   Battery Level	                    af9aba6f(S)		                  29	     00:00:00.025231	2020/4/1 9:29:55.516111
21,102	Master	Read Request	               40	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.012270	2020/4/1 9:29:55.528381
21,143	Slave	Read Response	               40	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.025230	2020/4/1 9:29:55.553611
21,153	Master	Read Request	               44	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.012270	2020/4/1 9:29:55.565881
21,181	Slave	Read Response	               44	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.025231	2020/4/1 9:29:55.591112
21,182	Master	Read Request	               48	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.012270	2020/4/1 9:29:55.603382
21,196	Slave	Read Response	               48	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.025231	2020/4/1 9:29:55.628613
21,203	Master	Read Request	               51	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.012269	2020/4/1 9:29:55.640882
21,219	Slave	Read Response	               51	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.025231	2020/4/1 9:29:55.666113
21,231	Master	Read Request	               54	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.012270	2020/4/1 9:29:55.678383
21,246	Slave	Read Response	               54	   Report Reference	                    af9aba6f(S)		                  29	     00:00:00.025231	2020/4/1 9:29:55.703614
21,252	Master	Write Request	               31	   Client Characteristic Configuration	af9aba6f(S)		                  31	     00:00:00.012269	2020/4/1 9:29:55.715883
21,275	Slave	Write Response			                                                    af9aba6f(S)		                  27	     00:00:00.025231	2020/4/1 9:29:55.741114
21,282	Master	Write Request	               36	   Client Characteristic Configuration	af9aba6f(S)		                  31	     00:00:00.012270	2020/4/1 9:29:55.753384
21,304	Slave	Write Response	               	                                   	        af9aba6f(S)		                  27	     00:00:00.025231	2020/4/1 9:29:55.778615
21,308	Master	Write Request	               39	   Client Characteristic Configuration	af9aba6f(S)		                  31	     00:00:00.012269	2020/4/1 9:29:55.790884
21,322	Slave	Write Response	               		                                        af9aba6f(S)		                  27	     00:00:00.025231	2020/4/1 9:29:55.816115
21,332	Master	Write Request	               43	   Client Characteristic Configuration	af9aba6f(S)		                  31	     00:00:00.012268	2020/4/1 9:29:55.828383
21,349	Slave	Write Response	               		                                        af9aba6f(S)		                  27	     00:00:00.025230	2020/4/1 9:29:55.853613
21,354	Master	Write Request	               47	   Client Characteristic Configuration	af9aba6f(S)		                  31	     00:00:00.012269	2020/4/1 9:29:55.865882
21,369	Slave	Write Response			                                                    af9aba6f(S)		                  27	     00:00:00.025230	2020/4/1 9:29:55.891112
26,070	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:05.262428	2020/4/1 9:30:01.153540
26,377	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.199996	2020/4/1 9:30:01.353536
26,820	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.462495	2020/4/1 9:30:01.816031
26,904	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.199995	2020/4/1 9:30:02.016026
27,583	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.674988	2020/4/1 9:30:02.691014
27,866	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.199996	2020/4/1 9:30:02.891010
28,551	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.462495	2020/4/1 9:30:03.353505
28,835	Slave	Handle Value Notification	   38	   HID Report	                        af9aba6f(S)		                  32	     00:00:00.199999	2020/4/1 9:30:03.553504

Slave Services:

Generic Access Profile:
    UUID: 0x1800
    start handle: 1
    endle handle: 5

Generic Attribute Profile:
    UUID: 0x1801
    start handle: 6
    endle handle: 9

Battery:
    UUID: 0x180F
    start handle: 10
    endle handle: 13
    
Device Information
    UUID: 0x180A
    start handle: 14
    endle handle: 20

Human Interface Device:
    UUID: 0x1812
    start handle: 21
    endle handle: 56
    
Vendor Service: 
    UUID: 0x0000fef600001000800000805f9b34fb:
    start handle: 57
    endle handle: 69

过程解析:
1. 发现所有主服务{Discover Primary Service: GAP, GATT, BAS, DIS, HIDS, Vendor}
2. 发现第一个主服务的包含服务{Discover GAP Include Service}
3. 发现第一个主服务的所有特性{Discover GAP Characteristic}
4. 发现第二个主服务的包含服务{Discover GATT Include Service}
5. 发现第二个主服务的所有特性{Discover GATT Characteristic}
6. 发现第三个主服务的包含服务{Discover BAS Include Service}
7. 发现第三个主服务的所有特性{Discover BAS Characteristic}
8. 发现第四个主服务的包含服务{Discover DIS Include Service}
9. 发现第四个主服务的所有特性{Discover DIS Characteristic}
10. 发现第五个主服务的包含服务{Discover HIDS Include Service}
11. 发现第五个主服务的所有特性{Discover HIDS Characteristic}
12. 发现第六个主服务的包含服务{Discover Vendor Service Include Service}
13. 发现第六个主服务的所有特性{Discover Vendor Service Characteristic}
14. 连接HID {Connect HID, 先读PNPID, 再读HIDS, 最后打开notify}

附: Sniffer Packets File
BLE语音遥控器抓包:https://download.csdn.net/download/u012408797/13722728

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值