Linuxת°üÃüÁî
Linuxת°üÃüÁî
LinuxµÄ×¥°üÃüÁîtcpdump -i eth0 -Xs 10000 -vv port 22808 -I ±íʾ¼à²âµÄÉ豸ºÅ£¬-vv±íʾÏÔʾÏêϸÐÅÏ¢£¬ -s ±íʾÉèÖöÏÐУ¬ -c ±íʾ×î¶à½ØÈ¡°üÊý¡£-w±íʾ´æµ½ÎļþÖС£Èç×¥°ütcpdump tcp port 22808 –X –vv –c 100 –s 1500 –w tcp.log
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
¹ØÓÚWindowsÆô¶¯¹ý³Ì½éÉܵÄÎÄÕ¿Éν¶àÈçţ룬¶ø¶ÔÓÚLinuxµÄ½éÉÜÈ´ÊÇ·ïë÷ë½Ç¡£·²ÊÇÔø¾Ê¹ÓùýLinuxµÄÓû§¿ÉÄܶ¼»á×¢Òâµ½£¬µ±¼ÆËã»úÆô¶¯Ê±£¬ÆÁÄ»ÉÏ»á³öÏֺܶàÐÅÏ¢¡£Ò»°ãÇé¿öÏ£¬ÕâЩÐÅÏ¢ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔϵÄÃüÁî¿´µ½£º
¡¡¡¡
¡¡¡¡cat /var/log/dmesg | more
¡¡¡¡
¡¡¡¡
¡¡¡¡
¡¡¡¡ÕâЩÐÅÏ¢¾¿¾¹ÓÐʲôº¬Ò壿Õâ¸öÎÊÌâ¿´Æð ......