linuxÏ´®¿Ú±à³Ì
Linux ´®¿Ú±à³ÌµÄһЩÎÊÌâ½â¾ö
LinuxÏ´®¿Ú±à³ÌµÄÎÄÕÂÍøÉÏÊÇÂúÌì·É£¬µ«´ó¶¼Êdzö×ÔһƪÎÄÕ£¬¶øÇÒдµÄ¶¼ÊÇЩ»ù±¾µÄ²Ù×÷£¬Ïñ¿ØÖÆRTS/CTSµÈ´®¿ÚÒý½Å״̬£¬½ÓÊÕ·¢ËͶþ½øÖÆÊý¾ÝµÈ£¬¶¼Ã»ÓкܺõÄ˵Ã÷£¬ÎÒÔÚʹÓÃÖÐÓöµ½ÁËЩÎÊÌ⣬д³öÀ´£¬Ï£ÍûÄܶԴó¼ÒÓÐËù°ïÖú£¬ÉÙ×ßÍä·£¬ºÇºÇ£¡
ÎÒʹÓõIJÙ×÷ϵͳÊÇRedhat9£¬gcc°æ±¾ÊÇ3.2.2
ÆäʵÔÚlinux϶Դ®¿ÚµÄÉèÖÃÖ÷ÒªÊÇͨ¹ýtermiosÕâ¸ö½á¹¹ÌåʵÏֵģ¬µ«ÊÇÕâ¸ö½á¹¹ÌåȴûÓÐÌṩ¿ØÖÆRTS»ò»ñµÃCTSµÈ´®¿ÚÒý½Å״̬µÄ½Ó¿Ú£¬¿ÉÒÔͨ¹ýioctlϵͳµ÷ÓÃÀ´»ñµÃ/¿ØÖÆ¡£
»ñµÃ£º
ioctl(fd, TIOCMGET, &controlbits);
if (controlbits & TIOCM_CTS)
printf(“ÓÐÐźÅ\n”);
else
printf(“ÎÞÐźÅ\n”);
ÉèÖãº
ioctl(fd, TIOCMGET, &ctrlbits)£»
if (flag)
ctrlbits |= TIOCM_RTS;
else
ctrlbits &= ~TIOCM_RTS;
ioctl(fd, TIOCMSET, &ctrlbits);
ÆäʵTIOCM_RTSÓÐЧºóÊÇ°Ñ´®¿ÚµÄRTSÉèÖÃΪÓÐÐźţ¬µ«´®¿ÚµÄµçƽΪµÍʱÊÇÓÐÐźţ¬Îª¸ßʱΪÎÞÐźţ¬ºÍÓÃTIOCMGET»ñµÃµÄ״̬ÕýºÃÏà·´£¬Ò²¾ÍÊÇ˵TIOCMGET/TIOCMSETÖ»ÊÇ»ñµÃ/¿ØÖÆ´®¿ÚµÄÏàÓ¦Òý½ÅÊÇ·ñÓÐÐźţ¬²¢²»·´Ó¦µ±Ç°´®¿ÚµÄÕæʵµçƽ¸ßµÍ¡£
ÍøÉÏÐí¶àÁ÷ÐеÄlinux´®¿Ú±à³ÌµÄ°æ±¾Öж¼Ã»¶Ôc_iflag£¨termios³ÉÔ±±äÁ¿£©Õâ¸ö±äÁ¿½øÐÐÓÐЧµÄÉèÖã¬ÕâÑù´«ËÍASCIIÂëʱûʲôÎÊÌ⣬µ«´«ËͶþ½øÖÆÊý¾ÝʱÓöµ½0x0d,0x11ºÍ0x13È´»á±»¶ªµô¡£²»ÓÃ˵Ҳ֪µÀ£¬Õ⼸¸ö¿Ï¶¨ÊÇÌØÊâ×Ö·û£¬±»ÓÃ×÷ÌØÊâ¿ØÖÆÁË¡£¹ØµôICRNLºÍIXONÑ¡Ïî¼´¿É½â¾ö¡£
c_iflag &= ~(ICRNL | IXON);
0x0d »Ø³µ·ûCR
0x11 ^Q VSTART×Ö·û
0x13 ^S VSTOP×Ö·û
ICRNL ½«ÊäÈëµÄCRת»»ÎªNL
IXON ʹÆð¶¯/Í£Ö¹Êä³ö¿ØÖÆÁ÷Æð×÷ÓÃ
ÔÚ¡¶UNIX»·¾³¸ß¼¶±à³Ì µÚ¶þ°æ¡·µÚ18ÕµÚ11С½Ú¿´µ½°ÑÖÕ¶ËI/OÉèÖÃΪÔʼģʽ£¨´®¿ÚͨѶ¾ÍÊÇÖÕ¶ËI/OµÄÔʼģʽ£©Ê±ÊäÈëÊôÐÔÉèÖÃΪ
term.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
ÆÁ±ÎÁËÐí¶àÊôÐÔ£¬¹Ö²»µÃÓÐÈË˵Èç¹ûÊÇʹÓô®¿ÚͨѶc_iflagºÍc_oflag¶¼ÉèÖÃΪ0¾ÍÐÐÁË£¡
ÒÔÏÂÊÇÎÒµÄÉèÖõÄһЩÖØÒªµÄ´®¿ÚÊôÐÔ
term.c_cflag |= CLOCAL | CREAD;
term.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
term.c_oflag &= ~OPOST;
term.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
static void request_send(void)
{
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
×îºÃÊÇÏÈ×°XP£¬ºó×°LINUX£¬ÕâÊdz£Ê¶¡£Èç¹ûÒѾÕâÑùÁË£¬×°ÍêXPºó¿Ï¶¨²»ÄÜÆô¶¯LINUX¡£
ÕâÐèÒªÓÃLINUX°²×°ÅÌÖØÐÂÐÞ¸´Æô¶¯ÏÖØдMBR£©¼°ÊÖ¹¤±à¼LINUXµÄÆô¶¯²Ëµ¥
ϵͳÒýµ¼²»ÁËlinuxÁË£¬Ö»ÄܽøÈëxp;
²»ÊÇ°É£¬ÓÖÒªÖØ×°linux?
»Ø´ðÊÇ£º²»ÐèÒª;
ÏÂÃæ¾ÍÊǽâ¾ö·½°¸:
1.½øÈëxpϵͳ£»
2.°²×°wingrupÕâ¸öÈí¼þ;
3.ÖØÐÂÆô¶¯£¬Ñ¡Ô ......
LinuxϵͳʡÂÔÊäÈëÓû§ÃûÃÜÂë(×Ö·û½çÃæÏ£©
1¡¢Ê¡ÂÔÃÜÂëÑéÖ¤
ºÜ¼òµ¥£¬Ö»Ðè°Ñ/etc/passwdÖеÄroot:x:0:0:root:/root:/bin/bash£¬¸ÄΪroot::0:0:root:/root:/bin/bash£¬¾Í¿ÉÒÔÁË£¬¾ÍÊÇÈ¥µôÁËÀïÃæµÄx£¬ÕâÑùrootÓû§¾Í²»ÓÃÃÜÂëÁË¡£ÆäËûÓû§Ò²Ò»Ñù¡£
2¡¢Ê¡ÂÔÊäÈëÓû§Ãû
(1)ÐÞ¸Ä/etc/inittab
ÔÚinittabÖУ¬ÓÐÈçÏÂÅä ......
1.Ò»´Î¿ª»ú£¬ÓôÃÆ£¬·¢ÏÖ~Ŀ¼ÏÂÓÐÒ»¸ö³¤ÎļþÃûµÄÂÒÂëÎļþ£¬Ôõôɾ¶¼É¾²»µô£¬Ä¿Â¼Ò²²»ÄÜɾ¡£×îºóÏëÁËÒ»¸ö±¿·½·¨É¾µôÁË
ÏÈÔÚ¸ÃĿ¼ÏÂmkdir zz È»ºó mv *.* zz OK£¬È»ºórm -rf zzÎļþ¼Ð¾ÍÐÐÁË¡£ºÇºÇ ......
¶ÔÓÚhci²ãµÄ±à³Ì ÊÇÏ൱¸´Ô ¹¦ÄÜÒ²ÊÇÇ¿´óµÄ,½¨ÒéѧϰÕß È¥¶Ábluez-libÖеÄhciºÍsdp
ÕâÀï¼òÒª½éÉÜ ÎÒÔÚ¿ª·¢¹«Ë¾µÄÏîÄ¿ÖÐµÄ Ò»¸öСµÄ»ù´¡¶¯×÷. ¸Ã±à³ÌµÄ¹ý³Ì»ù±¾ÀíÇåÁËhciºÍsdpµÄÏνӺÍÓ¦ÓÃ.Ï£Íû¶ÔѧϰÕßÓаïÖú
˵Ã÷Óв»µ½Ö®´¦,Íû´ó¼Ò¶à¶àÑо¿,²»Òª¾ÖÏÞ,ÿ¸öÈËÓÐ×Ô¼ºµÄ·½Ê½,Ò²ÐíÄãµÄÔÚÂß¼Ëã·¨ÉϱÈÎҵĺÃ! ......