ÈçºÎʹÓÃeclipse½øÐÐǶÈëʽLinuxµÄ¿ª·¢
×÷ÕߣºÔøºê°²£¬»ªÇåÔ¶¼ûǶÈëʽѧԺ¸ß¼¶½²Ê¦¡£
ÈçºÎʹÓÃeclipse½øÐÐǶÈëʽLinuxµÄ¿ª·¢ Ï°¹ßÁËÔÚwindows»·¾³Ï¿ª·¢µÄ³ÌÐòÔ±ÔÚתµ½Linuxƽ̨ʱ¾³£»á±§Ô¹Ã»ÓÐÒ»¸öºÃÓõļ¯³É¿ª·¢»·¾³¡£ºÍwindowsϳ£ÓõÄһЩ¿ª·¢Èí¼þÏà±È£¬Linux×Ô´øµÄһЩ¿ª·¢»·¾³Ê¹ÓÃÆðÀ´ÒªÃ´½çÃæºÍ²Ù×÷²»¹»·½±ã¡¢ÓѺã¬ÒªÃ´¹¦Äܲ»È«¡£ÆäʵÎÒÃÇÍêÈ«¿ÉÒÔÔÚ¿ªÔ´ÉçÇøÉÏÕÒµ½²Ù×÷·½±ã£¬¹¦ÄÜÇ¿´óµÄ¿ª·¢»·¾³¡£ÏÂÃæ¾ÍÏò´ó¼Ò½éÉÜÒ»¸öÄÜÔÚLinuxÉÏÔËÐУ¬½çÃæºÍ¹¦ÄÜÓëwindowsÉÏͬÀàÈí¼þÏàËƵĿª·¢Æ½Ì¨eclipse¡£
eclipseÊÇÖøÃûµÄ¿çƽ̨µÄ¼¯³É¿ª·¢»·¾³(IDE)£¬×î³õÊÇÓÉIBM¹«Ë¾¿ª·¢µÄÌæ´úÉÌÒµÈí¼þVisual Age For JaveµÄÏÂÒ»´ú¿ª·¢»·¾³¡£2001Ä꣬IBM½«eclipse¹±Ï׸ø¿ªÔ´ÉçÇø£¬ÏÖÔÚÓÉeclipse»ù½ð»á¹ÜÀí¡£2005Äê7Ô£¬eclipseÎȶ¨°æ3.1.0·¢²¼£¬Ä¿Ç°×îеÄÎȶ¨°æ±¾ÊÇ3.4¡£
eclipse±¾ÉíÖ»ÊÇÒ»¸ö¿ò¼Üƽ̨£¬×î³õÖ÷ÒªÓÃÓÚjavaÓïÑԵĿª·¢¡£µ«ÊÇÖÚ¶à²å¼þµÄÖ§³ÖʹµÃeclipseͬÑù¿ÉÒÔÓÃÀ´¿ª·¢ÆäËûµÄÓïÑÔ£¬Èçc/c++¡¢c#¡¢perl¡¢cobolµÄµÈµÈ¡£cdt(c/c++ development toolkit)¾ÍÊÇÖ§³Öc/c++¿ª·¢µÄ²å¼þ¡£Ðí¶àÈí¼þ¿ª·¢ÉÌÒ²ÒÔeclipseΪ¿ò¼ÜÍƳöÁË×Ô¼ºµÄ¼¯³É¿ª·¢»·¾³¡£ÓÉÓÚeclipseƽ̨ÓÃjavaʵÏÖ£¬ËùÒÔÔËÐÐʱÐèÒªjre(java runtime environment)µÄÖ§³Ö¡£ÏÂÃæÎÒÃÇÒÔubuntu(linux·¢ÐаæµÄÒ»ÖÖ)ΪÀý£¬½éÉÜÈçºÎÔÚlinuxÉÏʹÓà eclipse+cdtÀ´½øÐÐǶÈëʽLinuxÓ¦ÓóÌÐòµÄ¿ª·¢¡£
Ò»¡¢°²×°Èí¼þ
ÔÚubuntuÏ°²×°Èí¼þÓÐÁ½ÖÖ·½·¨:ʹÓÃapt-getÀ´×Ô¶¯°²×°»òÊÖ¶¯°²×°¡£Óû§Ê¹ÓÃ×Ô¶¯°²×°·Ç³£·½±ã£¬ÊʺϳõѧÕß¡£µ«ÊÇ°²×°¹ý³Ì¹ýÓÚÒÀÀµ×ÊÔ´ÍøÕ¾µÄÁ¬½Ó×´¿ö£¬¿ÉÄÜÐèÒªºÄ·Ñ¹ý¶àµÄʱ¼ä¡£ÕâÀïÎÒÃÇÍƼöÊÖ¶¯°²×°µÄ·½Ê½£¬»¨µÄʱ¼ä±È½Ï¶Ì¡£
1¡¢°²×°jdk
jdk(java development kit)¼´java¿ª·¢°ü£¬ÆäÖаüº¬ÁËÔËÐÐeclipseËùÐèÒªµÄjre. ubuntuȱʡ°²×°µÄgnu°æ±¾µÄjreÔËÐÐЧÂʲ»¸ß£¬ËùÒÔÎÒÃÇÐèÒª°²×°sun¹«Ë¾µÄjre. Ê×ÏÈ´ÓsunµÄÍøÕ¾ÉÏ(http://java.sun.com/javase/downloads/index.jsp)ÏÂÔØ°²×°°üjdk-6u7-linux-i586.bin£¬È»ºóÈçϽøÐа²×°£º
# mkdir -p /opt/java
# ./jdk-6u7-linux-i586.bin // Ö´ÐÐ×Ô½âѹÎļþ£¬Éú³ÉĿ¼
# mv jdk1.6.0_07 /opt/java // °ÑĿ¼ÒƵ½/opt/javaÏÂ
# cd /opt/java
# ln -s jdk1.6.0_07 jdk
&nbs
Ïà¹ØÎĵµ£º
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 ......
¹ØÓÚepollʹÓ÷½·¨£º
²ÎÕÕ£º http://linux.die.net/man/4/epoll
ʵÀý´úÂ룺£¨À´×ÔÍøÉÏijÂÛ̳£©
#include <pthread.h>
#include <stdio.h>
#include <sys/timeb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/epoll.h> ......
תÔØʱÇë×¢Ã÷³ö´¦ºÍ×÷ÕßÁªÏµ·½Ê½
×÷ÕßÁªÏµ·½Ê½£ºÀîÏȾ² <xianjimli at hotmail dot com>
LinuxÊÖ»úµÄǰ;ËƺõºÜÉÙÓÐÈË»³Òɹý¡£Ôø¾×ö¹ýµÄ£¬ÏÖÔÚÕýÔÚ×öµÄ£¬¼´½«´òËã×öµÄ£¬ÔÚ¹úÄÚ¹À¼Æ²»ÏÂÊýÊ®¼Ò¹«Ë¾¡£´ó¼Ò¶¼Ïë´ÓÖÐÌÔһͰ½ð£¬²»¹ý´ó¶àÊdzËÐ˶øÀ´°ÜÐ˶ø¹é£¬ÉÙÔòËðʧ¼¸°ÙÍò£¬¶àÔòÊýǧÍò£¬ÓеÄÉõÖÁÕû¸ö¹«Ë¾Òò´ËÒ»Øʲ»Õñ¡£ ......