3g modem arch linux

Содержание
  1. Mobile broadband modem
  2. Contents
  3. Device identification
  4. Mode switching
  5. From mass storage mode
  6. From router mode
  7. Modem mode
  8. Remove the PIN
  9. Using mmcli
  10. Using AT commands
  11. Connection
  12. ModemManager
  13. NetworkManager
  14. libmbim
  15. wvdial
  16. netctl
  17. Tips and tricks
  18. Disable mode switching
  19. By the configuration file
  20. With a udev rule
  21. AT commands
  22. Monitor used bandwidth
  23. Reading SMS
  24. With dedicated software
  25. With email like web interface
  26. Writing SMS
  27. Commands to restart the device
  28. Troubleshooting
  29. Connection halts after few minutes running
  30. Low connection speed
  31. Fix image quality
  32. ModemManager does not recognize the modem
  33. Arch Linux
  34. #1 2014-05-15 07:46:23
  35. [Solved]How to use 3g USB Modem for installing the ARCH?
  36. #2 2014-05-15 07:52:41
  37. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  38. #3 2014-05-15 08:12:05
  39. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  40. #4 2014-05-16 11:38:37
  41. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  42. #5 2014-05-16 11:47:05
  43. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  44. #6 2014-05-16 13:54:49
  45. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  46. #7 2014-05-16 14:00:55
  47. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  48. #8 2014-05-16 14:01:34
  49. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  50. #9 2014-05-16 15:05:13
  51. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  52. #10 2014-05-18 06:10:13
  53. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  54. #11 2014-05-18 06:22:36
  55. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  56. #12 2014-05-18 13:26:38
  57. Re: [Solved]How to use 3g USB Modem for installing the ARCH?
  58. #13 2014-05-18 22:58:35
  59. Re: [Solved]How to use 3g USB Modem for installing the ARCH?

Mobile broadband modem

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

A number of mobile phone carriers around the world offer internet access via mobile broadband (e.g. LTE, UMTS, EDGE, GSM, etc.).

This article focuses on mobile broadband modems in the format of portable USB devices and mini PCIe cards. For standalone mobile broadband routers, simply connect to them using an interface they provide (e.g. Ethernet or Wi-Fi).

Contents

Device identification

This article or section needs expansion.

Examine the output of:

which will show the vendor and product IDs of the device. Note that some devices will show two different product IDs at different times as explained below.

Mode switching

From mass storage mode

Often these devices will have two modes (1) USB flash memory storage (2) USB modem. The first mode, sometimes known as ZeroCD, is often used to deliver an internet communications program for another operating system and is generally of no interest to Linux users. Additionally some have a slot into which the user can insert an additional flash memory card.

A useful utility for switching these devices into modem mode is usb_modeswitch . It ships with udev rules /usr/lib/udev/rules.d/40-usb_modeswitch.rules that contain entries for many devices, which it will switch to modem mode upon insertion.

When a device is switched, its product ID may change to a different value. The vendor ID will remain unchanged. This can be seen in the output of lsusb .

Some devices are supported in the USB serial kernel module called option (named after the «Option» devices, but not limited to just those) and may be used without usb_modeswitch.

From router mode

This article or section needs expansion.

Depending on the device, it may expose an Ethernet network interface or provide Wi-Fi. In that case you will need to have the interface up. If the device has a DHCP server, you can use a DHCP client to match it. Otherwise, you will have to have some knowledge about the network the device expects. Such information might be obtained from its behavior in another OS. Or by searching the web. Or from the drivers, and other information, stored in the initial USB flash memory storage (ZeroCD). Some Huawei HiLink devices, for example, sometime operate at 192.168.8.0/24, with a gateway at 192.168.8.1. They also might have a web interface at http://192.168.8.1.

Modem mode

In general, at this point you should note if mode switching left you with additional /dev/ttyUSB* serial device and a ww* network interface. You can do that with journalctl or by shell commands such as:

Remove the PIN

First of all use your SIM card in a normal phone and disable the PIN request if present. If the SIM card asks the PIN wvdial will not work.

Failing that, you can use mmcli (provided by modemmanager ) or AT commands, to unlock the SIM card.

Читайте также:  Windows для asus x50vl

Using mmcli

First, list the modems and find the modem’s index:

Look for /org/freedesktop/ModemManager1/Modem/MODEM_INDEX .

Find the SIM card index:

Just as with the modem index, look for primary sim path: /org/freedesktop/ModemManager1/SIM/SIM_INDEX .

Unlock the SIM card:

Remove the requirement for PIN:

Using AT commands

Connection

To connect to the mobile network, use one of the following methods.

This article or section needs expansion.

ModemManager

Use mmcli(1) to communicate with the modem.

The simplest way to establish a connection is to use mmcli’s —simple-connect option.

First, list the modems and find the modem’s index:

Look for /org/freedesktop/ModemManager1/Modem/MODEM_INDEX .

Next connect to the mobile network. For example:

Replace internet.myisp.example with your ISP’s provided APN. If a user name and password is required, set them accordingly:

To disconnect from the mobile network run:

NetworkManager

libmbim

Install libmbim . To bring up the modem you can use mbim-network which is a wrapper for mmcli calls. First create a profile for mbim-network.

Now connect to the network with:

Then follow Network configuration to bring up the ww* interface and get an IP address using DHCP.

pppd can be used to configure 3g connections. Step by step instruction is available on 3G and GPRS modems with pppd. Optionally, pppconfig AUR can be used to simplify the pppd configuration using dialog interface.

wvdial

See main article: wvdial

netctl

Netctl can be used to establish a connection using a USB modem. An example configuration file provided by netctl is located at /etc/netctl/examples/mobile_ppp . Minimally you will probably have to specify

See the netctl article and netctl.profile(5) for more information.

Tips and tricks

Disable mode switching

Some ways to disable usb_modeswitch from operating on a device before the device was inserted, for example to be able to read the initial flash memory (ZeroCD), are:

By the configuration file

With a udev rule

Masking the udev rule the package is using can be achieved with

AT commands

There are some useful commands:

  • AT^U2DIAG=0 — the device is only Modem
  • AT^U2DIAG=1 — device is in modem mode + CD ROM
  • AT^U2DIAG=255 — the device in modem mode + CD ROM + Card Reader
  • AT^U2DIAG=256 — the device in modem mode + Card Reader
  • AT+CPIN=PIN-CODE — enter PIN-code
  • AT+CUSD=1,PDU-encoded-USSD-code,15 — USSD request, result can be found (probably) in /dev/ttyUSB2 .

Encode *100# to PDU format:

Decode AA180C3602 from PDU format:

Answer decoding (this example is balance response: 151.25 ):

Some operators return USSD result in PDU encoding, so you should check proper decoding method.

  • AT+CSQ — get signal quality ( AT+CSQ=? )
  • AT+GMI — get manufacturer
  • AT+GMM — get model
  • AT+GMR — get revision
  • AT+GMN — get IMEI
  • AT+COPS? — get operator info
  • AT^CARDLOCK=»NCK-code» — unlock modem. NCK-code should be calculated by IMEI. After that modem can work with any GSM-provider.
  • AT^SYSCFG=mode, order, band, roaming, domain — System Config
  • 2 Automatic search
  • 13 2G ONLY
  • 14 3G ONLY
  • 16 No change
  • 0 Automatic search
  • 1 2G first, then 3G
  • 2 3G first, then 2G
  • 3 No change
  • 80 GSM DCS systems
  • 100 Extended GSM 900
  • 200 Primary GSM 900
  • 200000 GSM PCS
  • 400000 WCDMA IMT 2000
  • 3FFFFFFF Any band
  • 40000000 No change of band
  • 0 Not supported
  • 1 Roaming is supported
  • 2 No change
  • 0 CS_ONLY
  • 1 PS_ONLY
  • 2 CS_PS
  • 3 ANY
  • 4 No change

Monitor used bandwidth

Frequently a 3G connection obtained via a mobile phone operator comes with restricted bandwidth, so that you are only allowed to use a certain bandwidth per time (e.g. 1GB per month). While it is quite straight-forward to know which type of network applications are pretty bandwidth extensive (e.g. video streaming, gaming, torrent, etc.), it may be difficult to keep an overview about overall consumed bandwidth.

A number of tools are available to help with that. Two console tools are vnstat , which allows to keep track of bandwith over time, and iftop to monitor bandwidth of individual sessions. If you are a KDE user, knemo AUR might help.

The internal web server found in some devices, such as some Huawei HiLink, might also show information about bandwidth usage.

Reading SMS

With dedicated software

This was tested on a Huawei EM770W (GTM382E) 3g card integrated into an Acer Aspire AS3810TG laptop. Install gnokii AUR , then:

Usually the configuration directory is

/.config/gnokii/config as follows:

You may have to use a different port depending on your configuration, for example /dev/ttyUSB1 or something else:

You need to be part of the uucp group to use /dev/ttyUSB0 .

Then launch gnokii:

Click on the «SMS» icon button, a window opens up. Then click: «messages->activate sms reading». Your messages will show up in the window.

Читайте также:  Paste on windows keyboard

Command line script:

A small command line script using gnokii to read SMS on your SIM card (not phone memory) without having to start a GUI:

Granted this does not work very well if your SMS contains the word «Text», but you may adapt the script to your liking.

Another option is to use mmcli

With email like web interface

Some Devices, such as some Huawei HiLink, include an email like web interface for SMS. It is included in the device internal web server, which is used for other purposes too.

Writing SMS

You may need give permission by creating file with content like

Commands to restart the device

Unplugging, and plugging, the device is sometimes used to restart the USB device. The following describes how to do that from the shell. Doing that from the shell might be useful, if, for example, the plug is at the rear side of the PC. The method described is not just for USB modems. It should be good for many other USB devices.

The important part is that the requirements are for the USB bus, and the port, the device is attached to. There could be one, or more, sub ports too. Suppose I obtained bus 2 and port 4, without sub ports, for my device from the output of lsusb -t . This information is also recorded in the journal. With

I can verify it is the intended device.

The following sequence will restart the device:

Troubleshooting

Connection halts after few minutes running

This problem commonly occurs on some modems which locked by a mobile operator. You can successfully connect to the internet but after few minutes connection halts and your modem reboots. That happens because an operator built a some checks into modem firmware so a modem checks if a branded software is running on your pc, but usually that software is Windows-only, and obviously you do not use it. Fix (it works on ZTE-mf190 at least) is simple — send this command through serial port (use minicom or similar soft):

This command will delete a NODOWNLOAD.FLG file in the modem’s filesystem — it will disable such checks.

Another possibility for such disconnections is to help the customer save bandwidth, which might be expensive. With Huawei HiLink devices with a web interface, there might be an option there to set a longer period of inactivity before the connection hangs up.

Low connection speed

Someone claims that the connection speed under Linux is lower than Windows [3]. This is a short summary for possible solutions which are not fully verified.

In most of conditions, the low speed is caused by bad receiver signals and too many people in cell. But you still could use the following method to try to improve the connection speed:

  • QoS parameter can be set with the AT+CGEQMIN and AT+CGEQREQ commands. It should also be possible to decrease and limit the connection speed. Add the following Init command in /etc/wvdial.conf :
  • Baud parameter in /etc/wvdial.conf could be used to increase the connection speed:

It is advisable to see the baud rate set by the official modem application for Windows (possibly 9600 on Vista).

Fix image quality

If you are getting low quality images while browsing the web over a mobile broadband connection with the hints shift+r improves the quality of this image and shift+a improves the quality of all images on this page , follow these instructions:

Edit /etc/tinyproxy/tinyproxy.conf and insert the following two lines:

Configure your browser to use localhost:8888 as a proxy server and you are all done. This is especially useful if you are using, for example, Google Chrome which, unlike Firefox, does not allow you to modify the Pragma and Cache-Control headers.

ModemManager does not recognize the modem

In case ModemManager does not recognize the modem, check the output of:

Источник

Arch Linux

You are not logged in.

#1 2014-05-15 07:46:23

[Solved]How to use 3g USB Modem for installing the ARCH?

I am new to ArchLinux. I tried to install Arch Linux but i was not able to install it on my laptop because of network connectivity problems. While installing the Arch it allows the ethernet and wifi connectivity only, but idont have these mediums of connecting to network. But i have a 3G USB MODEM(HUAWEI E1550) WHICH I USE TO SURF THE INTERNET. Is there anybody who can help me in installing Arch by using 3G USB MODEM?

Читайте также:  Distributed file systems windows

Sorry For My BAD ENGLISH

Last edited by manohar (2014-05-23 05:32:17)

#2 2014-05-15 07:52:41

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

Registered Linux User #482438

#3 2014-05-15 08:12:05

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

Thanxx I WILL TRY THIS

#4 2014-05-16 11:38:37

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

When i am trying this command:

its trying to detect my modem but it fails and its asking for some setserial thing which i didnt understood.

Last edited by manohar (2014-05-16 11:39:11)

#5 2014-05-16 11:47:05

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

its asking for some setserial thing which i didnt understood.

And what’s that? You need to show us to be able to help you. We don’t all understand your smoke signals.

Last edited by Kartious (2014-05-16 11:47:46)

#6 2014-05-16 13:54:49

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

Below is the output of command «wvdialconf /etc/wvdial.conf

Scanning your serial ports for a modem.

ttyS0 : Device or resource busy
Modem Port Scan : S0
ttyS1 : Device or resource busy
Modem Port Scan : S1
ttyS2 : Device or resource busy
Modem Port Scan : S2
ttyS3 : Device or resource busy
Modem Port Scan : S3
ttyUSB0 : Device or resource busy
Modem Port Scan : USB0
ttyUSB1 : Device or resource busy
Modem Port Scan : USB1
ttyUSB2 : Device or resource busy
Modem Port Scan : USB2

Sorry, no modem was detected! Is it in use by another program?
Did you configure it properly with setserial?

#7 2014-05-16 14:00:55

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

And what’s in your /etc/wvdial.conf? (please use [ code ] tags as described here).

Last edited by Trilby (2014-05-16 14:01:59)

«UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

#8 2014-05-16 14:01:34

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

What steps have you taken ?

and again I will say one more, read the Forum Etiquette. all of it. You should put code tags in your posts for the reasons elaborated in the Etiquette.

Last edited by Kartious (2014-05-16 14:01:54)

#9 2014-05-16 15:05:13

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

manohar, read up on the forum rules before you make another post. Respect the rules in order to be helped. The forum is not at your beck and call.

You will be banned if you do not follow the rules. The rules are there for a reason.

There’s no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

#10 2014-05-18 06:10:13

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

manohar, read up on the forum rules before you make another post. Respect the rules in order to be helped. The forum is not at your beck and call.

You will be banned if you do not follow the rules. The rules are there for a reason.

Sorry for my nonsense

Actually i am new to arch forums. Now i have read the rules, i will not do that again.

#11 2014-05-18 06:22:36

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

And now i have decided to install arch linux using bootstrap image by using this guide.

I have successfully entered into chroot and initialised the pacman keyring.
Please tell me what will be my next step either Mount the partitions or Install the base system.

#12 2014-05-18 13:26:38

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

If you dont understand the installation guide then look at the beginners guide, which is much more clear.

Make sure you Partition your disk properly first then use the desired format, mount the desired partitions and then install the base system

Last edited by Kartious (2014-05-18 13:27:48)

#13 2014-05-18 22:58:35

Re: [Solved]How to use 3g USB Modem for installing the ARCH?

If you dont understand the installation guide then look at the beginners guide, which is much more clear.

i followed the Beginners Guide. I tried to install arch for three times using bootstrap image and also by using live cd image. But after running this command:

It just started to download all the packages but when the download was complete it says every package already exists in filesystem.

and when i again tried to install base it gives me following errors:

Last edited by manohar (2014-05-18 23:03:31)

Источник

Оцените статью