How to use the phone as WiFi. How to use a smartphone running Android as an external USB modem, Wi-Fi adapter for a computer, as well as Wi-Fi router

28.02.2017 14:44:00

In one of the articles, we considered the question of how to format the Fly phone on Android.

The phone is a multifunctional communication tool, mobile gadget You can use as an intermediate link between the worldwide network and a fixed computer or laptop. Smartphone can be turned into a real modem to access the Internet. The connection is inferior in the speed of fiber-optic communication, however, it will help great if the provider disables the Internet during technical work. To use a gadget as a modem for a computer, there are three ways to connect:

Determine the main concepts on the topic: modem, router and access point.

The modem is a device intended for pairing a signal with a point of its reception. Ten years ago, to connect the computer to the Internet, the signal via the modem was from the wired telephone line. Now the modem decreased to the size of the flash drive. You can turn into a pairing device any phone on android.


The router is a device for parallel connection to a network of several devices: telephone, laptop, PC, tablet. As a router, you can use the same phone, turning it into a modem.


Access point is a basic station for wireless access to existing network, such as WiFi or creating a new one.


Consider how you can configure the modem in the phone and use it as a router.

Method 1: Make a USB modem phone

To do this, you must perform the following actions:

  • Connect the phone to the computer with using USB.-Cabel.
  • Go to Settings, find the section Wireless Networks, select "More".
  • Here, click on the line mode modem.
  • Press the USB modem button.

Do not forget to turn on mobile transmission data. You can do it by lowering the notification curtain on the desktop of the phone and clicking on the appropriate icon.

Other Fly Smartphones
On our site you can find a directory with the rest of Fly smartphones on Android.

Method 2: Move your phone in a wireless WiFi router

In order for the phone to distribute a wifi signal, including several devices, it needs to make an access point. This can be done by following the following:

  • Go to the phone settings.
  • Click on the "More" section
  • Here choose the modem mode.
  • Click on the string "Point access Wi-Fi»
  • Enable Access Points
  • Rewrite or remember the name of the access point and password

Now your phone distributes a wifi signal. You can catch it on any device in which there is an appropriate module.

Advanced users can also change access point settings. Here you can change the following parameters:

  • Network name. By default, this is the name of the phone model.
  • Protection. By default, it is WPA2 PSK. It is better not to change, because this program Provides maximum protection and access control.
  • Password. Here you can set your password from 8 characters.
  • Restore all factory settings
  • Set the number of connected users from 1 to 8 people.

Method 3: Use Bluetooth to connect phone and other devices

The method is considered somewhat obsolete, however, it works great for devices with the Bluetooth module installed. With the help of "Sinnezub" you can connect the phone and laptop. Turn the mobile gadget in Bluetooth modem is very simple:

  • Make sure that the Bluetooth module is installed on a laptop or PC. You can use an external Bluetooth adapter.
  • Go to the phone settings.
  • Press the power button Bluetooth
  • Among available devices Your PC, laptop or other device appears.
  • Select the device for pairing.

Now your phone has turned into a Bluetooth modem.

This procedure can be done and vice versa - from the computer to the phone:

  • Turn on Bluetooth on the phone
  • Go to PC Control Panel
  • Click on viewing devices and printers
  • Click on the "Adding Device" button


When the system finds your phone, click "Add" and enter the code received on the phone.

The optimal way to use the phone as a modem is a wireless connection. The user does not depend on the cable, in addition, the WiFi signal is stable. As a result, you decide.

If you are interested, then you can familiarize yourself with the article about.

We faced the goal: to connect a Wi-Fi adapter to a smartphone based on Android OS. To achieve it, you need to solve two tasks. First, collect drivers of the appropriate Wi-Fi adapter. Second, connect the collected modules to the kernel of the operating system.

The work was carried out on the following equipment:

  • Personal computer with Ubuntu OS 14.04
  • Smartphone Huawei Ascend. Mate 7 Premium with Android OS 4.4.2 (with root rights and installed programs BusyBox and Linux Deploy)
  • Adapter Wi-Fi TP-LINK TLWN-7200ND based on the RALINK RT3070 chip

1 Preparation for assembly

Before approaching the modules directly to the assembly, it is necessary to properly prepare the system. PC, on which we will collect modules running on the X86 architecture processor, while the ARM architecture processor is standing in the smartphone. Therefore, to compile modules, you need to install a special set of packages and programs.

$ sudo apt-get install gcc-arm-linux-androideabi binutils ncurses-devel

Next, you must download the original android operating codes installed on smartphone Huawei.. This can be done in two ways. The source codes can be downloaded from the official website of Huawei. To do this, click on the link and in the downloads section of finding the appropriate device. The second way is to load source code from the repository on GitHub. It is recommended to use the second method, because The source codes laid out on the official website can be inaccessible after some time.

To download the source code from the GitHub repository, enter the command:

$ git clone https://github.com/gabry3795/android_kernel_huawei_mt7_l09

After the download is complete, you can find the source codes in the directory of Android_kernel_huawei_mt7_109, located in the user's home directory.

Before compiling modules, you must also specify the architecture of the target processor and the path to the compiler files:

$ Export Arch \u003d Arm $ Export Cross_Compile \u003d / USR / BIN / ARM-Linux-androideabi

It should be noted that the specified variables will be reset after reboot, so they will need to set again. In order to check environment variables in the system, you must enter the command:

$ Export.

2 Assembling modules

Next, you must specify the kernel configuration. This can be done manually, however, in the source codes there are already ready-made configurations for various processors. In order to view the entire list of configurations, you need to go to the source code directory (hereinafter all the actions will be performed in it) and enter the command

$ Make Help.

As a result, various information on the compilation settings and various configurations will be displayed. An example of such an output can be seen in the following figure.

In the Huawei Ascend Mate 7 PREMIUM smartphone, the KIRIN 925 processor (HISI 3830) is installed. In the list that appears, there is no exactly this processor model, however the Merge_hisi3630_Defconfig configuration is suitable. Loading this configuration is carried out by the command

$ make merge_hisi3630_defconfig

We define the full name of the version of the OS kernel installed on the smartphone. For the Huawei Ascend Mate 7 PREMIUM smartphone (Android 4.4.2), the kernel version is 3.10.30-00001-G57D8D0A-DIRTY. The same version should be at the collected kernel, otherwise the modules will not connect. Open the Makefile configuration file in any text editor and find the following lines there

Version \u003d 3 PATCHLEVEL \u003d 10 sublevel \u003d 30 extraversion \u003d

We see that the version of the loaded kernel coincides up to Extraversion. In order for versions to completely coincide in this string, add -00001-G57D8D0A-Dirty.

Extraversion \u003d -00001-G57D8D0A-DIRTY

You also need the CFLAGS_Module flag to set -fno-PIC.

CFlags_Module \u003d -Fno-Pic

To select those modules that will be compiled conveniently use graphic interface Menuconfig. To do this, enter the command:

$ make menuconfig

The following figure shows the MenuConfig program window.

For the TLWN-7200ND adapter, the following modules must be connected on the RALINK RT3070 chip.

Networking Support -\u003e Wireless -\u003e Generic Ieee Networking Stack (MAC80211)

Letter M means that the driver will be assembled as a separate module.

Device Drivers -\u003e Network Device Support -\u003e Wireless Lan

For the Ralink Drivers Support option set M value, and then go further

Ralink Drivers Support -\u003e

Exhibit the value of options, as shown in the following figure.

Recommended in MENUCONFIG remove flags from modules that do not need drivers. This will speed up the compilation time, because Excess modules will not be collected. After the above operations, you can exit the graphics shell to pre-save the changes. Module assembly starts a team

$ make modules.

After some time, in the case of no errors, the compilation will be successfully completed. Ways to compiled modules:

NET / Wireless / Mac80211 / Mac80211.ko Drivers / NET / Wireless / RT2x00 / RT2X00LIB.ko Drivers / NET / Wireless / RT2x00 / RT2x00USB.ko Drivers / Net / Wireless / RT2x00 / RT2800Lib.ko Drivers / Net / Wireless / RT2x00 / RT2800USB.KO.

Check the information about compiled modules can be the following command

$ modinfo rt2x00usb.ko.

The following figure shows the output of this command.

Attention should be paid to the Vermagic string, which shows for which version of the kernel the module is assembled. It must completely coincide with the version of the core of the OS of the smartphone. Also, pay attention to the Depends string, in which the module's dependencies are indicated, i.e. Other modules that must first be loaded into the kernel for the correct operation of the module.

To work properly, this module requires the firmware file (Firmware) RT2870.bin. You can download it from the official Ralink site.

Copy the collected modules in internal memory Smartphone. On the Huawei Ascend Mate 7 Premium smartphone, copy the modules to the directory

/ SYSTEM / LIB / MODULES

On other smartphones such a directory may not be, so modules can be copied to another directory or, which is more preferable, to create the above directory and transfer the module files into it.

The firmware file RT2870.bin must be copied to the directory with firmware. On the smartphone Huawei.

/ SYSTEM / VENDOR / FIRMWARE

After we copied the modules and firmware, run on the smartphone any terminal emulator application. Commands are introduced into the terminal window (in brackets are explained to the commands, you do not need to enter).

$ SU (input to superuser mode) # CD / SYSTEM / LIB / MODULES (transition to the directory with modules) # chmod 644 module_name (change the rights to the module) # INSMOD MODULE_NAME (loading the module in the OS kernel)

Instead of module_name, we substitute the name of a specific module. For a Wi-Fi adapter, operating on the RALINK RT3070 chip modules must be loaded in the following order:

1. Mac80211.ko 2. RT2x00Lib.ko 3. RT2x00USB.KO 4. RT2800Lib.ko 5. RT2800USB.KO

Archive of all these modules can be downloaded

Check the list of modules connected to the kernel can be commanded

This method of loading modules is not very convenient, because After rebooting the smartphone, it is necessary to connect them again to the kernel. To automate this process, you can create an executable script and use standard applications from the application store Google Play.. For example, the Universal Init.d application allows you to create executable scripts and put them in autoload. Another application that can be used for automatic download Modules is Tasker. It allows you to perform any commands in response to any event.

Not all smartphones support startup scripts from init.d. In particular, Huawei Ascend Mate 7 Premium does not have such an opportunity. When you start the application, you can spend a test that will determine if the smartphone is supported by this option.

If the smartphone allows downloading scripts from init.d, you can do the following. On the PC will create the script of the following content

#! / SYSTEM / BIN / SH INSMOD /SYSTEM/Lib/MODULES/mac80211.ko insmod /system/lib/modules/rt2x00lib.ko insmod /system/lib/modules/rt2x00usb.ko Insmod / System / Lib / Modules / RT2800Lib .ko insmod /system/lib/modules/rt2800usb.ko.

Copy the script to the directory

/System/etc/init.d/

After that, reassign the right to file

$ SU # Chmod 755 /System/etc/init.d/script.sh

where script.sh is the name of the script.

The following figure shows the init.d program interface

In case the smartphone does not support the startup of the scripts from init.d, you can use the Tasker application.

Run Tasker and create a new task

In our case, we will run the script automatically when connecting any USB device to which the Wi-Fi adapter naturally belongs. Select the "Status" menu items -\u003e "Equipment" -\u003e "connected via USB".

Choose Any class

We save the task under any name. Now we need to add an action to the task.

4 Installation Kali Linux on smartphone

To obtain the ability to use the Kali Linux OS on the phone with Android, the Linux Deploy program will be required. It can be downloaded from the store google applications Play. To install the Kali Linux, you must set the following settings in Linux Deploy.

You can also install your username and password instead of default values.

After completing the settings, you need to click "Set" in the top menu and wait for the installation. To start Kali Linux, press the "Start" button on the bottom panel.

To connect to the running OS, you can use the VNC (to enter the graphics shell) or SSH (for entering the console) clients. As a VNC client, we recommend using the VNC Viewer program that can be installed from Google Play. For connecting to SSH, we recommend the juicessh program.

In the VNC Viewer program you need to create a new connection. As an IP address of the node, you must specify the IP address specified in top panel linux programs Deploy. During the connection, you will need to specify the previously set password.

Many happy owners of Android smartphones do not even suspect that their high-tech devices can be used as a complete replacement of a standard USB modem, an external Wi-Fi adapter for a computer, as well as Wi-Fi router. As a rule, customers of smartphones use only 3G or 4G Internet on the phone itself, completely in vain I miss the wonderful opportunity to enjoy all the benefits of high-speed broadband mobile access In the global web, for example, on a laptop.

In order not to miss the opportunity to use 100% traffic of free mobile Internet, which is provided as a gift in most salons. cellular communication All buyers of little expensive gadgets, let's consider all ways to connect an Android smartphone to a computer both using a USB Data cable and without it.

How to connect a smartphone running Android OS as a Wi-Fi router

Perhaps the most interesting use of a smartphone is portable Wi-Fi dot access that implements the opportunity wireless connection other smartphones, tablets, laptops, as well as stationary computers for sharing by mobile Internet. To include mode wireless router It is necessary to do the following manipulations:

  1. go to Settings network connections, as well as translate the Wi-Fi toggle switch to the "Included" position;
  2. find the "Usage of Data" item and activate "Mobile data". To all work, simply install the icon in the form of a green tick in the consulting window;
  3. return to one step back to select the item "Other Networks". Then it is necessary to find the line "Modem and Mobile Access Point" and translate the switch icon to the "Enabled" position. You can then configure SSID, encryption type, as well as a password from Wi-Fi.

How to connect a smartphone to a computer as a 3G (4G) modem

As a rule, the package of any smartphone is supplied chargerwhich is the charging itself and the data cable. It is this cable that we need to use this Android smartphone as a USB modem. Using any non-original USB - Micro USB cables of Chinese production is not recommended, as an unstable work is possible. Therefore, we find the original charging, turn off the DATA cable from it and connect the USB to the computer, and Micro USB to the smartphone. After the smartphone is determined windows systemIt is necessary to make a fairly trivial setting. So, in Android 6 for this, in the "Wireless Network" menu, select the "Modem Mode" item and turn on the "USB modem" function.

How to connect your smartphone as a Wi-Fi adapter

Using the Wi-Fi smartphone adapter, as well as using a built-in module uSB modem, Allows the end user to estimate all the functions of the wired and wireless communication of the Android device fully. It is especially interesting to use an Android smartphone as a Wi-Fi adapter on a stationary computer, as this will allow you to connect a computer not only to the mobile Internet, but to a full-fledged Wi-Fi Router With ADSL modem. It is implemented this idea extremely simple. We connect the DATA-cable smartphone with a computer and configure the phone.

Algorithm Settings Wi-Fi Adapter (on the example of Samsung Galaxy S4 Mini)

  1. Move the Wi-Fi switch to the on position.
  2. Connect to Wi-Fi Router.
  3. Go to "Using Data" and turn off the "Mobile data" by removing the green tick.
  4. Return back to the settings.
  5. Choose the item "Other Networks".
  6. Search for a line "USB modem" and put a tick.

In fact, everything is simple. The main thing is that you do not forget to turn off "Mobile data".

You need to connect a computer to the Internet, and there is no twisted pair or a modem nearby? Or to connect a laptop, but the password is entered on the smartphone? Let's show how to use android phone As a WiFi adapter and serve the Internet through it.

This article is suitable for all brands producing phones on Android 9/8/7/6: Samsung, HTC, Lenovo, LG, Sony, Zte, Huawei, Meizu, Fly, Alcatel, Xiaomi, Nokia and others. We are not responsible for your actions.

Features android phone in Wi-Fi mode adapter

Quite often, users are interested in the question, is it possible in the form of a Wi-Fi adapter for a personal computer to use a phone running on operating system Android. Here it is understood that the smartphone must be connected to wi-Fi network, and in modem mode via USB interface on stationary computer Internet is transmitted.

At the same time, the personal computer does not have a Wi-Fi adapter, so connect directly to wireless networks No opportunity. You can perform this connection.

The modem mode appeared on the Android operating system since the second version. Almost all tablets and phones on this operating system are able to distribute the Internet to other devices via USB cable, Bluetooth and Wi-Fi.

The devices android share can not only with mobile Internet (4G, 3G, edge), but also Wi-Fi. This means that from the smartphone you can make the most real Wi-Fi adapter for a personal computer.

Increase

This feature Very useful. Situations are quite common when after the installation process of the router, the purchase of a personal computer, there is no possibility to stretch to the computer network cable.

Using this feature, it appears the ability to connect to the Internet. Let it be temporarily, but before purchasing an ordinary Wi-Fi adapter you will have access to global Network.

All settings for our instructions were carried out and tested on sAMSUNG smartphone Galaxy J5. On other phones and tablets, where the other version of the Android system is installed, can be slightly different settings. This is not critical in this situation, even novice users will be able to understand the essence of the settings. If you have questions or it is impossible to fulfill all the settings, you can ask in the comments.

It is also worth adding that the Wi-Fi network connection through the smartphone works very quickly and stable. On the computer Internet simply "flies." On many phones manufacturers install excellent wireless modules.

Connecting a computer to the Wi-Fi network through the device Android as an adapter role

First you need to turn off on your smartphone mobile Internet. Then simply turn off the data transfer function using cellular network. This is done just in case to know exactly what the connection via the Wi-Fi interface is applied.

We perform the following steps:

  • Connect the phone used to the Wi-Fi network.
  • Increase
  • With help uSB cable Connect the gadget to the computer. It will be functioning not only in the form of an adapter, but also can be charged.

  • Increase
  • On the smartphone you need to go to "Settings", where you select the "Connection" item. Then you need to go to the "Access and Modem" menu. IN this menu Activate the "USB modem" function. It is necessary for general access for installed Internet Connections on the phone.

  • Increase
  • On the personal Computer Immediately the possibility of access to the Internet with a smartphone on the Android system.

Increase

A one more network adapter is displayed in the system. In our case, it is Ethernet 4. On other computers, the network adapter may be different, but it is not an important point.