Æß´óʵÓÃÃüÁîÐй¤¾ß ÍæתLinuxÍøÂçÅäÖÃ
¡¾51CTO¾«Ñ¡ÒëÎÄ¡¿ËäÈ»ÏÖÔÚ´ó¶àÊýLinux·¢Ðаæ϶¼ÓÐGUIµÄÍøÂç¹ÜÀíÅäÖ㬲»¹ýÊìϤÃüÁîÐй¤¾ß»¹ÊÇ´óÓÐÖúÒæµÄ¡£ÏÂÃæÎÒÃÇÀ´¿´¿´ÕâЩÁ÷ÐÐLinux·¢ÐаæÏÂÃæµÄ³£ÓÃÃüÁî¡£¶ÔÁË£¬Èç¹ûÄãÏëÒªÁ˽â¸Ã¹¤¾ßºÍÑ¡ÏîµÄÏêϸÇé¿ö£¬¿ÉÒÔÊäÈëmanÔÙÊäÈëÕâ¸ö¹¤¾ßµÄÃû×Ö·ÃÎÊÆämanÒ³Ãæ¡£
ÏÖÔھʹò¿ªÄãµÄterminal³¢ÊÔһϰɣ¡
ÓÃÓÚ»ù±¾½Ó¿ÚÓëIPÅäÖõÄifconfig
ifconfig¹¤¾ß£¨interface configurator£¬½Ó¿ÚÅäÖÃÆ÷£©ÌṩÁËһЩ·Ç³£»ù±¾µ«ÊǷdz£ÖØÒªµÄ¹¦ÄÜ¡£Ëü¿ÉÒÔ´ò¿ªºÍ¹Ø±ÕÍøÂçÊÊÅäÆ÷£¬·ÖÅäIPµØÖ·ÓënetmaskÐÅÏ¢¡£Ò»Ð©³£ÓÃÖ¸ÁîÈçÏ£º
²é¿´ÍøÂç½Ó¿Úµ±Ç°ÅäÖÃÓë½Ó¿ÚÃüÃû£º
ifconfig
´ò¿ª£¨up£©»ò¹Ø±Õ£¨down£©ÊÊÅäÆ÷
ifconfig <ÍøÂçÃû> <up|down>
ΪÊÊÅäÆ÷·ÖÅäIPµØÖ·£º
ifconfig <ÍøÂçÃû> <ipµØÖ·>
ΪÊÊÅäÆ÷·ÖÅäµÚ¶þ¸öIPµØÖ·£º
ifconfig <ÍøÂçÃû:ʵÀýÊý> <ipµØÖ·>
·¶Àý£ºifconfig eth0:0 192.168.1.101
Ïêϸ½éÉÜ£ºLinuxÃüÁîÍøÂç²Ù×÷Ö®ifconfig
ÓÃÓÚ¹ÜÀíÒÔÌ«Íø¿¨µÄethtool¹¤¾ß
Ethtool¿ÉÒԲ鿴ºÍÐÞ¸ÄÒÔÌ«ÊÊÅäÆ÷µÄ¸÷ÖÖÉèÖ㨲»°üÀ¨Wi-FiÍø¿¨£©£¬°üÀ¨tx/rx£¬checksummingºÍwake-on-LANÉèÖá£ÏÂÃæÊÇһЩÓÐÓõÄÃüÁ
ÏÔʾij¸öÍøÂçÊÊÅäÆ÷µÄÇý¶¯ÐÅÏ¢£¬ÊÊÓÃÓÚ²éѯÈí¼þ¼æÈÝÐÔµÄÇé¿ö£º
ethtool -i <½Ó¿ÚÃû>
ÏÔʾÍøÂçÊý¾Ý£º
ethtool -S
ÉèÖÃÊÊÅäÆ÷Á¬½ÓËٶȣ¨Mbps£©
ethtool speed <10|100|1000>
Ïêϸ½éÉÜ£ºLinux/UnixÃüÁîÖ®Ethtool
iwconfigÅäÖÃÎÞÏßÍøÂç
iwconfig¹¤¾ß¿ÉÒÔËãÊÇÎÞÏßÍø¿¨µÄifconfigºÍethtool¡£Äã¿ÉÒÔ¼ì²é»ù±¾µÄWi-FiÍøÂçÉèÖã¬ÈçSSID¡¢channelºÍ¼ÓÃܵÈϸ½Ú¡£´ËÍ⻹¿ÉÒÔÐÞ¸ÄһЩ¸ß¼¶ÉèÖ㬰üÀ¨½ÓÊÕÃô¸Ð¶È£¬RTS/CTS£¬ËéƬ£¬ÒÔ¼°ÖØÊÔÊý¡£ÏÂÃæ½éÉܼ¸¸öÓÐÓõÄÃüÁ
ÏÔʾµ±Ç°ÎÞÏßÉèÖ㬰üÀ¨½Ó¿ÚÃû³Æ£º
iwconfig
ÉèÖÃESSID£¨À©Õ¹·þÎñÉèÖÃʶ±ðÆ÷£©»òÍøÂçÃû£º
iwconfig <½Ó¿ÚÃû> essid <ÍøÂçÃû>
·¶Àý£ºiwconfig <½Ó¿ÚÃû> "my network"
·¶Àý£ºExample: iwconfig <½Ó¿ÚÃû> any
ÉèÖÃradioµÄÎÞÏßchannel£¨1-11£©£º
iwconfig <½Ó¿ÚÃû> <channel>
ÊäÈëWEP¼ÓÃÜÃÜÔ¿£¨WPAºÍWPA1Éв»Ö§³Ö£¬ÐèÒªwpa_supplicantµÄÖ§³Ö£©£º
iwconfig eth0 key <HEX¸ñʽµÄÃÜÔ¿>
ÏÞÖÆÊÊÅäÆ÷½öÄÜÔÚÖ¸¶¨MACµØÖ·ÏÂÁ¬½Óµ½AP£º
iwconfig <½Ó¿ÚÃû> ap <macµØÖ·>
·¶Àý£ºiwconfig eth0 ap 00:60:1D:01:23:45
ÉèÖÃradioµÄ·¢ÉäÇ¿¶È£¬½öÔÚÎÞÏßÍø¿¨Ö§³ÖµÄÇé¿öÏÂÓÐЧ¡£Ä¬Èϵ¥Î»ÎªdBm£¬¿ÉÉ
Ïà¹ØÎĵµ£º
I2CÊÇPhillips¿ª·¢µÄ2ÏߵĴ®ÐÐ×ÜÏßÐÒ顣ͨ³£Ó¦ÓÃÔÚǶÈëʽϵͳÖÐÈò»Í¬µÄ×é¼þͨÐÅ£¬PCÖ÷°å¿ÉÒÔͨ¹ýI2CÀ´Ó벻ͬµÄ´«¸ÐÆ÷ͨÐÅ¡£ÕâЩ´«¸ÐÆ÷ͨ³£±¨¸æ·çÉÈËٶȣ¬´¦ÀíÆ÷ζȺÍÕû¸öÓ²¼þϵͳµÄÐÅÏ¢£¬Õâ¸öÐÒéÒ²¿ÉÒÔÓÃÔÚRAM chipsÉÏ£¬Ïò²Ù×÷ϵͳÌṩDIMMµÄÐÅÏ¢¡£
ÔÚ2.0ʱI2CµÄkernelÔ´Âë²»ÔÚÄÚºËÀïµÄ£¬2.4Äں˰üÀ¨ÁËÒ»µã¶ÔI2CµÄÖ§³Ö ......
×î½üÔÚ¿´Linux 2.6.21Äں˵ÄI2CÇý¶¯£¬Ò²ÔÚÍøÉϲéÁËÒ»ÏÂ×ÊÁÏ£¬ÓдíÒ²Óжԣ¬ÓÐЩÐĵ㬼ǼÏÂÀ´°É¡£ÀïÃæÈÏʶ»òÐí¶àÓв»µ±Ö®´¦£¬»¹¿ÒÇëÖ¸Õý¡£
1. I2C ÐÒé
1.1 I2C×ÜÏß¹¤×÷ÔÀí
I2C×ÜÏßÊÇÓÉÊý¾ÝÏßSDAºÍʱÖÓSCL¹¹³ÉµÄ´®ÐÐ×ÜÏߣ¬¸÷ÖÖ±»¿ØÖÆÆ÷¼þ¾ù²¢ÁªÔÚÕâÌõ×ÜÏ ......
Ê×ÏÈÏÈѧѧ±à¼Æ÷£¬vim, emacsʲôµÄ¶¼ÐС£
È»ºóѧmake fileÎļþ£¬Ö»ÒªÖªµÀÒ»µã¾ÍÐУ¬ÕâÑù¾Í¿ÉÒÔ×¼±¸±à³ÌÐòÁË¡£
È»ºó¿´¿´¡¶C³ÌÐòÉè¼ÆÓïÑÔ¡·K&R£¬ÕâÑùÄØ£¬»ù±¾ÉϾͿÉÒÔ½øÐÐÒ»°ãµÄ±à³ÌÁË£¬Ë³±ãÕÒ±¾Êý¾Ý½á¹¹µÄÊéÀ´¿´¡£
Èç¹ûÏëѧϰUNIX/LINUXµÄ±à³Ì£¬¡¶APUE¡·¾ø¶Ô¾µäµÄ½Ì²Ä£¬¼ÓÉîһϹ¦µ×£¬Ñ§Ï°¡¶UNP¡·µÄµÚ¶þ¾í¡£ÕâÑù»ù ......
¾Å¡¢kill
1.×÷ÓÃ
killÃüÁîÓÃÀ´ÖÐÖ¹Ò»¸ö½ø³Ì¡£
2.¸ñʽ
kill [ £s signal | £p ] [ £a ] pid ...
kill £l [ signal ]
3.²ÎÊý
£s£ºÖ¸¶¨·¢Ë͵ÄÐźš£
£p£ºÄ£Äâ·¢ËÍÐźš£
£l£ºÖ¸¶¨ÐźŵÄÃû³ÆÁÐ±í¡£
pid£ºÒªÖÐÖ¹½ø³ÌµÄIDºÅ¡£
Signal£º±íʾÐźš£
4.˵Ã÷
½ø³ÌÊÇLinuxϵͳÖÐÒ»¸ö·Ç³£ÖØÒªµÄ¸ÅÄî¡£LinuxÊÇÒ»¸ö¶à ......
Linked from: http://www.faqs.org/docs/Linux-mini/C++-dlopen.html
//1.==== main.cpp =============================================================
// How to build?
// g++ main.cpp -ldl
//=============================================================================
#include "polygon.h"
......