How To Install Shaw Wifi Modem
The goal of this commodity is to install latest OpenWRT firmware on a very popular DIR-320 Wi-Fi router (BRCM47XX based). The reason why you might do this is to be able to connect modern hardware(modems) to this pretty old legacy device.
Official firmware 3G modem support listing is pretty limited and uses one-time kernel. On the other hand, there is an alternative DD-WRT firwmare with linux kernel ii.half-dozen.ten which is pretty erstwhile as well. Therefore, the but feasible option is installing OpenWRT which ships the latest linux kernels iii.18.twenty.
As a bonus sub-topic we'll consider setting up an external CDMA(EVDO) modem and using information technology to access cyberspace.
In club to keep and experiment by yourself the post-obit is necessary:
- Dlink DIR-320 router (rev. A1/A2 only!, be careful as there are B1/B2/NRU versions which are completely different hardware!)
- RJ45 CAT5 Patch cable
- USB to Serial adapter (I've been able to successfully use cheap PL2303TA based USB TTL to RS232)
- USB flash card or hard bulldoze
- USB 3G modem (in my instance it's Sierra AirCard 250U)
- USB Hub (external power source is highly recommended)
- x86_64 Linux host system (i'1000 using Ubuntu xv.10 x86_64)
- a lot of patience :)
Install OpenWRT using Image builder for brcm47xx/legacy
On your host linux organisation, download and unpack OpenWRT image builder packages:
bananos@ubby:$ wget "https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm47xx/legacy/OpenWrt-ImageBuilder-15.05.1-brcm47xx-legacy.Linux-x86_64.tar.bz2" bananos@ubby:$ tar -xvvf "OpenWrt-ImageBuilder-fifteen.05.1-brcm47xx-legacy.Linux-x86_64.tar.bz2" After that, we're going to gather our custom firmware out of pre-congenital packages. Image builder was created specifically to overcome the slowness and complexity of compiling OpenWRT from sources.
bananos@ubby:$ sudo apt-become install -y subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc bananos@ubby:$ cd "OpenWrt-ImageBuilder-xv.05.1-brcm47xx-legacy.Linux-x86_64" bananos@ubby:$ make paradigm PROFILE="Broadcom-b43" PACKAGES="base of operations-files libc libgcc busybox kmod-usb2 kmod-usb-ohci kmod-usb-uhci kmod-usb-storage kmod-fs-ext4 block-mount kmod-scsi-core -dropbear mtd uci -opkg netifd fstools swconfig wpad-mini nvram -otrx kmod-leds-gpio kmod-gpio-push-hotplug kmod-ledtrig-default-on kmod-ledtrig-timer kmod-ledtrig-netdev dnsmasq iptables -ip6tables ppp ppp-modern-pppoe kmod-nf-nathelper firewall odhcpd odhcp6c" make[1]: Entering directory '/abode/bananos/Projects/openwrt_dir320/image_builder/OpenWrt-ImageBuilder-15.05.1-brcm47xx-legacy.Linux-x86_64' echo 'Building images for brcm47xx - Broadcom SoC, all Ethernet, BCM43xx WiFi (b43, default)' Edifice images for brcm47xx - Broadcom SoC, all Ethernet, BCM43xx WiFi (b43, default) echo 'Packages: base-files block-mount busybox dnsmasq firewall fstools iptables kernel kmod-b43 kmod-b43legacy kmod-fs-ext4 kmod-gpio-button-hotplug kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-netdev kmod-ledtrig-timer kmod-nf-nathelper kmod-scsi-cadre kmod-usb-ohci kmod-usb-storage kmod-usb-uhci kmod-usb2 libc libgcc mtd netifd nvram odhcp6c odhcpd ppp ppp-modern-pppoe swconfig uci wpad-mini' Packages: base-files block-mountain busybox dnsmasq firewall fstools iptables kernel kmod-b43 kmod-b43legacy kmod-fs-ext4 kmod-gpio-button-hotplug kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-netdev kmod-ledtrig-timer kmod-nf-nathelper kmod-scsi-core kmod-usb-ohci kmod-usb-storage kmod-usb-uhci kmod-usb2 libc libgcc mtd netifd nvram odhcp6c odhcpd ppp ppp-mod-pppoe swconfig uci wpad-mini repeat rm -rf /abode/bananos/Projects/openwrt_dir320/image_builder/OpenWrt-ImageBuilder-xv.05.i-brcm47xx-legacy.Linux-x86_64/build_dir/target-mipsel_mips32_uClibc-0.9.33.two/root-brcm47xx ..... Notation the - symbol earlier some of the packages, this ways that those must exist excluded from resulting build. As a result our target image will have virtually aught except external usb support and blank linux kernel. This is due to really tiny capacity of the internal router storage(4Mb). In gild to increase information technology nosotros'll exist using external USB storage(extroot) which is covered in detail in the next sections of this commodity.
Make sure you have active connection to internet as Epitome Builder volition download some packages from the online repository. At the end of the build, you should be able to detect a agglomeration of prepackaged firmwares in bin/ directory:
bananos@ubby:$ ls bin/brcm47xx/ | grep "asus" openwrt-15.05.1-brcm47xx-legacy-asus-wl-300g-squashfs.trx openwrt-fifteen.05.i-brcm47xx-legacy-asus-wl-320gp-squashfs.trx openwrt-15.05.1-brcm47xx-legacy-asus-wl-330ge-squashfs.trx openwrt-15.05.i-brcm47xx-legacy-asus-wl-500gp-v1-squashfs.trx openwrt-15.05.1-brcm47xx-legacy-asus-wl-500gp-v2-squashfs.trx openwrt-xv.05.i-brcm47xx-legacy-asus-wl-500w-squashfs.trx openwrt-15.05.1-brcm47xx-legacy-asus-wl-520gu-squashfs.trx openwrt-15.05.ane-brcm47xx-legacy-asus-wl-550ge-squashfs.trx openwrt-xv.05.1-brcm47xx-legacy-asus-wl-hdd25-squashfs.trx Our file of interest is openwrt-15.05.1-brcm47xx-legacy-asus-wl-500gp-v2-squashfs.trx since Asus WL500gp-V2 uses the same hardware as Dlink DIR-320 Rev A.
Firmware Flashing
At that place are a lot of firmware flashing instructions on the internet, but we'll be using the most generic and reliable via TFTP. Create the post-obit bash file named flash.sh:
#!/bin/fustigate repeat "==================================================================" echo "This script will upload dd-wrt firmware (firmware.bin)" echo "in the current directory to 192.168.0.1 " echo "during the router's bootup. " echo "" repeat "* Set your ethernet card's settings to: " echo " IP: 192.168.0.10 " echo " Mask: 255.255.255.0 " repeat " Gateway: 192.168.0.1 " echo "* Unplug the router's power cable. " echo "" echo "Press Ctrl+C to abort or any other key to keep... " read repeat "" echo "* Re-plug the router's power cablevision. " echo "" echo "==================================================================" echo "Waiting for the router... Printing Ctrl+C to abort. " echo "" try(){ ping -c 1 -w 1 192.168.0.1 } try while [ "$?" != "0" ] ; practise try done echo "*** Start Flashing **** " atftp --no-source-port-checking -p -fifty firmware.bin 192.168.0.i echo "Firmware successfully loaded!" The script'due south usage instructions are pretty self-explanatory, but before using information technology nosotros must do a few more things:
bananos@ubby:$ chmod +x wink.sh bananos@ubby:$ cp bin/brcm47xx/openwrt-xv.05.one-brcm47xx-legacy-asus-wl-500gp-v2-squashfs.trx firmware.bin bananos@ubby:$ sudo apt-get install -y atftp atftpd Bold that your USB-to-Series adapter was detected every bit /dev/ttyUSB0, permit'south open serial concluding to be able to observe what is happening on the router in existent time:
bananos@ubby:$ sudo bash -c "screen /dev/ttyUSB0 115200" Now, prepare your ethernet network carte du jour settings and
- plug port #1 of your router to linux machine
- run
./flash.shand press any central to come across a lot ofconnect: Network is unreachablemessages - plug router power cable and expect for the flashing procedure to finish
In the serial console y'all'll notice something similar to this:
Decompressing...........done CFE version 1.0.37 for BCM947XX (32bit,SP,LE) Build Date: Thu Jul nineteen 10:53:24 CST 2007 (root@redhat9) Copyright (C) 2000,2001,2002,2003 Broadcom Corporation. Initializing Arena Initializing Devices. Boot partition size = 262144(0x40000) et0: Broadcom BCM47xx ten/100 Mbps Ethernet Controller 4.150.iii.0 CPU type 0x29029: 240MHz Total memory: 32768 KBytes Total memory used by CFE: 0x80300000 - 0x803C0720 (788256) Initialized Data: 0x80337730 - 0x8033AE50 (14112) BSS Expanse: 0x8033AE50 - 0x8033C720 (6352) Local Heap: 0x8033C720 - 0x803A0720 (409600) Stack Area: 0x803A0720 - 0x803C0720 (131072) Text (code) segment: 0x80300000 - 0x80337730 (227120) Boot area (physical): 0x003C1000 - 0x00401000 Relocation Gene: I:00000000 - D:00000000 alpha bootcode ver 0.one.2 cmd = ifconfig eth0 -addr=192.168.0.one -mask=255.255.255.0 We disable the arp for cocky. We disable the arp for self. Device eth0: hwaddr 00-xc-4C-C0-00-01, ipaddr 192.168.0.ane, mask 255.255.255.0 gateway not ready, nameserver not set cmd = go; cmd = load -raw -addr=0x803c0720 -max=0x3a0000 : Loader:raw Filesys:tftp Dev:eth0 File:: Options:(null) Loading: entry point=803C0720 ........... 3674112 bytes read Entry at 0x803c0720 cmd = flash -noheader -mem -size=0x381000 0x803c0720 flash1.trx Reading from 0x803c0720: Programming...done. 3674112 bytes written Dest=80001000, source =803c0720, filename=flash1.trx cmd = kick -raw -z -addr=0x80001000 -max=0x3a0000 flash0.os: Loader:raw Filesys:raw Dev:flash0.os File: Options:(cypher) Loading: entry indicate=80001000 .. 3712 bytes read Entry at 0x80001000 Closing network. Starting program at 0x80001000 [ 0.000000] Linux version 3.18.23 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r48532) ) #1 Tue Mar 1 09:18:44 CET 2022 [ 0.000000] CPU0 revision is: 00029029 (Broadcom BMIPS3300) [ 0.000000] bcm47xx: Using ssb bus [ 0.000000] ssb: Found chip with id 0x5354, rev 0x03 and package 0x00 [ 0.000000] tin non parse nvram name (null)boardnum(zippo) with value got -22 [ 0.000000] can non parse nvram name (nix)rxpo2g(null) with value 0xfff8 got -34 [ 0.000000] ssb: Sonics Silicon Backplane found at address 0x18000000 [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 02000000 @ 00000000 (usable) [ 0.000000] Initrd not institute or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000-0x01ffffff] [ 0.000000] Movable zone kickoff for each node [ 0.000000] Early retention node ranges [ 0.000000] node 0: [mem 0x00000000-0x01ffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff] [ 0.000000] Primary didactics cache 16kB, VIPT, 4-way, linesize 16 bytes. [ 0.000000] Master data cache 16kB, ii-way, VIPT, enshroud aliases, linesize 16 bytes [ 0.000000] Built one zonelists in Zone social club, mobility grouping on. Full pages: 8128 [ 0.000000] Kernel control line: noinitrd console=ttyS0,115200 [ 0.000000] PID hash tabular array entries: 128 (order: -3, 512 bytes) [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Inode-cache hash table entries: 2048 (lodge: 1, 8192 bytes) [ 0.000000] Memory: 28956K/32768K available (2605K kernel lawmaking, 103K rwdata, 316K rodata, 164K init, 267K bss, 3812K reserved) [ 0.000000] NR_IRQS:128 [ 0.000000] MIPS: auto is Unknown Board [ 0.060000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080) [ 0.070000] pid_max: default: 32768 minimum: 301 [ 0.070000] Mount-enshroud hash table entries: 1024 (order: 0, 4096 bytes) [ 0.070000] Mountpoint-cache hash tabular array entries: 1024 (order: 0, 4096 bytes) [ 0.080000] Cyberspace: Registered protocol family unit xvi [ 0.100000] Switched to clocksource MIPS [ 0.110000] Internet: Registered protocol family unit 2 [ 0.110000] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.110000] TCP bind hash table entries: 1024 (society: 0, 4096 bytes) [ 0.110000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.110000] TCP: reno registered [ 0.110000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.110000] UDP-Calorie-free hash table entries: 256 (order: 0, 4096 bytes) [ 0.110000] NET: Registered protocol family unit 1 [ 0.110000] futex hash tabular array entries: 256 (order: -1, 3072 bytes) [ 0.120000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.120000] jffs2: version ii.ii (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.120000] msgmni has been set to 56 [ 0.120000] io scheduler noop registered [ 0.120000] io scheduler deadline registered (default) [ 0.120000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled [ 0.130000] console [ttyS0] disabled [ 0.150000] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3, base_baud = 1562500) is a U6_16550A [ 0.450000] console [ttyS0] enabled [ 0.470000] serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = three, base_baud = 1562500) is a U6_16550A [ 0.490000] physmap platform wink device: 02000001 at 1c000000 [ 0.490000] physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank. Manufacturer ID 0x000001 Chip ID 0x0000f6 [ 0.500000] Amd/Fujitsu Extended Query Tabular array at 0x0040 [ 0.510000] Amd/Fujitsu Extended Query version ane.1. [ 0.510000] physmap-flash.0: Swapping erase regions for top-kicking CFI tabular array. [ 0.520000] number of CFI fries: 1 [ 0.530000] six bcm47xxpart partitions found on MTD device physmap-flash.0 [ 0.540000] Creating 6 MTD partitions on "physmap-wink.0": [ 0.540000] 0x000000000000-0x000000040000 : "boot" [ 0.550000] 0x000000040000-0x0000003f0000 : "firmware" [ 0.560000] 0x00000004001c-0x00000004090c : "loader" [ 0.570000] 0x00000004090c-0x000000146000 : "linux" [ 0.580000] 0x000000146000-0x0000003f0000 : "rootfs" [ 0.580000] mtd: device iv (rootfs) prepare to be root filesystem [ 0.590000] 1 squashfs-split partitions establish on MTD device rootfs [ 0.600000] 0x000000380000-0x0000003f0000 : "rootfs_data" [ 0.600000] 0x0000003f0000-0x000000400000 : "nvram" [ 0.710000] libphy: Fixed MDIO Bus: probed [ 0.710000] b44: Broadcom 44xx/47xx x/100 PCI ethernet driver version 2.0 [ 0.730000] libphy: b44_eth_mii: probed [ 0.850000] b53_common: found switch: BCM5325, rev 0 [ 0.860000] b44 ssb0:0: fastened PHY driver [Broadcom B53 (1)] (mii_bus:phy_addr=1:1e) [ 0.870000] b44 ssb0:0 eth0: Broadcom 44xx/47xx 10/100 PCI ethernet driver 00:90:4c:c0:00:01 [ 0.880000] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (xxx seconds, Software Timer) [ 0.890000] GPIO_WDT: failed to annals misc device [ 0.890000] TCP: cubic registered [ 0.890000] Cyberspace: Registered protocol family 17 [ 0.900000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if yous need this. [ 0.910000] Bridge firewalling registered [ 0.920000] 8021q: 802.1Q VLAN Support v1.8 [ 0.940000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4. [ 0.950000] Freeing unused kernel memory: 164K (802f7000 - 80320000) [ 2.620000] init: Console is live [ 2.630000] init: - watchdog - [ 5.430000] usbcore: registered new interface driver usbfs [ 5.430000] usbcore: registered new interface driver hub [ 5.440000] usbcore: registered new device driver usb [ 5.640000] SCSI subsystem initialized [ 5.670000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 5.680000] ehci-platform: EHCI generic platform driver [ five.680000] ehci-platform ehci-platform.0: EHCI Host Controller [ five.690000] ehci-platform ehci-platform.0: new USB bus registered, assigned passenger vehicle number one [ 5.700000] ehci-platform ehci-platform.0: irq six, io mem 0x18003800 [ 5.730000] ehci-platform ehci-platform.0: USB 2.0 started, EHCI ane.00 [ 5.730000] hub 1-0:1.0: USB hub found [ 5.740000] hub 1-0:1.0: 2 ports detected [ 5.750000] ohci_hcd: USB 1.ane 'Open up' Host Controller (OHCI) Commuter [ 5.760000] ohci-platform: OHCI generic platform driver [ 5.770000] ohci-platform ohci-platform.0: Generic Platform OHCI controller [ v.780000] ohci-platform ohci-platform.0: new USB bus registered, assigned bus number 2 [ 5.790000] ohci-platform ohci-platform.0: irq half-dozen, io mem 0x18003000 [ v.850000] hub two-0:1.0: USB hub found [ 5.860000] hub 2-0:i.0: 2 ports detected [ 5.870000] uhci_hcd: USB Universal Host Controller Interface driver [ v.890000] usbcore: registered new interface commuter usb-storage [ 6.680000] init: - preinit - [ seven.170000] b44 ssb0:0 eth0: Link is up at 100 Mbps, half duplex [ vii.180000] b44 ssb0:0 eth0: Menstruum control is off for TX and off for RX [ vii.460000] random: mktemp urandom read with 11 $.25 of entropy available Printing the [f] key and hit [enter] to enter failsafe style Printing the [1], [2], [three] or [4] fundamental and hit [enter] to select the debug level [ 8.980000] b44 ssb0:0 eth0: Link is Up - 100Mbps/Full - flow control off [ 11.010000] mount_root: loading kmods from internal overlay [ 11.380000] block: attempting to load /etc/config/fstab [ 11.390000] block: unable to load configuration (fstab: Entry not found) [ 11.400000] block: no usable configuration [ xi.400000] mount_root: jffs2 not ready nevertheless, using temporary tmpfs overlay [ xi.460000] b44 ssb0:0 eth0: powering down PHY [ xi.490000] procd: - early - [ xi.500000] procd: - watchdog - [ 12.000000] b44 ssb0:0 eth0: Link is Downwardly [ 12.410000] procd: - ubus - [ 13.430000] procd: - init - Delight press Enter to activate this console. [ 17.510000] Net: Registered protocol family ten [ 17.530000] Loading modules backported from Linux version master-2015-03-09-0-g141f155 [ 17.540000] Backport generated by backports.git backports-20150129-0-gdd4a670 [ 17.560000] nf_conntrack version 0.5.0 (455 buckets, 1820 max) [ 17.670000] xt_time: kernel timezone is -0000 [ 17.730000] cfg80211: Calling CRDA to update world regulatory domain [ 17.740000] ip_tables: (C) 2000-2006 Netfilter Core Squad [ 17.770000] cfg80211: World regulatory domain updated: [ 17.770000] cfg80211: DFS Primary region: unset [ 17.780000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 17.790000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (North/A, 2000 mBm), (N/A) [ 17.800000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz Car), (North/A, 2000 mBm), (North/A) [ 17.810000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (Due north/A, 2000 mBm), (N/A) [ 17.820000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (Northward/A, 2000 mBm), (N/A) [ 17.830000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz Auto), (N/A, 2000 mBm), (0 s) [ 17.840000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s) [ 17.840000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [ 17.850000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) [ eighteen.230000] PPP generic driver version 2.4.ii [ 18.240000] Internet: Registered protocol family 24 [ 18.410000] b43-phy0: Broadcom 5354 WLAN found (cadre revision 13) [ 18.440000] b43-phy0: Institute PHY: Analog 6, Type five (LP), Revision 0 [ 18.450000] b43-phy0: Constitute Radio: Manuf 0x17F, ID 0x2062, Revision 1, Version 0 [ 18.470000] Broadcom 43xx driver loaded [ Features: PNL ] [ xviii.550000] Broadcom 43xx-legacy commuter loaded [ Features: PLD ] [ 26.610000] b44 ssb0:0 eth0: Link is up at 100 Mbps, total duplex [ 26.610000] b44 ssb0:0 eth0: Flow control is off for TX and off for RX [ 28.030000] b44 ssb0:0 eth0: Link is Up - 100Mbps/Full - menstruation control off [ 31.430000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 [ 31.450000] jffs2_build_filesystem(): unlocking the mtd device... washed. [ 31.450000] jffs2_build_filesystem(): erasing all blocks after the end mark... ^[[A^[[A [ 34.450000] b44 ssb0:0 eth0: powering down PHY [ 34.530000] b44 ssb0:0 eth0: Link is up at 100 Mbps, total duplex [ 34.540000] b44 ssb0:0 eth0: Flow command is off for TX and off for RX [ 34.580000] device eth0.one entered promiscuous way [ 34.580000] device eth0 entered promiscuous manner [ 34.600000] br-lan: port ane(eth0.1) entered forwarding state [ 34.610000] br-lan: port 1(eth0.1) entered forwarding state [ 35.830000] washed. [ 35.830000] jffs2: notice: (845) jffs2_build_xattr_subsystem: complete edifice xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 36.610000] br-lan: port one(eth0.ane) entered forwarding land [ 80.480000] random: nonblocking pool is initialized BusyBox v1.23.2 (2016-03-01 08:53:xi CET) built-in shell (ash) _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E Southward Due south F R E Due east D O G ----------------------------------------------------- CHAOS CALMER (xv.05.1, r48532) ----------------------------------------------------- * 1 1/2 oz Gin Shake with a glassful * 1/4 oz Triple Sec of broken water ice and pour * three/4 oz Lime Juice unstrained into a goblet. * 1 1/2 oz Orangish Juice * ane tsp. Grenadine Syrup ----------------------------------------------------- root@OpenWrt:/# Afterward successful flash procedure, reboot your router past powering it off and setting your ethernet network carte back to DHCP (that's necessary because the default router DHCP server assigns addresses in 192.168.1.XXX subnet, which is different from 192.168.0.XXX which we used for flashing purposes)
Turn on the device again and wait until wired connectedness with your host system establishes. After that, you may happily telnet into the router:
bananos@ubby:$ telnet 192.168.one.1 Trying 192.168.i.1... Continued to 192.168.i.1. Escape character is '^]'. === Important ============================ Use 'passwd' to fix your login password this will disable telnet and enable SSH ------------------------------------------ BusyBox v1.23.two (2016-03-01 08:53:11 CET) built-in beat (ash) ..... Congrats! The kickoff, most important step is completed. In the side by side section nosotros'll configure extroot to exist able to install additional OpenWrt packages such equally LuCI and various kernel modules.
Setting upward extroot
Connect your USB drive to linux host system. The first affair we're going to do is partitioning. Assuming that your newly inserted disk is /dev/sdb I would suggest somewhat similar to this:
bananos@ubby:$ sudo fdisk -l /dev/sdb Deejay /dev/sdb: 28 GiB, 30005821440 bytes, 58605120 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel blazon: dos Deejay identifier: 0xa58948b4 Device Boot Offset Terminate Sectors Size Id Type /dev/sdb1 63 2008124 2008062 980.5M 82 Linux bandy / Solaris /dev/sdb2 2008125 6024374 4016250 1.9G 83 Linux /dev/sdb3 6024375 58605119 52580745 25.1G 83 Linux In my case, I'm using 1.8 inch TOSHIBA MK3008GAL difficult drive. To make partitioning tabular array similar to above mentioned you may use GUI tool called GParted or use plain fdisk. Primary partition usage is every bit follows:
-
/dev/sdb1is for swapping purposes due to a low (32Mb) amount of RAM -
/dev/sdb2is for root filesystem (rootfs/) -
/dev/sdb3is for dwelling directory (/habitation)
After partitioning, format rootfs and /home into ext4 filesystems:
bananos@ubby:$ sudo umount /dev/sdb2 bananos@ubby:$ sudo mkfs.ext4 /dev/sdb2 mke2fs ane.42.12 (29-Aug-2014) Creating filesystem with 502031 4k blocks and 125696 inodes Filesystem UUID: 69b17872-9486-4113-8d9f-59a5e4221027 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): washed Writing superblocks and filesystem accounting information: done bananos@ubby:$ sudo umount /dev/sdb3 bananos@ubby:$ sudo mkfs.ext4 /dev/sdb3 .... bananos@ubby:$ sudo mkswap /dev/sdb1 Setting upwards swapspace version 1, size = 980.five MiB (1028120576 bytes) no label, UUID=457a57b6-aae0-410a-8832-4e182e15e04b Now, connect USB bulldoze to your router, plough information technology on, and telnet once once more:
root@OpenWrt:/# logread | grep "sda" Tue Mar ane 08:15:xiii 2022 kern.detect kernel: [ 7.290000] sd 0:0:0:0: [sda] 58605120 512-byte logical blocks: (thirty.0 GB/27.nine GiB) Tue Mar ane 08:15:13 2022 kern.find kernel: [ 7.320000] sd 0:0:0:0: [sda] Write Protect is off Tue Mar 1 08:fifteen:13 2022 kern.debug kernel: [ 7.320000] sd 0:0:0:0: [sda] Way Sense: 03 00 00 00 Tue Mar 1 08:15:xiii 2022 kern.err kernel: [ 7.330000] sd 0:0:0:0: [sda] No Caching way page establish Tue Mar i 08:15:xiii 2022 kern.err kernel: [ 7.330000] sd 0:0:0:0: [sda] Bold drive cache: write through Tue Mar one 08:15:13 2022 kern.info kernel: [ vii.400000] sda: sda1 sda2 sda3 Tue Mar 1 08:15:13 2022 kern.notice kernel: [ 7.440000] sd 0:0:0:0: [sda] Attached SCSI disk We've but used logread to make sure that difficult drive was successfully detected by kernel. Now, allow's continue to creating external rootfs:
root@OpenWrt:/# ls -l /dev/sda brw-r--r-- 1 root root 8, 0 January 1 1970 /dev/sda root@OpenWrt:/# cake detect config 'global' option anon_swap '0' pick anon_mount '0' choice auto_swap '1' selection auto_mount '1' option delay_root 'v' pick check_fs '0' config 'bandy' choice uuid '457a57b6-aae0-410a-8832-4e182e15e04b' option enabled '0' config 'mount' option target '/mnt/sda2' option uuid '69b17872-9486-4113-8d9f-59a5e4221027' option enabled '0' config 'mount' option target '/mnt/sda3' option uuid '37582519-c560-45d3-9a4e-9a95d255b33a' option enabled '0' We've just seen that usb hard drive is present at /dev/sda and has three partitions. Next, we'll create a so-called pivot-overlay:
root@OpenWrt:/# mount /dev/sda2 /mnt ; tar -C /overlay -cvf - . | tar -C /mnt -xf - ; umount /mnt ./ ./.fs_state ./work/ ./work/work/ ./upper/ ./upper/etc/ ./upper/etc/uci-defaults/ ./upper/etc/uci-defaults/11_migrate-sysctl ./upper/etc/uci-defaults/03_network_migration ./upper/etc/uci-defaults/odhcpd.defaults ./upper/etc/uci-defaults/10_migrate-shadow ./upper/etc/uci-defaults/10-fstab ./upper/etc/uci-defaults/12_network-generate-ula ./upper/etc/uci-defaults/09_fix_crc ./upper/etc/config/ ./upper/etc/config/dhcp ./upper/etc/config/fstab ./upper/etc/config/firewall ./upper/etc/config/network ./upper/etc/config/system ./upper/etc/config/wireless ./upper/etc/ethers ./upper/etc/dnsmasq.time The in a higher place mentioned command will mountain /dev/sda2 equally /mnt, then will copy everything from /overlay to /mnt and unmount division. Now, create fstab template:
root@OpenWrt:/# block detect > /etc/config/fstab ; half-dozen /etc/config/fstab Subsequently editing your fstab file it should look similar post-obit:
config 'global' option anon_swap '0' selection anon_mount '0' choice auto_swap '1' option auto_mount 'one' pick delay_root '5' option check_fs '1' config 'swap' choice enabled '1' choice device '/dev/sda1' config 'mount' option target '/overlay' option enabled 'one' option device '/dev/sda2' option fstype 'ext4' option options 'rw,relatime,data=ordered,async,errors=remount-ro' option enabled_fsck '1' config 'mount' choice target '/home' option enabled 'i' option device '/dev/sda3' option fstype 'ext4' option options 'rw,relatime,data=ordered,async,errors=remount-ro' pick enabled_fsck 'one' Don't forget to create /home directory past entering mkdir -p /dwelling house! Now, reboot your router and check that everything was mounted correctly:
root@OpenWrt:/# df -h Filesystem Size Used Available Use% Mounted on rootfs ane.9G two.9M 1.7G 0% / /dev/root 2.3M ii.3M 0 100% /rom tmpfs 14.2M 44.0K 14.2M 0% /tmp /dev/sda2 1.9G 2.9M i.7G 0% /overlay overlayfs:/overlay 1.9G ii.9M 1.7G 0% / tmpfs 512.0K 0 512.0K 0% /dev /dev/sda3 24.6G 43.9M 23.2G 0% /domicile root@OpenWrt:/# swapon -due south Filename Blazon Size Used Priority /dev/sda1 partition 1004024 0 -1 We can see here, that rootfs(/) partition now has 1.7G of free space, and there'south near 998M of bandy. That'southward it! External root filesystem is ready to use. In the next footstep, nosotros'll install opkg package manager, to be able to do something useful with our fresh linux arrangement.
Installation of package manager (opkg)
A bare linux organisation is of no apply if we're not able to install additional software. That's what we'll accomplish in this section. Since we don't take admission to internet(yet) from the router itself, nosotros'll download opkg binary bundle manually and install it on the working system.
Equally an additional option you lot may consider downloading all of the OpenWRT binary packages to newly prepared usb bulldoze if you have enough of complimentary space. That's very useful if in that location will be no access to net from the router itself during spontaneous connectedness failures or maintenance periods.
Re-attach hard bulldoze to linux host system and bold that
/media/bananos/69b17872-9486-4113-8d9f-59a5e4221027 is your /home directory mentioned above, download all packages:
root@ubby:$ cd `/media/bananos/69b17872-9486-4113-8d9f-59a5e4221027` && mkdir repo && cd repo root@ubby:$ wget -r --no-parent --reject "index.html*" "https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm47xx/legacy/packages/" ...... FINISHED --2016-03-31 16:48:54-- Total wall clock fourth dimension: 7m 23s Downloaded: 4508 files, 307M in 2m 9s (2.39 MB/s) This volition download all packages from https://downloads.openwrt.org/chaos_calmer/15.05.1/brcm47xx/legacy/packages/ preserving directory structure. Let's make it more than clean:
root@ubby:$ mv downloads.openwrt.org/chaos_calmer/fifteen.05.1/brcm47xx/legacy/packages/* . root@ubby:$ rm -rf downloads.openwrt.org/ root@ubby:# ls base luci management packages routing telephony Now, let's install opkg manager by copying respective bundle to rootfs:
root@ubby:$ cp base/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-9_brcm47xx.ipk /media/bananos/37582519-c560-45d3-9a4e-9a95d255b33a/opkg.ipk root@ubby:$ cd /media/bananos/37582519-c560-45d3-9a4e-9a95d255b33a/ root@ubby:$ 7z x opkg.ipk seven-Zero [64] ix.20 Copyright (c) 1999-2010 Igor Pavlov 2022-11-18 p7zip Version 9.20 (locale=en_US.UTF-eight,Utf16=on,HugeFiles=on,two CPUs) Processing annal: opkg.ipk Extracting opkg Everything is Ok Size: 71680 Compressed: 64546 root@ubby:$ tar -xvf opkg ./debian-binary ./information.tar.gz ./control.tar.gz root@ubby:$ rm command.tar.gz opkg.ipg debian-binary rm opkg Unplug USB-hdd from host system and replug information technology back to router, run telnet and check that data.tar.gz is at /overlay:
root@OpenWrt:/# ls /overlay/ data.tar.gz etc lost+constitute upper piece of work root@OpenWrt:/# mv /overlay/data.tar.gz / root@OpenWrt:/# tar -xzvf data.tar.gz ./ ./lib/ ./lib/upgrade/ ./lib/upgrade/go on.d/ ./lib/upgrade/keep.d/opkg ./bin/ ./bin/opkg ./usr/ ./usr/lib/ ./usr/lib/opkg/ ./usr/sbin/ ./usr/sbin/opkg-key ./etc/ ./etc/uci-defaults/ ./etc/uci-defaults/20_migrate-feeds ./etc/opkg/ ./etc/opkg/customfeeds.conf ./etc/opkg/distfeeds.conf ./etc/opkg.conf If everything was correct and you extracted tar package directly to / and then it is possible to run opkg itself:
root@OpenWrt:/# opkg --version opkg version 0.1.8 Now, if you take working internet connection it is possible to install boosted OpenWRT packages like LuCI, but nosotros're going to leverage our offline repo we've created above. Open up /etc/opkg/distfeeds.conf and create following file contents:
#src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05.one/brcm47xx/legacy/packages/base of operations #src/gz chaos_calmer_luci http://downloads.openwrt.org/chaos_calmer/15.05.i/brcm47xx/legacy/packages/luci #src/gz chaos_calmer_packages http://downloads.openwrt.org/chaos_calmer/15.05.ane/brcm47xx/legacy/packages/packages #src/gz chaos_calmer_routing http://downloads.openwrt.org/chaos_calmer/15.05.1/brcm47xx/legacy/packages/routing #src/gz chaos_calmer_telephony http://downloads.openwrt.org/chaos_calmer/15.05.one/brcm47xx/legacy/packages/telephony #src/gz chaos_calmer_management http://downloads.openwrt.org/chaos_calmer/15.05.1/brcm47xx/legacy/packages/management src/gz chaos_calmer_base file:///home/repo/base src/gz chaos_calmer_luci file:///domicile/repo/luci src/gz chaos_calmer_packages file:///dwelling house/repo/packages src/gz chaos_calmer_routing file:///home/repo/routing src/gz chaos_calmer_telephony file:///dwelling/repo/telephony src/gz chaos_calmer_management file:///home/repo/management run update process:
root@OpenWrt:/# opkg update Downloading file:///home/repo/base/Packages.gz. Updated list of bachelor packages in /var/opkg-lists/chaos_calmer_base. Downloading file:///home/repo/base/Packages.sig. Signature check passed. Downloading file:///dwelling house/repo/luci/Packages.gz. Updated listing of available packages in /var/opkg-lists/chaos_calmer_luci. Downloading file:///habitation/repo/luci/Packages.sig. Signature check passed. Downloading file:///home/repo/packages/Packages.gz. Updated listing of available packages in /var/opkg-lists/chaos_calmer_packages. Downloading file:///abode/repo/packages/Packages.sig. Signature check passed. Downloading file:///home/repo/routing/Packages.gz. Updated listing of available packages in /var/opkg-lists/chaos_calmer_routing. Downloading file:///domicile/repo/routing/Packages.sig. Signature check passed. Downloading file:///home/repo/telephony/Packages.gz. Updated list of available packages in /var/opkg-lists/chaos_calmer_telephony. Downloading file:///abode/repo/telephony/Packages.sig. Signature bank check passed. Downloading file:///domicile/repo/direction/Packages.gz. Updated list of available packages in /var/opkg-lists/chaos_calmer_management. Downloading file:///home/repo/management/Packages.sig. Signature check passed. Now, it is possible to install any boosted software nosotros similar. For example, let's install nano text editor:
root@OpenWrt:/# opkg install nano Installing nano (2.4.1-i) to root... Downloading file:///domicile/repo/packages/nano_2.4.1-1_brcm47xx.ipk. Installing libncurses (5.9-2) to root... Downloading file:///domicile/repo/base/libncurses_5.nine-2_brcm47xx.ipk. Installing terminfo (5.9-2) to root... Downloading file:///home/repo/base/terminfo_5.9-2_brcm47xx.ipk. Configuring terminfo. Configuring libncurses. Configuring nano. Brand sure internet works
If you have access to an net via LAN cable (i.e. you exercise have some other router running DHCP in your network with internet admission), plug your DIR-320 WAN port into your network. Brand certain, it gets dynamic IP:
root@OpenWrt:/# ifconfig br-lan Link encap:Ethernet HWaddr 00:90:4C:C0:00:01 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fd47:5a3c:26b2::ane/threescore Scope:Global inet6 addr: fe80::290:4cff:fec0:ane/64 Scope:Link Upward Broadcast RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:37 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:3926 (3.viii KiB) eth0.2 Link encap:Ethernet HWaddr 00:90:4C:C0:00:01 inet addr:192.168.0.194 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::290:4cff:fec0:1/64 Scope:Link Upwardly Circulate RUNNING MULTICAST MTU:1500 Metric:1 RX packets:223 errors:0 dropped:0 overruns:0 frame:0 TX packets:104 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:50169 (48.ix KiB) TX bytes:9778 (9.5 KiB) Brand sure that your existing network uses different subnet. Past default, OpenWRT is configured to utilize 192.168.1.X subnet, so you should utilise something like 192.168.0.10 or 192.168.2.X. Verify that yous're able to download content from the internet:
root@OpenWrt:/# wget http://httpbin.org/ip -O /dev/null Connecting to httpbin.org (54.175.219.8:80) cypher 100% |*******************************| 32 0:00:00 ETA If you're non able to get whatever content outside your network, it is most likely a problem with firewall. Ane of the symptoms of this problem is that when you lot issue ping command, there will be following output ping: sendmsg: Functioning non permitted.
To allow all traffic in any direction(don't do this in production environs!), do the post-obit:
root@OpenWrt:/# echo "iptables -P INPUT ACCEPT" >> /etc/firewall.user root@OpenWrt:/# repeat "iptables -P OUTPUT ACCEPT" >> /etc/firewall.user root@OpenWrt:/# repeat "iptables -P Forrard Accept" >> /etc/firewall.user root@OpenWrt:/# /etc/init.d/firewall restart LuCI installation
LuCI is a spider web-based GUI for managing OpenWRT. A lot of essential configuration which is pretty cumbersome to practise via command-line could exist easily made through LuCI.
Before installing LuCI packages I would strongly suggest setting up kmod-zram and zram-swap packages if y'all're not using external HDD swap, only instead rely on slow, fault-prone flash memory. Zram is a special linux kernel module which makes part of your RAM compressed and behave like bandy.
Now, let's proceed:
root@OpenWrt:/# opkg update && opkg install --force-overwrite wget ca-certificates coreutils dropbear root@OpenWrt:/# opkg install ip fdisk usbutils screen htop root@OpenWrt:/# opkg install luci luci-proto-3g luci-proto-ipv6 luci-proto-openconnect luci-proto-ppp luci-proto-relay Later on successfull installation of the to a higher place mentioned packages, reboot and plug your linux host into one of the iv LAN ports of the router. Since LuCI is not yet configured, information technology is not possible to admission it via WAN, therefore we're going to setup information technology from the internal router network. Open up your favorite browser and go to http://192.168.ane.1/cgi-bin/luci
From now on, yous may fully configure your router by setting up root password, enabling Wi-Fi, etc.
3g/CDMA modem configuration
Now, the almost interesting role — how do we connect external CDMA modem to the router and make sure it volition function equally a WAN interface for LAN clients? At the time of this writing, I had in my hands a used Sierra AirCard 250U:
In this role of the article, we're going to setup it to act as an external WAN interface. First off, disconnect ethernet cable from router's WAN port and connect modem. Make sure you're using USB-hub with external power supply, since 3G modems may drain a lot of current from unmarried USB port and you might experience a lot of weird issues.
Open up last console using ssh (telnet should be already disabled if you've configured router's root password):
bananos@ubby:$ ssh root@192.168.i.ane Warning: Permanently added '192.168.ane.1' (RSA) to the list of known hosts. root@192.168.1.1's password: When CDMA modem is powered on, it is possible to see information technology in the list of connected usb devices:
root@OpenWrt:~# lsusb Jitney 001 Device 007: ID 1199:0301 Sierra Wireless, Inc. Bus 001 Device 008: ID 198f:0220 Beceem Communications Inc. BCSM250 WiMAX Adapter Bus 001 Device 004: ID 0424:2512 Standard Microsystems Corp. USB two.0 Hub Passenger vehicle 001 Device 003: ID 05ac:0221 Apple, Inc. Aluminum Keyboard (ISO) Bus 001 Device 005: ID 067b:2506 Prolific Technology, Inc. Kaser 8gB micro difficult drive Coach 002 Device 001: ID 1d6b:0001 Linux Foundation 1.one root hub Bus 001 Device 002: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard Autobus 001 Device 001: ID 1d6b:0002 Linux Foundation ii.0 root hub In this instance I'k using Apple tree Keyboard equally USB hub :) Aricard 250U may actually piece of work in CDMA/WiMax mode, and is detected as two separate devices Sierra Wireless, Inc. and Beceem Communications Inc. BCSM250 WiMAX Adapter. Now, let's search for Sierra support in software packages:
root@OpenWrt:~# opkg update root@OpenWrt:~# opkg list | grep sierra kmod-usb-cyberspace-sierrawireless - 3.xviii.23-1 - Kernel back up for Sierra Wireless devices kmod-usb-serial-sierrawireless - 3.eighteen.23-ane - Kernel support for Sierra Wireless devices Luckily, there is kernel support for Sierra devices and we're going to leverage that! This is exactly the case where modern linux kernel shines in all its beauty. On top of this kernel modules we need to install another generic stuff:
root@OpenWrt:~# opkg install kmod-usb-serial kmod-usb-serial-option kmod-usb-series-wwan kmod-usb-series-ipw root@OpenWrt:~# opkg install comgt usb-modeswitch coreutils-stty root@OpenWrt:~# opkg install kmod-usb-net-sierrawireless kmod-usb-serial-sierrawireless root@OpenWrt:~# reboot Make sure that sierra kernel back up is performance:
root@OpenWrt:~# lsmod | grep sierra sierra 6048 0 sierra_net 5600 0 usbnet 15872 1 sierra_net As this point, we have a serial interface to CDMA modem at /dev/ttyUSB0. Verify that modem responds to AT commands:
root@OpenWrt:~# gcom info -d /dev/ttyUSB0 ##### Wireless WAN Modem Configuration ##### Product text: ==== Manufacturer: Sierra Wireless, Inc. Model: AC250U Rev ii.0 (3) Revision: p3012901,8815 [May 28 2022 14:42:39] QCOM: SWI6085_FP.01.28 BOOT: SWI6085_PP.01.29.01 2022/05/28 18:xiii:46 APPL: SWI6085_PP.01.29.01 2022/05/28 18:13:46 USB VID: 0x1199 PID: 0x0301 ESN: 09612160827 0x60B98F3B +GCAP: +CIS707-A, CIS-856, CIS-856-A, +MS, +ES, +DS, +FCLASS SKU: 0x132BD1 OK ==== Manufacturer: ERROR IMEI and Series Number: 09612160827 Manufacturer's Revision: p3012901,8815 [May 28 2022 14:42:3 Hardware Revision: Network Locked: Customisation: Band settings: ( ) APN: ##### END ##### Now, switch to LuCI and go to Network->Interfaces. Stop WAN6 unless you lot're going to use IPv6 and edit WAN interface.
When editing existing WAN interface, alter Protocol to UMTS/GPRS/EV-Practice, click Switch protocol button and wait for boosted parameters to appear:
On this screen y'all should enter provider specific info (take a look at your contract/prepaid plan details). Since my modem is connected to Ukraine's CDMA Intertelecom my connection parameters are:
-
Protocol: UMTS/GPRS/EV-Exercise -
Modem device: /dev/ttyUSB0 (nosotros've tested to a higher place that it really responds to AT commands) -
Service type: CDMA/EV-Do -
APN: empty -
Pivot: empty -
PAP/CHAP username: It -
PAP/CHAP password: IT -
Dial number: #777
Notation, that your interface will now be named 3g-wan and since in that location is a flag called Bring upward on kicking in the Advanced tab your CDMA connection will be established automatically on power up. To make sure that everything works, open terminal once again:
root@OpenWrt:~# logread | grep -Eastward "chat|ppp" Tue Apr 5 19:38:31 2022 daemon.observe pppd[6810]: pppd 2.4.7 started past root, uid 0 Tue April 5 19:38:32 2022 local2.info chat[6821]: abort on (Busy) Tue Apr 5 19:38:32 2022 local2.info chat[6821]: arrest on (NO CARRIER) Tue Apr 5 xix:38:32 2022 local2.info chat[6821]: abort on (ERROR) Tue Apr 5 19:38:32 2022 local2.info chat[6821]: arrest on (NO Punch TONE) Tue Apr 5 19:38:32 2022 local2.info chat[6821]: abort on (NO ANSWER) Tue April five 19:38:32 2022 local2.info conversation[6821]: abort on (DELAYED) Tue Apr 5 xix:38:32 2022 local2.info conversation[6821]: study (CONNECT) Tue April 5 19:38:32 2022 local2.info conversation[6821]: timeout set to 10 seconds Tue April 5 nineteen:38:32 2022 local2.info chat[6821]: send (AT^Chiliad) Tue Apr 5 19:38:32 2022 local2.info chat[6821]: expect (OK) Tue Apr five nineteen:38:32 2022 local2.info conversation[6821]: AT^M^M Tue Apr v 19:38:32 2022 local2.info chat[6821]: OK Tue April 5 19:38:32 2022 local2.info chat[6821]: -- got it Tue Apr five xix:38:32 2022 local2.info chat[6821]: ship (ATZ^Yard) Tue Apr 5 19:38:33 2022 local2.info conversation[6821]: timeout fix to 30 seconds Tue Apr 5 xix:38:33 2022 local2.info chat[6821]: expect (OK) Tue Apr v 19:38:33 2022 local2.info chat[6821]: ^M Tue April 5 19:38:33 2022 local2.info chat[6821]: ATZ^M^Thousand Tue Apr five 19:38:33 2022 local2.info conversation[6821]: OK Tue Apr five 19:38:33 2022 local2.info chat[6821]: -- got information technology Tue Apr 5 xix:38:33 2022 local2.info chat[6821]: send (ATDT#777^M) Tue Apr 5 19:38:33 2022 local2.info chat[6821]: expect (CONNECT) Tue April 5 19:38:33 2022 local2.info chat[6821]: ^K Tue April five 19:38:33 2022 local2.info chat[6821]: ATDT#777^M^M Tue April 5 nineteen:38:33 2022 local2.info chat[6821]: CONNECT Tue Apr five 19:38:33 2022 local2.info chat[6821]: -- got information technology Tue Apr v 19:38:33 2022 local2.info chat[6821]: ship (^K) Tue Apr 5 19:38:33 2022 daemon.info pppd[6810]: Serial connectedness established. Tue Apr 5 nineteen:38:33 2022 daemon.info pppd[6810]: Using interface 3g-wan Tue Apr five 19:38:33 2022 kern.info kernel: [ 8554.840000] 3g-wan: renamed from ppp0 Tue April 5 19:38:33 2022 daemon.notice pppd[6810]: Connect: 3g-wan < --> /dev/ttyUSB0 Tue Apr 5 nineteen:38:33 2022 daemon.notice pppd[6810]: PAP authentication succeeded Tue Apr five 19:38:33 2022 daemon.notice pppd[6810]: local IP address x.227.181.163 Tue Apr 5 19:38:33 2022 daemon.notice pppd[6810]: remote IP address 172.17.iv.100 Tue Apr 5 19:38:33 2022 daemon.notice pppd[6810]: primary DNS accost 192.168.four.iii Tue April five xix:38:33 2022 daemon.notice pppd[6810]: secondary DNS address 192.168.4.7 Tue Apr 5 twenty:08:32 2022 daemon.info pppd[6810]: LCP terminated past peer Tue Apr 5 20:08:32 2022 daemon.info pppd[6810]: Connect time 30.0 minutes. Tue Apr 5 twenty:08:32 2022 daemon.info pppd[6810]: Sent 826328 bytes, received 547992 bytes. Tue Apr 5 20:08:33 2022 daemon.info pppd[6810]: Terminating on signal fifteen Tue Apr 5 20:08:35 2022 daemon.notice pppd[6810]: Connexion terminated. Tue April five xx:08:36 2022 daemon.discover pppd[6810]: Modem hangup Tue Apr 5 20:08:36 2022 daemon.info pppd[6810]: Exit. Tue April 5 twenty:08:37 2022 daemon.notice pppd[7884]: pppd 2.iv.7 started past root, uid 0 Tue Apr 5 20:08:38 2022 local2.info chat[7896]: abort on (Busy) Tue Apr 5 twenty:08:38 2022 local2.info chat[7896]: abort on (NO CARRIER) Tue Apr 5 20:08:38 2022 local2.info conversation[7896]: abort on (Mistake) Tue April v 20:08:38 2022 local2.info chat[7896]: abort on (NO DIAL TONE) Tue Apr five 20:08:38 2022 local2.info chat[7896]: abort on (NO ANSWER) Tue Apr 5 20:08:38 2022 local2.info conversation[7896]: abort on (DELAYED) Tue April v twenty:08:38 2022 local2.info conversation[7896]: report (CONNECT) Tue Apr v 20:08:38 2022 local2.info conversation[7896]: timeout set to ten seconds Tue April 5 twenty:08:38 2022 local2.info chat[7896]: send (AT^Chiliad) Tue Apr five xx:08:38 2022 local2.info chat[7896]: await (OK) Tue Apr 5 xx:08:38 2022 local2.info chat[7896]: AT^Grand^M Tue Apr 5 xx:08:38 2022 local2.info conversation[7896]: OK Tue Apr 5 20:08:38 2022 local2.info chat[7896]: -- got it Tue April 5 20:08:38 2022 local2.info conversation[7896]: send (ATZ^Thousand) Tue Apr v twenty:08:38 2022 local2.info conversation[7896]: timeout set to 30 seconds Tue Apr five 20:08:38 2022 local2.info conversation[7896]: expect (OK) Tue Apr 5 20:08:38 2022 local2.info chat[7896]: ^K Tue Apr 5 xx:08:38 2022 local2.info chat[7896]: ATZ^Thousand^M Tue Apr 5 20:08:38 2022 local2.info chat[7896]: OK Tue Apr v 20:08:38 2022 local2.info chat[7896]: -- got it Tue Apr 5 xx:08:38 2022 local2.info chat[7896]: send (ATDT#777^1000) Tue Apr 5 20:08:38 2022 local2.info conversation[7896]: expect (CONNECT) Tue Apr 5 twenty:08:38 2022 local2.info chat[7896]: ^M Tue Apr v 20:08:39 2022 local2.info conversation[7896]: ATDT#777^M^Thou Tue April five 20:08:39 2022 local2.info chat[7896]: CONNECT Tue Apr 5 twenty:08:39 2022 local2.info chat[7896]: -- got it Tue Apr 5 20:08:39 2022 local2.info chat[7896]: send (^One thousand) Tue Apr 5 20:08:39 2022 daemon.info pppd[7884]: Serial connection established. These are the logs from pppd daemon and CHAT script, responsible for sending AT commands to modem. Every bit you can run into at that place may be random hangups, but the connectedness is automatically re-established which is very nice.
And when you enter ifconfig control you should see 3g-wan interface too:
root@OpenWrt:~# ifconfig 3g-wan Link encap:Point-to-Point Protocol inet addr:10.227.196.fifty P-t-P:172.17.four.100 Mask:255.255.255.255 Upward POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:one RX packets:977 errors:0 dropped:0 overruns:0 frame:0 TX packets:2117 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:529666 (517.two KiB) TX bytes:324250 (316.6 KiB) In case you're interested in diving deeper into how things piece of work, I'd recommend looking at these files:
-
/etc/config/networkcontains network configuration -
/lib/netifd/proto/3g.shshell logic responsible for runningpppddaemon
Measuring point strength
The last trouble you'll probably stumble upon — is how to mensurate signal forcefulness, especially if you're setting up standalone solution at a remote location with a modem continued to an external antenna. This is usually accomplished by sending special AT command to modem. Note, however, that nigh software and examples over net are targeted towards more pop GRPS/UMTS modems, and they volition probably won't work.
Earlier using serial protocol to communicate with modem, nosotros must shutdown existing 3g-wan connection, because otherwise we'll become cat: read error: Resource temporarily unavailable:
root@OpenWrt:~# ifdown wan Note, that ifdown won't accept 3g-wan as interface, just oddly plenty the above command works. For now, let'southward focus on how to send AT commands to modem:
- run
screen - open ii consoles
In the get-go panel run cat /dev/ttyUSB0 (this is a identify to look for modem replies) and in the 2d run echo -ne "at!status?\r\n" > /dev/ttyUSB0. Switch back consoles and you should encounter something like this:
root@OpenWrt:~# cat /dev/ttyUSB0 at!rssi? -83 OK A range from -threescore dbm to -xc dBm is considered adequate. Using this special AT control you lot may now run it in a loop with modest delay, observe signal strength in the 2d panel and properly adapt external antenna. Likewise, in that location seems to be an unofficial OpenWRT parcel specifically for signal monitoring called 3ginfo, but I've not tried it and not certain if it works for CDMA/EVDO modems.
TL;DR;
Seriously, If yous want to avert all the hassle of setting upwardly CDMA modem and OpenWRT, merely buy yourself a device which combines WiFi router and 3g modem — MiFi volition do merely fine :)
Download openwrt-15.05.i-brcm47xx-legacy-asus-wl-500gp-v2-squashfs.trx (MD5: 420e24e9a042c01585d818c14afa11d3)
Links
- OpenWRT 3g dongle howto
- Using USB EVDO Internet_modem
- Using a 3G USB Modem
- Raspberry pi and 3g sierra wireless 250u
- CDMA AT Commands
- OpenWrt connect to UMTS with Huawei E620 3G USB Modem
- Sierra Wireless model MC8775 PCI Express
- How do i log usb modem AT command output
- gcom datacard control tool
- OpenWRT 3ginfo
- Sending serial commands with repeat vs screen session
Source: http://webapp.org.ua/dev/openwrt-chaos-calmer-15-05-on-dlink-dir-320-with-cdma-modem/
Posted by: triplettcomplatict1968.blogspot.com

0 Response to "How To Install Shaw Wifi Modem"
Post a Comment