Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:wan:wwan:ethernetoverusb_ncm [2023/12/02 12:35] – [Optional Packages] andrewz | docs:guide-user:network:wan:wwan:ethernetoverusb_ncm [2024/11/17 11:17] – [Network configuration] andrewz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Use NCM USB Dongle for WAN connection ====== | ====== Use NCM USB Dongle for WAN connection ====== | ||
| - | {{section> | + | [[http:// |
| - | [[http:// | + | The same applies to external modems connected to USB ports (" |
| - | For more information about different | + | For more information about other protocols |
| * **PPP**, see [[docs: | * **PPP**, see [[docs: | ||
| * **QMI** and **MBIM**, see [[docs: | * **QMI** and **MBIM**, see [[docs: | ||
| + | * **ECM**, see [[docs: | ||
| * **RNDIS**, see [[docs: | * **RNDIS**, see [[docs: | ||
| Line 25: | Line 26: | ||
| ==== Required Packages ==== | ==== Required Packages ==== | ||
| - | To make use of NCM protocol, packages '' | + | To make use of NCM protocol, packages '' |
| - | To access the PC UI Interface (AT Command port) package '' | + | To access the PC UI Interface (AT Command port) package '' |
| ==== Optional Packages ==== | ==== Optional Packages ==== | ||
| Line 37: | Line 38: | ||
| ===== Installation ===== | ===== Installation ===== | ||
| - | 1. Install all the needed packages | + | 1. Install all the needed packages |
| + | |||
| + | * For Huawei modems: | ||
| < | < | ||
| - | opkg update | + | root@OpenWrt: |
| - | opkg install kmod-usb-net-huawei-cdc-ncm kmod-usb-serial-option comgt-ncm luci-proto-ncm | + | root@OpenWrt: |
| </ | </ | ||
| - | :!: If your have not enough space on your device - think of installing [[docs: | + | * other modems may require different packages, this is an example for Mikrotik modems: |
| - | :!: Another option is Hardware memory upgrade. Refer to your router Forum thread for possibility and instructions. | ||
| - | |||
| - | 2. Reboot the router | ||
| < | < | ||
| - | reboot | + | root@OpenWrt: |
| + | root@OpenWrt: | ||
| </ | </ | ||
| - | 3. Check that everything is OK and you got new device: | + | Additional packages will be automatically installed as //dependencies// |
| - | < | + | |
| - | ls -l /dev/cdc-wdm0 | + | |
| - | crw-r--r-- | + | You can also add the necessary packages when building a new image with [[https://firmware-selector.openwrt.org/|Firmware Selector]]. |
| - | </code> | + | |
| - | If you have no such device - try to find out what went wrong: | + | :!: If your have not enough space on your device - think about upgrading your hardware or installing [[docs:guide-user: |
| - | try **dmesg** to read kernel logs on USB init | + | 2. Reboot the router by executing '' |
| + | |||
| + | 3. Check if you got a new //device//: | ||
| < | < | ||
| - | dmesg | + | root@OpenWrt: |
| + | |||
| + | crw-r--r-- | ||
| </ | </ | ||
| - | or look info about USB devices and interfaces present in the system: | ||
| - | < | ||
| - | cat / | ||
| - | ... | + | If there is no such device found, there is a possibility that completely different name is in use by the device driver, like '' |
| + | * Open System Log from Luci web interface and see what it shows regarding newly discovered USB device(s) | ||
| + | * execute '' | ||
| + | * check the details about USB devices detected by the system by running '' | ||
| + | < | ||
| + | [...] | ||
| T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 | T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 | ||
| D: Ver= 2.10 Cls=00(> | D: Ver= 2.10 Cls=00(> | ||
| Line 95: | Line 100: | ||
| E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms | E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms | ||
| E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=125us | E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=125us | ||
| - | |||
| - | ... | ||
| </ | </ | ||
| Line 105: | Line 108: | ||
| [[docs: | [[docs: | ||
| - | :!: The package comgt-ncm + modem specific driver must be installed to use NCM. | + | ^ Name ^ Type |
| - | ^Name ^Type ^Required | + | | device |
| - | |device | + | | apn |
| - | |apn |string | + | | pincode |
| - | |pincode | + | | username |
| - | |username | + | | password |
| - | |password | + | | auth | string |
| - | |auth |string | + | | mode | string |
| - | |mode |string | + | | pdptype |
| - | |pdptype | + | | profile |
| - | |delay | + | | delay |
| - | You can configure | + | You can configure |
| - | :!: If you are using option mode, an AT command | + | :!: If option |
| | | ||
| ==== Network configuration ===== | ==== Network configuration ===== | ||
| - | Now you should | + | |
| + | Using Luci web interface: navigate to Network → Interfaces → Add new interface… → Protocol : NCM, Interface: " | ||
| + | |||
| + | The interface selected above is the "AT Command Port" or " | ||
| + | |||
| + | Enter your APN and select the 'IP Protocol' | ||
| + | |||
| + | Assign the firewall zone (wan) on ' | ||
| + | \\ | ||
| + | Alternatively | ||
| + | |||
| + | * add a new **Interface** | ||
| < | < | ||
| config interface ' | config interface ' | ||
| option proto ' | option proto ' | ||
| - | option | + | option |
| - | option | + | option |
| option apn ' | option apn ' | ||
| - | option mode ' | ||
| - | option pincode ' | ||
| - | option delay ' | ||
| </ | </ | ||
| - | You can do this using the vi text editor, but if you're not comfortable with that, point your browser to 192.168.1.1 again, choose Network -> Interfaces and click Add new interface. | + | * add the same interface name to the " |
| - | + | <code> | |
| - | Write **wwan** as the name of the interface and make it cover the **wwan0** interface. Choose **ncm** as the protocol. | + | config zone |
| - | + | | |
| - | FIXME Insert a screenshot of LUCI add Interface. | + | [...] |
| - | + | list network 'wwan' | |
| - | ==== Firewall configuration ===== | + | </code> |
| - | The only thing that is left - Add **wwan** interface to **WAN zone** | + | |
| - | + | ||
| - | Using LUCI: | + | |
| - | * go to Network -> Firewall, scroll down to wan and click the Edit button | + | |
| - | * add a checkmark to the **wwan** box under Covered networks heading, click **Save & Apply** | + | |
| - | FIXME Insert a Screen Shot from LUCI. | ||
| ==== Additional Info ===== | ==== Additional Info ===== | ||
| Line 164: | Line 169: | ||
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| - | ==== My router is not detecting the dongle. What should I do? ==== | + | ==== My router is not detecting the modem. What should I do? ==== |
| - | Try the following commands: | + | Get the information |
| - | < | + | |
| - | usbmode -l | + | |
| - | </ | + | |
| - | It should respond with a message | + | |
| - | < | + | |
| - | usbmode -s | + | |
| - | </code> | + | |
| - | Then wait for the dongle to get issued an IP from your ISP. | + | |
| - | ==== I have to issue //usbmode -l// and //usbmode -s// every time I reboot my router | + | Find a section for your device, look for " |
| - | Include the following codes into /// | + | S: |
| - | < | + | |
| - | / | + | |
| - | / | + | See if necessary drivers are loaded for your device: |
| - | / | + | |
| - | </code> | + | I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=03 Prot=12 Driver=option |
| + | [...] | ||
| + | | ||
| + | |||
| + | If the drivers are missing, install the missing packages and/or change the operating mode of the modem to expose the necessary interfaces. | ||
| + | Finally, ask in the forum. | ||
| ==== My modem doesn' | ==== My modem doesn' | ||