LinuxÏ´®¿ÚͨÐÅ
1. ´ò¿ª´®¿Ú
ÓëÆäËûµÄ¹ØÓÚÉ豸±à³ÌµÄ·½·¨Ò»Ñù£¬ÔÚLinuxÏ£¬²Ù×÷¡¢¿ØÖÆ´®¿ÚÒ²ÊÇͨ¹ý²Ù×÷ÆðÉ豸Îļþ½øÐеġ£ÔÚLinuxÏ£¬´®¿ÚµÄÉ豸ÎļþÊÇ/dev/ttyS0»ò/dev/ttyS1µÈ¡£Òò´ËÒª¶Áд´®¿Ú£¬ÎÒÃÇÊ×ÏÈÒª´ò¿ª´®¿Ú£º
char *dev = "/dev/ttyS0"; //´®¿Ú1
int fd = open( dev, O_RDWR );
//| O_NOCTTY | O_NDELAY
if (-1 == fd)
{
perror("Can't Open Serial Port");
return -1;
}
else
return fd;
2. ÉèÖô®¿ÚËÙ¶È
´ò¿ª´®¿Ú³É¹¦ºó£¬ÎÒÃǾͿÉÒÔ¶ÔÆä½øÐжÁдÁË¡£Ê×ÏÈÒªÉèÖô®¿ÚµÄ²¨ÌØÂÊ£º
int speed_arr[] = { B38400, B19200, B9600, B4800, B2400, B1200, B300,
B38400, B19200, B9600, B4800, B2400, B1200, B300, };
int name_arr[] = {38400, 19200, 9600, 4800, 2400, 1200, 300, 38400,
&n
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Securing your Linux server is important to protect your data, intellectual property, and time, from the hands of crackers (hackers). The system administrator is responsible for security Linux box. In this first part of a Linux server security series, I will provide 20 hardening tips for default inst ......
ifconfig
1.×÷ÓÃ
ifconfigÓÃÓڲ鿴ºÍ¸ü¸ÄÍøÂç½Ó¿ÚµÄµØÖ·ºÍ²ÎÊý£¬°üÀ¨IPµØÖ·¡¢ÍøÂçÑÚÂë¡¢¹ã²¥µØÖ·£¬Ê¹ÓÃȨÏÞÊdz¬¼¶Óû§¡£
2.¸ñʽ
ifconfig -interface [options] address
3.Ö÷Òª²ÎÊý
-interface£ºÖ¸¶¨µÄÍøÂç½Ó¿ÚÃû£¬Èçeth0ºÍeth1¡£
up£º¼¤»îÖ¸¶¨µÄÍøÂç½Ó¿Ú¿¨¡£
down£º¹Ø±ÕÖ¸¶¨µÄÍøÂç½Ó¿Ú¡£
broadcast address£ºÉèÖà ......