Openwrt нет интернета через модем

Устранение неполадок подключения к Интернету

Используйте эти шаги, если вы можете подключиться к веб-графическому интерфейсу вашего маршрутизатора LEDE, но не можете подключиться к более широкому Интернету (например, www.google.com):

Убедитесь, что соединение WAN вашего маршрутизатора (обычно Ethernet) подключено к вашему кабелю/DSL-модему или другому устройству, подключенному к Интернету.

Если эти два адреса находятся в одном диапазоне, например, если они начинаются с одних и тех же трех наборов чисел, то они находятся в одном и том же диапазоне адресов. Вам необходимо изменить адрес интерфейса LAN (см. Следующий шаг).

На странице Сеть → Интерфейсы нажмите кнопку Редактировать рядом с интерфейсом локальной сети.

Введите новый адрес, который отличается от адреса WAN . Например, LAN — адрес после свежей установки LEDE будет “192.168.1.1”. Хорошим альтернативным адресом будет “192.168.2.1”.

Измените поле на новый адрес, затем нажмите Сохранить» и «Применить в нижней части страницы.

Напишите новый адрес на наклейке, которую вы разместили в нижней части маршрутизатора. (Это спасет вас или вашего собеседника в течение нескольких минут в следующий раз, когда вам нужно будет работать на маршрутизаторе.)

После изменения адреса вам нужно будет ввести новый адрес в своем веб-браузере. Вы должны снова получить страницу входа в систему LEDE.

Если вы теперь можете получить доступ к Интернету (например, www.google.com), вы все настроены. Перейдите к Краткому Руководству.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website. OK More information about cookies

Self-registration in the wiki has been disabled.
If you want to contribute to the OpenWrt wiki, please post HERE in the forum or ask on IRC for access.

Except where otherwise noted, content on this wiki is licensed under the following license:
CC Attribution-Share Alike 4.0 International

Источник

How to use LTE modem in QMI mode for WAN connection

Some new 3G/4G dongles use qmi and mbim protocol to establish connection to ISP . For your information, qmi protocol is proprietary protocol by Qualcomm. In contrast to qmi, mbim is more standardized protocol for 3G/4G dongles.

This recipe explains how to setup and configure OpenWrt for using a USB LTE/3g/UMTS-modem for WAN connection, using QMI interface. You may want to checkout the Multiwan package to use this simultaneously with other connections to the internet.

All recent information is valid for Barrier Breaker release and later. Not tested on AA or elder.

Читайте также:  Какая скорость спутникового интернета ростелеком

About

Many modern USB dongles could perform in different ways. If your modem provides only AT command interface — please refer to How to use 3g/UMTS USB Dongle for WAN connection. For more information about different protocols used:

If it is possible to switch your modem to provide NDIS interface — then this article if for YOU.

Add Speed and Performance test results on Modem mode and QMI mode.

Subjective, solution based on NDIS (QMI mode) works much stable. Faster reconnect. Easy to control and monitor.

Modem Preparation

You need to switch modem to provide native NDIS interface instead of Modem interface.

Please read about AT commands for your modem.

Once you’ve done — you can disconnect modem from the PC and connect it to the router.

LTE OR 5G Modem Preparation

More recent Modem default CDC_MBIM OR QMI MODE, This is example for the E20 R2.1, EM05, EM06, EM12, EM20, RM500Q and RM510Q modules

YOU CAN USE AT+QCFG=“usbnet” to CHECK USB Driver

If you want to change the USB MODE, you can set the usbnet value

AT+QCFG=“usbnet”,0 GobiNet or QMI_ WWAN

Router Preparation

Router should be turned on and connected to the Internet to get the needed packages. Please refer to: Internet Connection.

Required Packages

To make use of qmi protocol, package kmod-usb-net-qmi-wwan and uqmi are needed. uqmi is available on both barrier breaker and bleeding edge repository.

usb-modeswitchIt will automatically issue a “special” command to the modem for switching it into the “Working” state

Optional Packages

1. Add support for MBIM devices

opkg update opkg install kmod-usb-net-cdc-mbim umbim

2. Add support for PC Interface (ttyUSB0) — You need it if you want to send AT commands, for eg. to check your balance by USSD.

opkg update opkg install kmod-usb-serial-option kmod-usb-serial kmod-usb-serial-wwan

3. Add support for FlashCard of your dongle — refer to: USB Storage

Installation

1. Install all the needed packages

opkg update opkg install usb-modeswitch kmod-mii kmod-usb-net kmod-usb-wdm kmod-usb-net-qmi-wwan uqmi

If your have not enough space on your device — think of installing Rootfs on External Storage (extroot)

Another option is Hardware memory upgrade. Refer to your router Forum thread for possibility and instructions.

3. Check that everything is OK and You got new device:

ls -l /dev/cdc-wdm0 crw-r--r-- 1 root root 180, 176 Oct 1 12:03 /dev/cdc-wdm0

If you have no such device — try to find out what went wrong:

try dmesg to read kernel logs on USB init

or look info about USB devices and interfaces present in the system:

cat /sys/kernel/debug/usb/devices T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=12d1 ProdID=1506 Rev= 0.00 S: Manufacturer=Huawei Technologies S: Product=HUAWEI Mobile C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 1 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=qmi_wwan E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=2ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=qmi_wwan E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

See Troubleshooting Section of this page for more information.

Читайте также:  Социальные сети гис интернет

Configuration

With LuCi web interface

Install the package luci-proto-qmi using Luci (System → Software) and configure the modem using LuCi (Network → Interfaces).

QMI Protocol Configuration

You can configure UCI manually using uci command line or text editor.
UCI is supporting qmi network protocol configuration.

The package uqmi must be installed to use QMI protocol.

Name Type Required Default Description
device file path yes (none) QMI device node, typically /dev/cdc-wdm0
apn string yes (none) Used APN
auth string no (none) Authentication type: pap, chap, both, none
username string no (none) Username for PAP/CHAP authentication
password string no (none) Password for PAP/CHAP authentication
pincode number no (none) PIN code to unlock SIM card
delay number no 0 Seconds to wait before trying to interact with the modem (some ZTE modems require up to 30 s.)
modes string no (modem default) Allowed network modes, comma separated list of: all, lte, umts, gsm, cdma, td-scdma
pdptype string no IP Used IP -stack mode, IP (for IPv4 ), IPV6 (for IPv6 ) or IPV4V6 (for dual-stack). Some carriers require specific stack or it won’t connect.
profile number no (none) Connection profile to use
dhcp boolean no 1 Whether to use dhcp (default) or uqmi (0) to get IPv4 interface configuration
dhcpv6 boolean no 0 Whether to use dhcp (1) or uqmi (default) to get IPv6 interface configuration
autoconnect boolean no 1
plmn number no (none) First three digits are the mcc (mobile country code) and the last three digits are the mnc (mobile network code), for example if plmn=338020, then the mcc is 338 and the mnc is 020
timeout number no 10 Timeout (in seconds) to wait for SIM operations

Here is a brief help about uqmi command line usage.

No device given Usage: uqmi Options: --single, -s: Print output as a single line (for scripts) --device=NAME, -d NAME: Set device name to NAME (required) --keep-client-id : Keep Client ID for service --release-client-id : Release Client ID after exiting --mbim, -m NAME is an MBIM device with EXT_QMUX support --timeout, -t response timeout in msecs Services: dms, nas, pds, wds, wms Actions: --get-versions: Get service versions --set-client-id ,: Set Client ID for service to (implies --keep-client-id) --get-client-id : Connect and get Client ID for service (implies --keep-client-id) --sync: Release all Client IDs --start-network: Start network connection (use with options below) --apn : Use APN --auth-type pap|chap|both|none: Use network authentication type --username : Use network username --password : Use network password --ip-family : Use ip-family for the connection (ipv4, ipv6, unspecified) --autoconnect: Enable automatic connect/reconnect --profile : Use connection profile --stop-network : Stop network connection (use with option below) --autoconnect: Disable automatic connect/reconnect --get-data-status: Get current data access status --set-ip-family : Set ip-family (ipv4, ipv6, unspecified) --set-autoconnect : Set automatic connect/reconnect (disabled, enabled, paused) --get-current-settings: Get current connection settings --get-capabilities: List device capabilities --get-pin-status: Get PIN verification status --verify-pin1 : Verify PIN1 --verify-pin2 : Verify PIN2 --set-pin1-protection : Set PIN1 protection state (disabled, enabled) --pin : PIN1 needed to change state --set-pin2-protection : Set PIN2 protection state (disabled, enabled) --pin : PIN2 needed to change state --change-pin1: Change PIN1 --pin : Current PIN1 --new-pin : New pin --change-pin2: Change PIN2 --pin : Current PIN2 --new-pin : New pin --unblock-pin1: Unblock PIN1 --puk : PUK needed to unblock --new-pin : New pin --unblock-pin2: Unblock PIN2 --puk : PUK needed to unblock --new-pin : New pin --get-iccid: Get the ICCID --get-imsi: Get International Mobile Subscriber ID --get-imei: Get International Mobile Equipment ID --get-msisdn: Get the MSISDN (telephone number) --reset-dms: Reset the DMS service --set-device-operating-mode Set the device operating mode (modes: online, low_power, factory_test, offline reset, shutting_down, persistent_low_power, mode_only_low_power) --fcc-auth: Set FCC authentication --uim-verify-pin1 : Verify PIN1 (new devices) --uim-verify-pin2 : Verify PIN2 (new devices) --set-network-modes : Set usable network modes (Syntax: [,. ]) Available modes: all, lte, umts, gsm, cdma, td-scdma --set-network-preference : Set preferred network mode to Available modes: auto, gsm, wcdma --set-network-roaming : Set roaming preference: Available modes: any, off, only --network-scan: Initiate network scan --network-register: Initiate network register --set-plmn: Register at specified network --mcc : Mobile Country Code (0 - auto) --mnc : Mobile Network Code --get-plmn: Get preferred network selection info --get-signal-info: Get signal strength info --get-serving-system: Get serving system info --list-messages: List SMS messages --delete-message : Delete SMS message at index --get-message : Get SMS message at index --get-raw-message : Get SMS raw message contents at index --send-message : Send SMS message (use options below) --send-message-smsc : SMSC number --send-message-target : Destination number (required) --send-message-flash: Send as Flash SMS --wda-set-data-format : Set data format (type: 802.3|raw-ip) --wda-get-data-format: Get data format

MBIM Protocol configuration

Currently, there is not enough information about mbim protocol as it’s being actively developed. If you are curious about setting up mbim protocol, you may ask OpenWrt users/devel mailing lists or OpenWrt forum

Here is a brief help about umbim command line.

umbim help Usage: mbim [options] Options: -d the device (/dev/cdc-wdmX) -t the transaction id -n no close -v verbose

Interface configuration

First check that everything works correctly:

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status "disconnected"

Источник

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