ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì
http://www.ej38.com/showinfo/linux-111338.html
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host
Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬
ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé¶¼ÊÇÈí¼þÐÎʽÌá³öµÄ£¨BluezÖÐÊÇÒÔkernel²ã³ÌÐò)¡£ÔÚModuleÕâÒ»¶Ë£ºLink Manager, BB, µÈÐÒé¶¼ÊÇÓ²¼þÖÐfirmwareÌṩµÄ¡£
¶øHCIÔò±È½ÏÌØÊ⣬ËüÒ»²¿·ÖÔÚÈí¼þÖÐʵÏÖ£¬ÓÃÀ´¸øÉϲãÐÒéºÍ³ÌÐòÌṩ·ÃÎʽӿڣ¨BluezÖÐ,hci.c hci_usb.c£¬hci_sock.cµÈ£©.ÁíÒ»²¿·ÖÒ²ÊÇÔÚFirmwareÖÐʵÏÖ£¬ÓÃÀ´½«Èí¼þ²¿·ÖµÄÖ¸ÁîµÈÓõײãÐÒéÃ÷°×µÄ·½Ê½´«µÝ¸øµ×²ã¡£
¾ÓÓÚPCµÄÉϲã³ÌÐòÓëÐÒéºÍ¾ÓÓÚModulesµÄϲãÐÒéÖ®¼äͨ¹ýHCI¹µÍ¨£¬ÓÐ4ÖÖ²»Í¬ÐÎʽµÄ´«Ê䣺Commands, Event, ACL Data, SCO/eSCO Data¡£
1.1. HCI Command£º
HCI CommandÊÇHostÏòModules·¢ËÍÃüÁîµÄÒ»ÖÖ·½Ê½¡£HCI Command Packet½á¹¹ÈçÏ£º
OpCodeÓÃÀ´Î¨Ò»±êʶHCI Command.ËüÓÉ2²¿·Ö×é³É£¬10bitµÄOpcode Command. 6bitµÄOpcode Group¡£
1.1.1: OpCode Group:
Linux Kernel£¨BlueZ£©ÖУ¬~/include/net/bluetooth/hci.hÖж¨ÒåÁËOpCode Group¡£
#define OGF_LINK_CTL 0x01
#define OGF_LINK_POLICY 0x02
#define OGF_HOST_CTL 0x03
#define OGF_INFO_PARAM 0x04
#define OGF_STATUS_PARAM 0x05
ËüÃÇ´ú±íÁ˲»Í¬µÄCommand Group£º
OGF_LINK_CTL: Link control,Õâ¸öCommand GroupÖеÄCommandÔÊÐíHost¿ØÖÆÓëÆäËübluetooth device µÄÁ¬½Ó¡£
OGF_LINK_POLICY £ºLink Policy¡£Õâ¸öCommand GroupÖеÄCommandÔÊÐíµ÷ÕûLink Manager control.
OGF_HOST_CTL: Control and Baseband.
1.1.2: Opcode Command:
ÓÃÀ´ÔÚͬһ¸öGroupÄÚΨһʶ±ðCommand¡£~/include/net/bluetooth/hci.hÖж¨Òå¡£
1.2: HCI Event£º
ModulesÏòHost·¢ËÍһЩÐÅÏ¢£¬Ê¹ÓÃHCI Event¡£Event Packet½á¹¹ÈçÏ£º
HCI Event·Ö3ÖÖ£ºCommand complete Event, Command States Event£¬Command Subsequently Completend.
Command
complete Event:
Èç¹ûHost·¢Ë͵ÄCommand¿ÉÒÔÁ¢¿ÌÓнá¹û£¬Ôò»á·¢ËÍ´ËÀàEvent¡£Ò²¾ÍÊÇ˵£¬Èç¹û·¢Ë͵ÄCommandÖ»Óë±¾µØModulesÓйأ¬²»Óë
remoteÉ豸´ò½»µÀ£¬ÔòʹÓÃCommand complete Event¡£ÀýÈ磺HCI
Ïà¹ØÎĵµ£º
Ö¸ÁîÃû³Æ : chmod
ʹÓÃȨÏÞ : ËùÓÐʹÓÃÕß
ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸µ÷ÓÃȨÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËùµ÷Óá£
²ÎÊý :
mode : ȨÏÞÉ趨×Ö´®£¬¸ñʽÈçÏ : [ugoa...][[+-=][rwxX]...][,...]£¬ÆäÖÐ
......
#find ... -exec rm {} \;
#find ... | xargs rm -rf
Á½Õß¶¼¿ÉÒÔ°ÑfindÃüÁî²éÕÒµ½µÄ½á¹ûɾ³ý£¬ÆäÇø±ð¼òµ¥µÄ˵ÊÇǰÕßÊǰÑfind·¢ÏֵĽá¹ûÒ»´ÎÐÔ´«¸øexecÑ¡ÏÕâÑùµ±ÎļþÊýÁ¿½Ï¶àµÄʱºò£¬¾Í¿ÉÄÜ»á³öÏÖ“²ÎÊýÌ«¶à”Ö®ÀàµÄ´íÎó£¬Ïà±È½Ï¶øÑÔ£¬ºóÕ߾ͿÉÒÔ±ÜÃâÕâ¸ö´íÎó£¬ÒòΪxargsÃüÁî»á·ÖÅú´ÎµÄ´¦Àí½á¹û¡£ÕâÑù¿´À´£ ......
2008-07-07 22:05
³õʼ»¯
1£¬ip_conntrack_standalone_initÊÇcontrackÄ£¿éµÄ³õʼ»¯º¯Êý¡£ËüÖ÷ÒªÍê³ÉÒÔÏÂÄÚÈÝ£º
/*1, ³õʼ»¯conntrackÏà¹ØµÄÊý¾Ý½á¹¹£¬Èçhash±í£¬ip_conntrack_protocolÒÔ¼°ÄÚ´æ¹ÜÀíµÈ*/
ret = ip_conntrack_init();
if (ret < 0)
return ret;
#ifdef CON ......
±¾ÎĵµµÄCopyleft¹éyfydzËùÓУ¬Ê¹ÓÃGPL·¢²¼£¬¿ÉÒÔ×ÔÓÉ¿½±´£¬×ªÔØ£¬×ªÔØÊ±Çë±£³ÖÎĵµµÄÍêÕûÐÔ£¬ÑϽûÓÃÓÚÈκÎÉÌÒµÓÃ;¡£
msn: yfydz_no1@hotmail.com
À´Ô´£ºhttp://yfydz.cublog.cn
1. ǰÑÔ
¶ÔIPË鯬µÄÖØ×éÊÇ·À»ðǽÌá¸ß°²È«ÐÔµÄÒ»¸öÖØÒªÊֶΣ¬Í¨¹ýÌáǰ½øÐÐË鯬֨×飬¿ÉÒÔÓÐЧ·ÀÓù¸÷ÖÖË鯬¹¥»÷£¬LinuxÄں˵ķÀ»ðǽ ......
linuxºÍunixϳ£ÓýâѹºÍѹËõÃüÁî
.tar
½â°ü£º tar xvf FileName.tar
´ò°ü£ºtar cvf FileName.tar DirName
£¨×¢£ºtarÊÇ´ò°ü£¬²»ÊÇѹËõ£¡£©
---------------------------------------------
.gz
½âѹ1£ºgunzip FileName.gz
½âѹ2£ºgzip -d FileName.gz
ѹËõ£ºgzip FileName
.tar.gz
½âѹ£ºtar zxvf FileName.ta ......