2012年10月28日 星期日

無線網路連線記錄


  • iwconfig 維護更新基本的無線參數。
  • iwlist 許可用初始掃描與列出頻率,bit-rate與加密鑰…。
  • iwspy 許可用來取個每個結點的連線品質。
  • iwpriv 許可維護更新無線延申指定的驅動程式(私人)。
  • ifrename 許可命名在多重靜態認証的界面。

自己測試連線
#iwconfig wlan0 essid "wingingAP" mode managed key xxxxxxxxxxxxxxxxxx

#ifconfig wlan0 192.168.1.2
#ping 192.168.1.1
OK



使用ubuntu編android 4.0.1問題解決



我下載了三明治冰淇淋android中

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 

在編譯過程中需要修改這一些東西。才能完整編完。所以
但是實在要編太久了!大約用了5-6個小時才編完。

本文出處
https://groups.google.com/forum/?fromgroups=#!topic/android-building/AgeruY7XIwQ



Not saying any of this is right, just that it finished my build. 
Using the cm9 repo (ics branch), ubuntu oneiric ocelot.  Take it for 
what it's worth, which may be nothin'. 

--fattire 


ERROR:  :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] 

FIX: 

in build/core/comboHOST_linux-x86.mk : 
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 

------- 

ERROR:  external/gtest/src/../include/gtest/internal/gtest-param- 
util.h:122:11: error: ‘ptrdiff_t’ does not name a type 

FIX: 

in external/gtest/internal/gtest-param-util.h 
 #include  
+#include  
 #include  

------- 

ERROR:  external/oprofile/libpp/format_output.h:94:22: error: 
reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive] 

FIX: 

in external/libpp/format_output.h b/libpp/format_output.h 
 -               mutable counts_t & counts; 
 +               counts_t & counts; 

------- 

ERROR:  frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23: 
error: variable ‘ParamName’ set but not used [-Werror=unused-but-set- 
variable] 

FIX: 

in android/ics/frameworks/compile/slang/Android.mk 
-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter 
-Werror 
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter 

------- 

ERROR:  Numerous pthread errors w/llvm: 
      Example:   external/llvm/lib/Support/Threading.cpp:96: undefined 
reference to `pthread_create' 

FIX:  This is a really dumb fix.  But it got me to the end of the 
build.  In external/llvm... 

diff --git a/lib/Support/Mutex.cpp b/lib/Support/Mutex.cpp 
index b408973..3a13adf 100644 
--- a/lib/Support/Mutex.cpp 
+++ b/lib/Support/Mutex.cpp 
@@ -13,6 +13,8 @@ 

 #include "llvm/Config/config.h" 
 #include "llvm/Support/Mutex.h" 
+#undef ENABLE_THREADS 
+#undef HAVE_PTHREAD_H 
// 
===---------------------------------------------------------------------- 
===// 
 //=== WARNING: Implementation here must contain only TRULY operating 
system 
diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp 
index a117893..68fa5e7 100644 
--- a/lib/Support/Signals.cpp 
+++ b/lib/Support/Signals.cpp 
@@ -25,6 +25,8 @@ using namespace sys; 

 } 

+#undef HAVE_DLFCN_H 

 // Include the platform-specific parts of this class. 
 #ifdef LLVM_ON_UNIX 
 #include "Unix/Signals.inc" 
diff --git a/lib/Support/Threading.cpp b/lib/Support/Threading.cpp 
index 2957956..f1339a3 100644 
--- a/lib/Support/Threading.cpp 
+++ b/lib/Support/Threading.cpp 
@@ -16,6 +16,7 @@ 
 #include "llvm/Support/Mutex.h" 
 #include "llvm/Config/config.h" 
 #include  
+#undef LLVM_MULTITHREADED 

 using namespace llvm;

建立無線網路

這個週未,拿到了一片usb的無線網卡,在桌面電腦ubuntu上看起來一切都是正常的,
但是我把這片網路放到 arm 的新平台上,使用linux-3.0.8,使用這個無線網卡。

首先要選驅動程式
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<*> Ralink driver support --->
<*> Ralink rt27xx/rt28xx/rt30xx (USB) support

選了無線網卡的驅動程式後,再重新的編譯kernel後再燒入主片中。
現在就要開始使用無線網路了!

開機後要再開始使用無線網卡了!

先看usb有沒有抓到
#lsusb

Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 002: ID 148f:3070 <--這一張就是無線網卡


#cat /proc/net/dev
face |bytes packets errs drop fifo frame compressed multicast|bytes packd
lo: 0 0 0 0 0 0 0 0 0 0
wlan0: 0 0 0 0 0 0 0 0 0 0 <-無線
eth0: 28192 205 0 0 0 0 0 0 3662 0

啟動無線網卡
#ifconfig wlan0 up
phy0 -> rt2x00lib_request_firmware: Error

看來是有問題的查看到要的是什麼firmware
在kernel中 drivers/net/wireless/rt2x00/rt2x00firmware.c
修改

fw_name = rt2x00dev->ops->lib->get_firmware_name(rt2x00dev);
if (!fw_name) {
ERROR(rt2x00dev,
"Invalid firmware filename.\n"
"Please file bug report to %s.\n", DRV_PROJECT);
return -EINVAL;
}

-INFO(rt2x00dev, "Loading firmware file '%s'.\n", fw_name);
+ERROR(rt2x00dev, "Loading firmware file '%s'.\n", fw_name);

重燒kernel之後就看到的firmware的名字了。
phy0 -> rt2x00lib_request_firmware: Error - Loading firmware file 'rt2870.bin'.
原來找需要的firmware是rt2870.bin,我的電腦可以用那我的電腦應該有吧!我就找了一下,果然
在/lib/firmware資料夾下有rt2870.bin拿過來用果然就可一了!