Android WiFi Port
Two Wi-Fi modules, vt6656 and rt2070, were transplanted on Android 2.2. First, compile the WiFi Linux driver into a module and put the driver (vntwusb. Ko or rt3070sta. KO in/system/lib/modules. Then, make the following changes:
1. Modify init. RC: Many articles have descriptions, but some of them
Tagged with: Android Wi-Fi peer networkWi-Fi peer-to-peer (peer-to-peer network), which allows Android 4.0 with the appropriate hardware (API level 14) or later devices can communicate directly via WiFi without the need for other intermediate transit nodes (Android Wi-Fi peer-to-frame complies with Wi-Fi affiliate Wi-F
This example describes how Android determines the type of network. Share to everyone for your reference, specific as follows:
To determine whether the network type is WiFi, or 3G, or 2G network, different processing of different networks, now will be judged by the method of sorting out for reference
Note: The following data used to move 2G, Unicom 2G, Unicom 3g,wifi
Transplantation of rt2870 USB wifi on mx53 Android platform
There are a lot of porting tutorials for USB wifi on the Linux platform online, but there are few complete tutorials for porting on Android. It took a whole week to transplant this driver, here are the detailed transplant notes for this week.
I. Compile the
:
Wifimanager.setwifienabled (TRUE);
Turn off the WiFi network card
Copy Code code as follows:
Wifimanager.setwifienabled (FALSE);
Get the current status of the NIC:
Copy Code code as follows:
Wifimanager.getwifistate ();
Example code: Because the Android emulator does not support WiFi operations,
(Context.WIFI_SERVICE);WifiConnect wifi = new WifiConnect(wifiManager);wifi.Connect("wifiName", "wifipPassword",WifiCipherType.WIFICIPHER_WPA);
Required Permissions
How to monitor the status of WiFi in Broadcast
Broadcast receiving Class
Package rodar. RGS. conference. utils; import android. content. broadcastreceiver; import
The following statuses are available for wifi:
WIFI_STATE_DISABLED = 1, DisabledWIFI_STATE_DISABLING = 0. Shutting Down...WIFI_STATE_ENABLED = 3, enabledWIFI_STATE_ENABLING = 2, openingWIFI_STATE_UNKNOWN = 4 Unknown Status
Why are there ongoing operations? It takes time to enable or disable a device.
The operation on wifi is to operate the WifiManager class. to operate on
WiFi P2P in Android
WiFi P2P in Android allows devices in a certain range to directly connect to IOT platform through Wifi instead of through hot spots or the Internet.
Need to use WiFi P2PAndroid API Level> = 14And do not forget
Android wifi--System Architecturehttp://blog.csdn.net/myarrow/article/details/81296071. System ArchitectureAndroid WiFi system introduced wpa_supplicant, its entire wifi system with Wpa_supplicant as the core to define the upper user interface and the lower driver interface. The entire
, depending on your settings.5. How to change back to previous status (via USB connection)SetProp service.adb.tcp.port-1 Stop adbd start adbd3. Directly via the ADB after USB connection is set upThis is the simplest method, but the success rate is not high. Let's take a look at how to achieve:ADB tcpip 5555 #让adbd重新启动, and listen port 5555 ADB connect 192.168.0.101:5555Change back to the original state:ADB usbAttentive friends should have found that the command issued through the ADB is user-le
Often asked about the WiFi management under the Android issue, asked about the WiFi operation, below I write how to implement Android-like Android system with WiFi management function steps, through this study, I believe that the
The RE file manager must be installed we need to install a re file manager on the Android phone before we can view the WiFi password.
1. Mobile phone installation re File manager
2. Then we open the phone in the "RE File Manager" below
3. Find/data/misc/wifi in the RE manager as shown in the following figure
4. Then we found wpa_supplicant.conf at
Take the following blog information as a Referrence:
Http://blog.csdn.net/hongjiujing/archive/2010/05/07/5565431.aspx
Android WiFi state: Disabled, disabling, enabled, enabling, unknown.
1. Porting WiFi driver on Android
--> # Create filesystem for WiFi DHCP (add this in
icon and text (activity_wifi_example.xml) to the layout file)[Html]Xmlns: tools = "http://schemas.android.com/tools"Android: layout_width = "match_parent"Android: layout_height = "match_parent"Android: gravity = "center"Android: orientation = "vertical">Android: id = "@ + i
Android automatically connects to the specified wifi, without a password or a specified password, androidwifi
I. Running status
The following is a requirement: "How to connect to the specified password-free WIFI without scanning (no connection before)", so I wrote a Demo, status when the connection is not successful. The first edit box asks the user to enter the
Android gets the wifi list. If you ignore this details, your software may crash. androidwifi
I. Business Description
Recently, the company has a small demand,The user clicks the wifi scan button (Note: The user actively clicks the wifi scan button)The app scans nearby wifi a
Get Network Connection Status
With the spread of 3G and WiFi, more and more Android applications need to invoke network resources, and detection of network connectivity is a necessary feature of network applications.
The Android platform provides a Connectivitymanager class for detection of network connectivity status.
The
Android WiFi usage record and androidwifi record
Recently, I am working on the development of WiFi for Android. The Connection Tool class refers to the tool class in this article.
Http://www.cnblogs.com/zhuqiang/p/3566686.html
Some problems encountered during development are recorded here for some solutions.
1. Identi
Android development scans nearby wifi hotspots and displays the list, androidwifi
The Wi-Fi module has been used in recent projects. Today we will make a simple summary.
Reference: http://www.2cto.com/kf/201310/253617.html1. To obtain a Wi-Fi object and perform operations on the wifi device, you must first obtain Context. getSystemService (Context. WIFI_SERVICE)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.