hostapd的編譯
❶ arm-openssl交叉編譯,hostapd移植出錯,求幫助
如果有編譯錯誤消息的話,可以對照出錯行看看
❷ android 4.4 中的hostapd.conf 如何產生
android 4.4 中的hostapd.conf 產生方法:
1、是上層自動寫下去的, 在wifi界面點擊打開wifi熱點 就會生成hostapd.conf。
2、如果要手動起就自己寫個hostapd.conf 然後輸入命令:hostapd/data/misc/wifi/hostapd.conf
❸ 樹莓派無線網卡買哪種比較好
這款用的也是rtl8188cus的晶元吧,用來上網沒問題,不用編譯驅動,但我用來搭熱點時,需要編譯對應的hostapd才可以用,不支持nl80211驅動,只能用rtl871xdrv驅動。可以看http://blog.sip2serve.com/post/48420162196/howto-setup-rtl8188cus-on-rpi-as-an-access-point 不過也算是好的選擇了。
我還試驗了一下rt5370晶元的,可以用nl80211,完全不用編譯驅動,但最後出的問題是,linux內核驅動不支持該晶元的power save功能,導致過熱死掉。。。
所以現在我也用回了rtl8188cus晶元的網卡,自己編譯hostapd,暫時沒有完美的解決方案。。。
❹ raspberry pi 3怎麼連接無線路由
Raspberry Pi無線路由器篇
RaspberryPi可以折騰的方法很多,我將會吧自己的折騰經驗與大家分享。
作為無線路由器,需要提供dhcp的功能和無線ap的能力,我們分別通過isc-dhcp-server和hostapd這兩個軟體來實現,網卡間轉發直接通過iptables定義nat規則來實現。
安裝dhcp服務和ap熱點服務
[python]
apt-get install isc-dhcp-server
apt-get install hostapd
修改/etc/network/interfaces
在/etc/dhcp/dhcpd.conf添加
修改/etc/hostapd/hostapd.conf
打開內核的網卡轉發能力,將/etc/sysctl.conf的
[python]
net.ipv4.ip_forward=1
的注釋去掉。
修改iptables的nat規則
[python]
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
將規則添加成為自動啟動方式
[python]
iptables-save > /root/nat.rule
新建/etc/network/if-pre-up.d/iptables
[python]
#!/bin/bash
/sbin/iptables-restore < /root/nat.rule
或者直接在文件里寫入規則語句
如果你的hostapd沒有辦法正常工作,應該是hostapd不支持你的網卡晶元,下載:https://github.com/cnsworder/RTL8188-hostapd/archive/master.zip (2.29M)
在raspberrypi上直接編譯就可以了(編譯速度確實很慢的)
[python]
cd hostapd
make;make install
重新修改hostapd的配置文件就可以了。
❺ 樹莓派3b支持DirectX 9.0嗎想用wine跑點游戲
Stage 1:尋找消失的指令集
對比載入新內核前後樹莓派3B上執行lscpu的輸出:
Before:Architecture: armv7l
...Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32After:Architecture: aarch64
...Flags: fp asimd evtstrm crc32
顯然,有許多指令集莫名消失。
筆者使用的aarch-linux-gnu-工具鏈:
$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/aarch64-linux-gnu/6/lto-wrapperTarget: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-arm64-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-arm64-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-arm64-cross --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-multiarch --enable-fix-cortex-a53-843419 --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=aarch64-linux-gnu --program-prefix=aarch64-linux-gnu- --includedir=/usr/aarch64-linux-gnu/includeThread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18)
筆者遂使用crosstool-ng製作編譯工具鏈,並驚喜地發現:
$ ls /opt/crosstool-ng/samples/aarch64-rpi3-linux-gnueabi
...
crosstool-ng-1.23.0-75-ga9f8a8e6中已添加針對樹莓派3的支持。
於是筆者開始製作工具鏈。
選中了linaro分支的gcc。
並按照與前文相似的方法編譯內核,然而沒有效果,指令集仍未被識別。
後來筆者查閱資料後發現,aarch64是一套全新的指令集,asimd代替了neon。
Stage 2:使用debootstrap製作64位組件
盡管內核工作於64位模式,但系統大多數組件仍舊處於32位模式下。
我們的目標是引入Debian 9 arm64,自然會想到使用debootstrap。
在樹莓派上,給一張SD卡分兩個區:
一個在前面,大小100M左右,使用mkfs.vfat,類型為W95 FAT32
一個佔用後面所有的空間,視/boot/cmdline.txt中rootfstype的設置選擇分區格式
- deb http://mirrors.ustc.e.cn/debian/ stretch maindeb http://mirrors.ustc.e.cn/archive.raspberrypi.org/ jessie main non-free contrib
- sudo mount -t proc proc procsudo mount -t sysfs sysfs syssudo mount -o bind /dev devsudo chroot .
- apt install hostapd wpasupplicant udhcpd screen dnsmasq sudo openssh-server firmware-brcm80211 ...
firmware-brcm80211:使系統識別樹莓派3板載網卡
hostapd,udhcpd,dnsmasq:啟動AP必備
wpasupplicant:用於連接Wifi熱點
openssh-server:SSH伺服器
sudo,screen:這兩個想必大家都聽說過吧……
- /boot/lib/moles/etc/passwd/etc/shadow/etc/sudoers/etc/hostapd/etc/default/etc/udhcpd.conf/etc/udev//etc/dnsmasq.conf
- etc...
- sudo mv /etc/ld.so.preload /etc/ld.so.preload.bak
- sudo touch /etc/ld.so.preload
- Ign:1 https://mirrors.ustc.e.cn/debian stretch InRelease
- Get:2 https://mirrors.ustc.e.cn/archive.raspberrypi.org jessie InRelease [22.9 kB]
- Hit:2 https://mirrors.ustc.e.cn/archive.raspberrypi.org jessie InRelease
- Get:3 https://mirrors.ustc.e.cn/debian stretch Release [113 kB]
- Hit:3 https://mirrors.ustc.e.cn/debian stretch ReleaseCan't locate Storable.pm in @INC (you may need to install the Storable mole) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/aarch64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base) at /usr/bin/apt-show-versions line 37.
- BEGIN failed--compilation aborted at /usr/bin/apt-show-versions line 37.
- Reading package lists... Done
- N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://mirrors.ustc.e.cn/archive.raspberrypi.org jessie InRelease' doesn't support architecture 'arm64'N: Skipping acquire of configured file 'non-free/binary-arm64/Packages' as repository 'https://mirrors.ustc.e.cn/archive.raspberrypi.org jessie InRelease' doesn't support architecture 'arm64'
- N: Skipping acquire of configured file 'contrib/binary-arm64/Packages' as repository 'https://mirrors.ustc.e.cn/archive.raspberrypi.org jessie InRelease' doesn't support architecture 'arm64'N: Skipping acquire of configured file 'ui/binary-arm64/Packages' as repository 'https://mirrors.ustc.e.cn/archive.raspberrypi.org jessie InRelease' doesn't support architecture 'arm64'
- E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
- E: Sub-process returned an error code
然後開干:
sudo debootstrap --verbose --arch=arm64 stretch . https://mirrors.ustc.e.cn/debian/
編輯sources.list:
apt.conf:
APT::Default-Release "stretch";
Chroot和之前的准備工作:
視具體情況安裝軟體包。
退出Chroot環境,復制配置文件及其它核心組件,例如:
註:筆者實際上把整個(除了/etc)64位根文件系統覆蓋到了樹莓派啟動的SD卡上。
成功啟動。
但是有煩人的提示:
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
解決方案顯而易見:
如果你使用了一張新的SD卡,記得編輯/etc/fstab!
Stage 3:站穩腳跟
*執行apt-get update,提示:
筆者嘗試執行sudo apt-get install apt-show-versions,問題解決。
小結
路曼曼其修遠兮,吾將上下而求索。
目前整個系統僅僅只是能用,還有許多不完美的地方。
更新
4.11的內核可以使樹莓派工作得更好,ACT燈和VCHI將正常工作。
Git切換分支:git checkout rpi-4.11.y
❻ 打包android時構建成功,編譯失敗,求幫助
編譯成功只能說明你沒犯常識型錯誤,比如說漏寫 ; 或 " 等等 組建失敗,請仔細檢查程序,看有沒函數拼寫錯誤,注意大小寫等,仔細看下!!
❼ 樹莓派 同時做無線路由器和web伺服器
當然可以,我現在就這么用
hostapd + dnsmasq + iptables實現熱點。
同時用webpy或者bottle之類寫一個web伺服器。
最麻煩是選擇wifi模塊,rtl8188cus的需要自己編譯hostapd,麻煩,最好找能用nl80211驅動的。然後就很簡單了。國外論壇上有個create_ap腳本,自己照著配置一下就好。
最重要的是,usb wifi必須要一個有源隔離的usb hub,我用的是z tek 033。
❽ 系統內的APK 分別是什麼意思
APK(全稱:Android application package,Android應用程序包)是Android操作系統使用的一種應用程序包文件格式,用於分發和安裝移動應用及中間件。
一個Android應用程序的代碼想要在Android設備上運行,必須先進行編譯,然後被打包成為一個被Android系統所能識別的文件才可以被運行,而這種能被Android系統識別並運行的文件格式便是「APK」。
一個APK文件內包含被編譯的代碼文件(.dex 文件),文件資源(resources), 原生資源文件(assets),證書(certificates),和清單文件(manifest file)。
APK 文件基於ZIP文件格式,它與JAR文件的構造方式相似,互聯網媒體類型是:application/vnd.android.package-archive。
(8)hostapd的編譯擴展閱讀:
APK是Android application package的縮寫,即Android安裝包(apk)。APK是類似SymbianSis或Sisx的文件格式。通過將APK文件直接傳到Android模擬器或Android手機中執行即可安裝。
apk文件和sis一樣,把androidsdk編譯的工程打包成一個安裝程序文件,格式為apk。
APK文件其實是zip格式,但後綴名被修改為apk,通過UnZip解壓後,可以看到Dex文件,Dex是DalvikVM executes的簡稱,即Android Dalvik執行程序,並非Java ME的位元組碼而是Dalvik位元組碼。
❾ android怎樣通過代碼打開softap
1,bcm提供專門的wpa_supplicant,hostapd
wpa_supplicant 是開源組織提供,但是對於一些特殊的功能brcm會做些修改。
比如WAPI功能,滿足CMCC要求也是廠家自行修改
2,bcm驅動是不是只支持wext介面
應該不是,默認6.0選用WEXT,8.0使用nl80211
3,支持softap的,client,p2p的驅動是否是三個驅動,還是僅僅firmware不同?
google設計時候對於固件名字是分開的,使用三個名字。但是實際前兩個是同一個固件可以。
4,android4.0中wpa_supplciant_8對nl80211介面還沒完善,有幾個空函數,選擇nl80211介面會編譯錯誤:logo如下:
已經沒有問題了,4.0在hardware/目錄下有bcmdhd的針對私有命令的封裝,需要編譯進去
❿ 我想用hostapd建個熱點.求大神指導下步怎麼操作
hostapd可以直接使用命令安裝,也可以從源碼編譯安裝。這里我使用從hostapd的源碼安裝配置,有兩種下載方式
一是從官方的git倉庫里獲取hostapd最新的開發版
git clone git://w1.fi/srv/git/hostap.git
cd hostap/hostapd
二是從官網下載一個穩定版本,http://w1.fi/hostapd/
wget http://w1.fi/releases/hostapd-2.6.tar.gz
tar xzvf hostapd-2.6.tar.gz
cd hostapd-2.6/hostapd
然後配置hostapd使得其能夠獲得nl80211驅動的支持。復制hostapd目錄下的deconfig文件為.config,並進行編輯。