Only a woman can chat for two hours on the phone, and then ask: “Who am I talking to?” - and find out that the person just got the wrong number.
AT^U2DIAG=256
AT^CVOICE=0
cd /tmp/ wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin mtd -r write /tmp/openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin firmware
passwd vi /etc/config/network
config interface 'lan' option ifname 'eth0' option type 'bridge' option proto 'static' option ipaddr '192.168.5.5' option netmask '255.255.255.0' option gateway '192.168.5.254' list dns '8.8.8.8' list dns '192.168.5.254'
echo /etc/config/ >> /etc/sysupgrade.conf reboot
opkg install kmod-usb-storage block-mount kmod-fs-ext4 kmod-usb-uhci kmod-usb2
opkg install e2fsprogs fdisk
fdisk /dev/sda
mkfs.ext4 /dev/sda1 mount /dev/sda1 /mnt/ tar -C /overlay -cvf - . | tar -C /mnt/ -xvf -
config mount option target /overlay option device /dev/sda1 option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0
- merge overlay components - [ 7.720000] SCSI subsystem initialized [ 7.900000] usbcore: registered new interface driver usbfs [ 7.900000] usbcore: registered new interface driver hub [ 7.910000] usbcore: registered new device driver usb [ 8.410000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 8.420000] ehci-platform ehci-platform: Generic Platform EHCI Controller [ 8.430000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1 [ 8.460000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000 [ 8.480000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00 [ 8.480000] hub 1-0:1.0: USB hub found [ 8.480000] hub 1-0:1.0: 1 port detected [ 8.500000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 8.540000] uhci_hcd: USB Universal Host Controller Interface driver [ 8.600000] Initializing USB Mass Storage driver... [ 8.610000] usbcore: registered new interface driver usb-storage [ 8.610000] USB Mass Storage support registered. [ 8.810000] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 8.970000] scsi0 : usb-storage 1-1:1.3 [ 9.970000] scsi 0:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2 [ 9.980000] sd 0:0:0:0: [sda] Attached SCSI removable disk switching to jffs2 - init -
root@OpenWrt:~# ls /dev/|grep sda sda root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on rootfs 1.3M 1.2M 152.0K 89% / /dev/root 1.5M 1.5M 0 100% /rom tmpfs 14.2M 60.0K 14.1M 0% /tmp tmpfs 512.0K 0 512.0K 0% /dev /dev/mtdblock3 1.3M 1.2M 152.0K 89% /overlay overlayfs:/overlay 1.3M 1.2M 152.0K 89% /
vi /lib/preinit/50_determine_usb_root [ -n "$extroot_settle_time" ] && [ "$extroot_settle_time" -gt 0 ] && { sleep $extroot_settle_time echo -----dirty workaround Huawei gsm dongle cardreader ----- sleep 2 mount /dev/sda /mnt sleep 10 }
- merge overlay components - [ 7.720000] SCSI subsystem initialized [ 7.900000] usbcore: registered new interface driver usbfs [ 7.910000] usbcore: registered new interface driver hub [ 7.920000] usbcore: registered new device driver usb [ 8.420000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 8.420000] ehci-platform ehci-platform: Generic Platform EHCI Controller [ 8.430000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1 [ 8.470000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000 [ 8.490000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00 [ 8.490000] hub 1-0:1.0: USB hub found [ 8.490000] hub 1-0:1.0: 1 port detected [ 8.510000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 8.550000] uhci_hcd: USB Universal Host Controller Interface driver [ 8.620000] Initializing USB Mass Storage driver... [ 8.620000] usbcore: registered new interface driver usb-storage [ 8.630000] USB Mass Storage support registered. [ 8.820000] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 8.980000] scsi0 : usb-storage 1-1:1.3 [ 9.980000] scsi 0:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2 [ 9.990000] sd 0:0:0:0: [sda] Attached SCSI removable disk -----dirty workaround Huawei gsm dongle cardreader ----- [ 30.670000] sd 0:0:0:0: [sda] 3854336 512-byte logical blocks: (1.97 GB/1.83 GiB) [ 30.680000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 30.690000] sda: sda1 [ 41.850000] EXT4-fs (sda1): recovery complete [ 42.130000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) switching to external rootfs - init -
root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on rootfs 1.8G 37.1M 1.7G 2% / /dev/root 1.5M 1.5M 0 100% /rom tmpfs 14.2M 408.0K 13.8M 3% /tmp tmpfs 512.0K 0 512.0K 0% /dev /dev/sda1 1.8G 37.1M 1.7G 2% /overlay overlayfs:/overlay 1.8G 37.1M 1.7G 2% /
ls /dev | grep USB ttyUSB0 ttyUSB1 ttyUSB2
WITH_ASTERISK=asterisk-1.8.3.2
WITH_ASTERISK=asterisk-1.8.10.1
Target System (Atheros AR7xxx/AR9xxx) ---> Target Profile (TP-LINK TL-MR3020) ---> Network ---> asterisk18 (Complete Open Source PBX), v1.8.x ---> <M> asterisk18-chan-dongle..................... Huawei UMTS 3G dongle support
scp attitude_adjustment/bin/ar71xx/packages/asterisk18-chan-dongle_1.1.r10-18_ar71xx.ipk root@192.168.5.5:/overlay/
OpenWrt*CLI> module load chan_dongle.so Unable to load module chan_dongle.so Command 'module load chan_dongle.so' failed. WARNING[1854]: loader.c:777 inspect_module: Module 'chan_dongle.so' was not compiled with the same compile-time options as this version of Asterisk. WARNING[1854]: loader.c:778 inspect_module: Module 'chan_dongle.so' will not be initialized as it may cause instability. WARNING[1854]: loader.c:861 load_resource: Module 'chan_dongle.so' could not be loaded.
opkg install /overlay/asterisk18_1.8.10.1-2_ar71xx.ipk libiconv-full /overlay/asterisk18-chan-dongle_1.1.r10-18_ar71xx.ipk /etc/init.d/asterisk start asterisk -rv OpenWrt*CLI> dongle show devices ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number dongle0 0 Free 22 0 0 Beeline E171 11.126.85.01.143 **********1 2**************** Unknown
Source: https://habr.com/ru/post/170749/
All Articles