linuxϱàÒëÔËÐеĵÚÒ»¸öC
linuxÏÂÔËÐеĵÚÒ»¸öC³ÌÐò
root@localhost root]# vi hello.c
½øÈëvimµÄÃüÁîģʽ£¬°´Ï¼üÅ̵ÄiÇл»µ½²åÈëģʽ£¬ÊäÈëÈçÏ´úÂ룺
#include <stdio.h>
int main()
{
printf("Hello! This is our embeded world!\n");
return 0;
}
°´ÏÂEsc½øÈëÃüÁîģʽ£¬ÊäÈë:wq£¬×ÔÈ»»á±£´æÎļþ»áÍ˻ص½ÖÕ¶Ë
½ÓÏÂÀ´¾ÍÊÇÔ¤´¦Àí¡¢Á´½Ó¡¢±àÒë¡¢ÔËÐÐÀ
[root@localhost root]# gcc -E hello.c -o hello.i //Ô¤´¦Àí
[root@localhost root]# gcc -S hello.i -o hello.s //±àÒë²»»ã±à£¬Éú³É»ã±àÎļþ
[root@localhost root]# gcc -c hello.s -o hello.o //±àÒë²»Á´½Ó¡£Éú³ÉÄ¿±êÎļþ
[root@localhost root]# gcc hello.o -o hello //Éú³ÉÖ´ÐÐÎļþ
[root@localhost root]# ./hello //ÔËÐÐÖ´ÐÐÎļþ
Hello! This is our embeded world! //Õâ¾ÍÊÇÊä³öµÄ½á¹û
Ïà¹ØÎĵµ£º
£¨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 ......
ÍøÂçÐÅÏ¢²é¿´
²é¿´Íø·½Ó¿ÚÐÅÏ¢
1£®Á˽âlinuxÖеÄÍøÂç½Ó¿ÚÉ豸
$/sbin/ifconfig ²é¿´ËùÓлÍøÂç½Ó¿ÚÐÅÏ¢£¬ÆäÖаüÀ¨Ò»¸ölo»·»Ø¶Ë¿Ú¡£
2£®²é¿´Ö¸¶¨ÍøÂç½Ó¿ÚµÄÐÅÏ¢
$/sbin/ ......
¸úÎÒÒ»Æðд Makefile
³Âð© (CSDN)
¸ÅÊö
——
ʲ
ôÊÇmakefile£¿»òÐíºÜ¶àWinodwsµÄ³ÌÐòÔ±¶¼²»ÖªµÀÕâ¸ö¶«Î÷£¬ÒòΪÄÇЩWindowsµÄIDE¶¼ÎªÄã×öÁËÕâ¸ö¹¤×÷£¬µ«ÎÒ¾õµÃÒª×÷Ò»¸öºÃµÄºÍ
professionalµÄ³ÌÐòÔ±£¬makefile»¹ÊÇÒª¶®¡£Õâ¾ÍºÃÏñÏÖÔÚÓÐÕâô¶àµÄHTMLµÄ±à¼Æ÷£¬µ«Èç¹ûÄãÏë³ÉΪһ¸öרҵÈËÊ¿£¬Ä㻹ÊÇÒªÁ˽ ......