NordicSemiconductor / Android-DFU-Library

Device Firmware Update library and Android app
http://www.nordicsemi.com/dfu
BSD 3-Clause "New" or "Revised" License
753 stars 263 forks source link

What are the Vendor commands used by DFU? #439

Closed gregnuvo closed 3 months ago

gregnuvo commented 3 months ago

Version

2.4.1 (Latest)

Ask the question

I am investigating the btsnoop_hci.log file generated by Android using wireshark. Works great.

I see a lot of Vendor commands such as: Sent Vendor Command 0x017D (opcode 0xFD7D) and Sent Vendor Command 0x01F1 (opcode 0xFDF1)

Questions: Do you have any documentation about what the opcodes and vendor commands mean? Specifically, 0x01F1 seems important, what does it do?

How do I understand what is happening in wireshark during a firmware update?

I have included some of the btsnoop_hci.log so you can see what I am looking at.

Relevant log output

"No.","Time","Source","Destination","Protocol","Length","Info"
"1","0.000000","controller","host","HCI_EVT","7","Rcvd Command Status (No Operation)"
"2","0.122964","host","controller","HCI_CMD","4","Sent Reset"
"3","0.314133","controller","host","HCI_EVT","7","Rcvd Command Complete (Reset)"
"4","0.314688","host","controller","HCI_CMD","4","Sent Read Buffer Size"
"5","0.315378","controller","host","HCI_EVT","14","Rcvd Command Complete (Read Buffer Size)"
"6","0.315750","host","controller","HCI_CMD","11","Sent Host Buffer Size"
"7","0.316277","controller","host","HCI_EVT","7","Rcvd Command Complete (Host Buffer Size)"
"8","0.316891","host","controller","HCI_CMD","4","Sent Read Local Version Information"
"9","0.317508","controller","host","HCI_EVT","15","Rcvd Command Complete (Read Local Version Information)"
"10","0.317827","host","controller","HCI_CMD","4","Sent Read BD ADDR"
"11","0.318471","controller","host","HCI_EVT","13","Rcvd Command Complete (Read BD ADDR)"
"12","0.318918","host","controller","HCI_CMD","4","Sent Read Local Supported Commands"
"13","0.319618","controller","host","HCI_EVT","71","Rcvd Command Complete (Read Local Supported Commands)"
"14","0.319964","host","controller","HCI_CMD","5","Sent Read Local Extended Features"
"15","0.320491","controller","host","HCI_EVT","17","Rcvd Command Complete (Read Local Extended Features)"
"16","0.320769","host","controller","HCI_CMD","5","Sent Write Simple Pairing Mode"
"17","0.321280","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Simple Pairing Mode)"
"18","0.321554","host","controller","HCI_CMD","6","Sent Write LE Host Supported"
"19","0.322044","controller","host","HCI_EVT","7","Rcvd Command Complete (Write LE Host Supported)"
"20","0.322308","host","controller","HCI_CMD","5","Sent Read Local Extended Features"
"21","0.322917","controller","host","HCI_EVT","17","Rcvd Command Complete (Read Local Extended Features)"
"22","0.323243","host","controller","HCI_CMD","5","Sent Read Local Extended Features"
"23","0.323820","controller","host","HCI_EVT","17","Rcvd Command Complete (Read Local Extended Features)"
"24","0.324119","host","controller","HCI_CMD","5","Sent Write Secure Connections Host Support"
"25","0.324749","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Secure Connections Host Support)"
"26","0.325073","host","controller","HCI_CMD","4","Sent LE Read Filter Accept List Size"
"27","0.325565","controller","host","HCI_EVT","8","Rcvd Command Complete (LE Read Filter Accept List Size)"
"28","0.325869","host","controller","HCI_CMD","4","Sent LE Read Buffer Size [v1]"
"29","0.326358","controller","host","HCI_EVT","10","Rcvd Command Complete (LE Read Buffer Size [v1])"
"30","0.326699","host","controller","HCI_CMD","4","Sent LE Read Supported States"
"31","0.327165","controller","host","HCI_EVT","15","Rcvd Command Complete (LE Read Supported States)"
"32","0.327494","host","controller","HCI_CMD","4","Sent LE Read Local Supported Features"
"33","0.328006","controller","host","HCI_EVT","15","Rcvd Command Complete (LE Read Local Supported Features)"
"34","0.328302","host","controller","HCI_CMD","4","Sent LE Read Resolving List Size"
"35","0.328805","controller","host","HCI_EVT","8","Rcvd Command Complete (LE Read Resolving List Size)"
"36","0.329237","host","controller","HCI_CMD","4","Sent LE Read Maximum Data Length"
"37","0.329763","controller","host","HCI_EVT","15","Rcvd Command Complete (LE Read Maximum Data Length)"
"38","0.330058","host","controller","HCI_CMD","4","Sent LE Read Suggested Default Data Length"
"39","0.330659","controller","host","HCI_EVT","11","Rcvd Command Complete (LE Read Suggested Default Data Length)"
"40","0.331232","host","controller","HCI_CMD","12","Sent LE Set Event Mask"
"41","0.331788","controller","host","HCI_EVT","7","Rcvd Command Complete (LE Set Event Mask)"
"42","0.332146","host","controller","HCI_CMD","12","Sent Set Event Mask"
"43","0.332654","controller","host","HCI_EVT","7","Rcvd Command Complete (Set Event Mask)"
"44","0.332971","host","controller","HCI_CMD","4","Sent Read Local Supported Codecs"
"45","0.333541","controller","host","HCI_EVT","13","Rcvd Command Complete (Read Local Supported Codecs)"
"46","0.334813","host","controller","HCI_CMD","4","Sent LE Clear Resolving List"
"47","0.335921","controller","host","HCI_EVT","7","Rcvd Command Complete (LE Clear Resolving List)"
"48","0.336085","host","controller","HCI_CMD","6","Sent LE Set Resolvable Private Address Timeout"
"49","0.337502","controller","host","HCI_EVT","7","Rcvd Command Complete (LE Set Resolvable Private Address Timeout)"
"50","0.337761","host","controller","HCI_CMD","5","Sent Write Inquiry Mode"
"51","0.338303","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Inquiry Mode)"
"52","0.338456","host","controller","HCI_CMD","5","Sent Write Page Scan Type"
"53","0.339156","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Page Scan Type)"
"54","0.339358","host","controller","HCI_CMD","5","Sent Write Inquiry Scan Type"
"55","0.339899","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Inquiry Scan Type)"
"56","0.340119","host","controller","HCI_CMD","7","Sent Write Class of Device"
"57","0.340864","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Class of Device)"
"58","0.341127","host","controller","HCI_CMD","6","Sent Write Page Timeout"
"59","0.341697","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Page Timeout)"
"60","0.341875","host","controller","HCI_CMD","6","Sent Write Default Link Policy Settings"
"61","0.342413","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Default Link Policy Settings)"
"62","0.342629","host","controller","HCI_CMD","4","Sent Vendor Command 0x0153 (opcode 0xFD53)"
"63","0.343236","controller","host","HCI_EVT","21","Rcvd Command Complete (Vendor Command 0x0153 [opcode 0xFD53])"
"64","0.343430","host","controller","HCI_CMD","4","Sent Vendor Command 0x017D (opcode 0xFD7D)"
"65","0.344051","controller","host","HCI_EVT","18","Rcvd Command Complete (Vendor Command 0x017D [opcode 0xFD7D])"
"66","0.344232","host","controller","HCI_CMD","4","Sent Read Local Name"
"67","0.344855","controller","host","HCI_EVT","255","Rcvd Command Complete (Read Local Name)"
"68","0.345241","host","controller","HCI_CMD","252","Sent Change Local Name"
"69","0.345864","controller","host","HCI_EVT","7","Rcvd Command Complete (Change Local Name)"
"70","0.346087","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"71","0.346839","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"72","0.347071","host","controller","HCI_CMD","4","Sent LE Rand"
"73","0.347595","controller","host","HCI_EVT","15","Rcvd Command Complete (LE Rand)"
"74","0.347907","host","controller","HCI_CMD","10","Sent LE Set Random Address"
"75","0.348447","controller","host","HCI_EVT","7","Rcvd Command Complete (LE Set Random Address)"
"76","0.401401","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"77","0.402279","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"78","0.553121","host","controller","HCI_CMD","6","Sent Write Voice Setting"
"79","0.553804","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Voice Setting)"
"80","0.554032","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"81","0.554959","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"82","0.555150","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"83","0.556039","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"84","0.614162","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"85","0.615044","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"86","0.615335","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"87","0.616157","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"88","0.616334","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"89","0.617477","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"90","0.666622","host","controller","HCI_CMD","5","Sent Write Scan Enable"
"91","0.667237","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Scan Enable)"
"92","0.667423","host","controller","HCI_CMD","5","Sent Write Scan Enable"
"93","0.667828","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Scan Enable)"
"94","0.668003","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"95","0.668713","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"96","0.668905","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"97","0.669696","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"98","0.669906","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"99","0.670655","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"100","0.670862","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"101","0.671568","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"102","0.673636","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"103","0.674403","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"104","0.919192","host","controller","HCI_CMD","8","Sent Write Inquiry Scan Activity"
"105","0.919938","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Inquiry Scan Activity)"
"106","0.920522","host","controller","HCI_CMD","5","Sent Write Scan Enable"
"107","0.921010","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Scan Enable)"
"108","0.921201","host","controller","HCI_CMD","5","Sent Write Scan Enable"
"109","0.922184","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Scan Enable)"
"110","0.930342","host","controller","HCI_CMD","4","Sent Vendor Command 0x017D (opcode 0xFD7D)"
"111","0.931098","controller","host","HCI_EVT","18","Rcvd Command Complete (Vendor Command 0x017D [opcode 0xFD7D])"
"112","0.936263","host","controller","HCI_CMD","7","Sent Vendor Command 0x01F1 (opcode 0xFDF1)"
"113","0.936843","controller","host","HCI_EVT","7","Rcvd Command Complete (Vendor Command 0x01F1 [opcode 0xFDF1])"
"114","0.937066","host","controller","HCI_CMD","7","Sent Vendor Command 0x01F1 (opcode 0xFDF1)"
"115","0.937570","controller","host","HCI_EVT","7","Rcvd Command Complete (Vendor Command 0x01F1 [opcode 0xFDF1])"
"116","0.937752","host","controller","HCI_CMD","6","Sent Vendor Command 0x01F1 (opcode 0xFDF1)"
"117","0.938218","controller","host","HCI_EVT","7","Rcvd Command Complete (Vendor Command 0x01F1 [opcode 0xFDF1])"
"118","0.939373","host","controller","HCI_CMD","6","Sent Vendor Command 0x01F1 (opcode 0xFDF1)"
"119","0.939934","controller","host","HCI_EVT","7","Rcvd Command Complete (Vendor Command 0x01F1 [opcode 0xFDF1])"
"120","0.954968","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"121","0.955794","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"122","1.573580","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"123","1.574692","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"124","1.583911","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"125","1.584909","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"126","1.590997","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"127","1.591872","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"128","1.621646","host","controller","HCI_CMD","245","Sent Write Extended Inquiry Response"
"129","1.622497","controller","host","HCI_EVT","7","Rcvd Command Complete (Write Extended Inquiry Response)"
"130","2.269776","host","controller","HCI_CMD","6","Sent Vendor Command 0x0157 (opcode 0xFD57)"
"131","2.270479","controller","host","HCI_EVT","9","Rcvd Command Complete (Vendor Command 0x0157 [opcode 0xFD57])"
"132","2.271563","host","controller","HCI_CMD","59","Sent Vendor Command 0x0157 (opcode 0xFD57)"
"133","2.272284","controller","host","HCI_EVT","10","Rcvd Command Complete (Vendor Command 0x0157 [opcode 0xFD57])"
"134","2.272556","host","controller","HCI_CMD","22","Sent Vendor Command 0x0157 (opcode 0xFD57)"
"135","2.273135","controller","host","HCI_EVT","10","Rcvd Command Complete (Vendor Command 0x0157 [opcode 0xFD57])"
"136","2.274608","host","controller","HCI_CMD","11","Sent LE Set Scan Parameters"
philips77 commented 3 months ago

Sorry, no idea. This is a 'vendor" command, so it may depend on the manufacturer of the chip in your phone and perhaps may differ from phone to phone. You may check what's the manufacturer of the chip in your device, usually for phones they combine Bluetooth, Wi-Fi, etc in one, and check the documentation, if it's available.