Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Êý¾Ý°ü¡£
¡¡¡¡L2CAP »ùÓÚ Í¨µÀ(channel) µÄ¸ÅÄî¡£ ͨµÀ (Channel) ÊÇλÓÚ»ù´ø (baseband) Á¬½ÓÖ®ÉϵÄÂß¼­Á¬½Ó¡£Ã¿¸öͨµÀÒÔ¶à¶ÔÒ»µÄ·½Ê½°ó¶¨Ò»¸öµ¥Ò»Ð­Òé (single protocol)¡£¶à¸öͨµÀ¿ÉÒÔ°ó¶¨Í¬Ò»¸öЭÒ飬µ«Ò»¸öͨµÀ²»¿ÉÒ԰󶨶à¸öЭÒé¡£ ÿ¸öÔÚͨµÀÀï½ÓÊÕµ½µÄ L2CAP Êý¾Ý°ü±»´«µ½ÏàÓ¦µÄÉϲãЭÒé¡£ ¶à¸öͨµÀ¿É¹²Ïíͬһ¸ö»ù´øÁ¬½Ó¡£
L2CAP´¦ÓÚBluetoothЭÒéÕ»µÄλÖÃÈçÏ£º
Ò²¾ÍÊÇ˵£¬ËùÓÐL2CAPÊý¾Ý¾ùͨ¹ýHCI´«Êäµ½Remote Device¡£ÇÒÉϲãЭÒéµÄÊý¾Ý£¬´ó¶¼Ò²Í¨¹ýL2CAPÀ´´«ËÍ¡£
L2CAP¿ÉÒÔ·¢ËÍCommand¡£ÀýÈçÁ¬½Ó£¬¶ÏÁ¬µÈµÈ¡£
ÏÂÃæ¿´CommandÀý×Ó£ºConnection Request:
ÆäÖÐPSM±È½ÏÐèҪעÒ⣬L2CAP ʹÓÃL2CAPÁ¬½ÓÇëÇó£¨Connection Request £©ÃüÁîÖеÄPSM×Ö¶ÎʵÏÖЭÒ鸴Óá£L2CAP¿ÉÒÔ¸´Ó÷¢¸øÉϲãЭÒéµÄÁ¬½ÓÇëÇó£¬ÕâЩÉϲãЭÒé°üÀ¨·þÎñ·¢ÏÖЭÒéSDP£¨PSM = 0x0001£©¡¢RFCOMM£¨PSM = 0x0003£©ºÍµç»°¿ØÖÆ£¨PSM = 0x0005£©µÈ¡£
ProtocolPSMReference
SDP
0x0001
See Bluetooth Service Discovery Protocol (SDP), Bluetooth SIG.
RFCOMM
0x0003
See RFCOMM with TS 07.10, Bluetooth SIG.
TCS-BIN
0x0005
See Bluetooth Telephony Control Specification / TCS Binary, Bluetooth SIG.
TCS-BIN-CORDLESS
0x0007
See Bluetooth Telephony Control Specification / TCS Binary, Bluetooth SIG.
BNEP
0x000F
See Bluetooth Network Encapsulation Protocal, Bluetooth SIG.
HID_Control
0x0011
See Human Interface Device , Bluetooth SIG.
HID_Interrupt
0x0013
See Human Interface Device, Bluetooth SIG.
UPnP
0x0015
See [ESDP] , Bluetooth SIG.
AVCTP
0x0017
See Audio/Video Control Transport Protocol , Bluetooth SIG.
AVDTP
0x0019
See Audio/Video Distribution Transport Protocol , Bluetooth SIG.
AVCTP_Browsing
0x001B
See Audio/Video Remote Control Profile, Bluetooth SIG
UDI_C-Plane
0x001D
See the Unrestricted Digital Information Profile [UDI], Bluetooth SIG
¶þ£ºL


Ïà¹ØÎĵµ£º

Linux Telnet·þÎñ¿ªÆô

½ñÌ칫˾ÓиöͬÊÂŪÁ˸öRed Hat Enterprise 5×°£¬ÏµÍ³×°ºÃºó£¬·¢ÏÖtelnet²»ÄÜÓã¬sshÊÇ¿ÉÒԵġ£¸ãÁ˺þ㬲Ÿø¸ã¶¨£¬½áºÏÒÔǰժϵĹØÓÚÕâ·½ÃæµÄ×ÊÁÏ£¬²Î¿¼ÈçÏ£º
1¡£¸ÅÊöLinuxÌṩ·þÎñÊÇÓÉÔËÐÐÔÚºǫ́µÄÊØ»¤³ÌÐò£¨daemon£©À´Ö´Ðеġ£
ÊØ»¤½ø³ÌµÄ¹¤×÷¾ÍÊÇ´ò¿ª1¸ö¶Ë¿Ú£¨port£©£¬µÈ´ý£¨listen£©½øÈëµÄÁ¬½Ó¡£ÔÚC/SģʽÖУ¬Èç¹ ......

solarisºÍlinuxÃüÁî¶Ô±È

×î½üÒ»¸öÏîÄ¿µÄϵͳÓõÄÊÇSolaris 10£¬ËäÈ»ÒÔÇ°ÓõĶ¼ÊÇ Linuxϵͳ£¬µ«ÊÇLinuxϵͳÖеÄһЩÃüÁîºÍSolarisϵͳÊÇͨÓõģ¬ÎªÁË·½±ãÎÒÏÖÔÚÁгö²¿·Ö£¬ÒÔºó½Ðø¸üС£
   ¡¡1£© ²é¿´¿ª·Å¶Ë¿Ú
¡¡
¡¡¡¡Linux£º netstat -atn
¡¡
¡¡¡¡Solaris£º netstat -P tcp -f inet -an
¡¡
¡¡¡¡2£© ²é¿´Íø¿¨/ÍøÂç״̬
¡¡
¡¡¡¡ ......

linuxÂß¼­¾í¹ÜÀí (LVM)


ʲôÊÇ LVM
LVM ÊÇÂß¼­Å̾í¹ÜÀí£¨Logical Volume Manager£©µÄ¼ò³Æ£¬ËüÊÇ Linux »·¾³Ï¶ԴÅÅÌ·ÖÇø½øÐйÜÀíµÄÒ»ÖÖ»úÖÆ£¬LVM
Êǽ¨Á¢ÔÚÓ²Å̺ͷÖÇøÖ®ÉϵÄÒ»¸öÂß¼­²ã£¬À´ÎªÎļþϵͳÆÁ±Îϲã´ÅÅÌ·ÖÇø²¼¾Ö£¬´Ó¶øÌá¸ß´ÅÅÌ·ÖÇø¹ÜÀíµÄÁé»îÐÔ¡£Í¨¹ý LVM
ϵͳ¹ÜÀíÔ±¿ÉÒÔÇáËɹÜÀí´ÅÅÌ·ÖÇø£¬È磺½«Èô¸É¸ö´ÅÅÌ·ÖÇøÁ¬½ÓΪһ¸öÕû¿éµÄ¾í×é ......

Linux BlueZ Ï InquiryµÄʵÏÖ

Ç°Ãæ½²ÁËʹÓà ioctl·¢ËÍHCI CommandµÄ·½·¨¡£µ«HCI protocol»¹ÓÐһЩCommand£¬±ÈÈçInquiryµÈ£¬ËûÃÇÔò²»ÐèҪʹÓÃioctlÀ´·¢ËÍ¡£blueZ Ö±½ÓÌṩÁËÖ§³Ö£¬ËäÈ»ËûÃǵÄ×îÖÕ¶¼ÊÇÓÃͬÑù°ì·¨ÊµÏֵġ£
ÔÚÓ¦ÓóÌÐòÖУº
hci_inquiry(dev_id, length, num_rsp, NULL, &info, flags);
ÕâÑùÐèÒª°üº¬blueZ Í·ÎļþÈçÏ£º
#include //BT ......

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ