Installing OpenWrt on Mikrotik wAP R (RBwAPR-2nD)


#81

Yes, correct.


#82

If anyone has any idea how to get R11e-LTE modem (part of wAP LTE kit bundle) working it would be greatly appreciated. I've tried RNDIS and other options with no luck.

dmesg
[    0.000000] Linux version 4.9.109 (openwrt@ip-10-168-75-30) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7309-333e609703) ) #0 Sat Jun 23 14:06:31 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804a80c4, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: no-uart no-buzzer no-nand parts=1 boot_part_size=16777216 gpio=0 HZ=325000000 mem=64M kmac=64:D1:54:7D:E4:B0 board=wap-lte board=wap-lte ver=3.41 hw_opt=00684001 boot=1 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 59704K/65536K available (3422K kernel code, 149K rwdata, 816K rodata, 212K init, 212K bss, 5832K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:650.000MHz, DDR:600.000MHz, AHB:300.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
[    0.000009] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
[    0.008867] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[    0.071955] pid_max: default: 32768 minimum: 301
[    0.077302] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.084820] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.095506] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.106695] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.114192] NET: Registered protocol family 16
[    0.122889] MIPS: machine is MikroTik RouterBOARD wAP R-2nD
[    0.133534] ar724x-pci ar724x-pci.0: PCIe link is down
[    0.139395] registering PCI controller with io_map_base unset
[    0.393844] PCI host bridge to bus 0000:00
[    0.398509] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    0.406351] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.412673] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.420378] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.429377] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.430162] clocksource: Switched to clocksource MIPS
[    0.437013] NET: Registered protocol family 2
[    0.442753] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.450720] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.457946] TCP: Hash tables configured (established 1024 bind 1024)
[    0.465269] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.471940] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.479302] NET: Registered protocol family 1
[    0.484312] PCI: CLS 0 bytes, default 32
[    0.488345] Crashlog allocated RAM at address 0x3f00000
[    0.495220] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.509168] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.515831] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.534635] io scheduler noop registered
[    0.539086] io scheduler deadline registered (default)
[    0.545319] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.552969] console [ttyS0] disabled
[    0.577156] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.586957] console [ttyS0] enabled
[    0.594512] bootconsole [early0] disabled
[    0.606016] m25p80 spi0.0: found w25q128jv, expected m25p80
[    0.620982] m25p80 spi0.0: w25q128jv (16384 Kbytes)
[    0.626424] Creating 6 MTD partitions on "spi0.0":
[    0.631439] 0x000000000000-0x00000000e000 : "routerboot"
[    0.638328] 0x00000000e000-0x00000000f000 : "hard_config"
[    0.645485] 0x00000000f000-0x000000010000 : "bios"
[    0.651992] 0x000000010000-0x00000001f000 : "routerboot2"
[    0.659063] 0x00000001f000-0x000000020000 : "soft_config"
[    0.666209] 0x000000020000-0x000001000000 : "firmware"
[    0.673442] 2 minor-fw partitions found on MTD device firmware
[    0.679485] 0x000000020000-0x0000001a0000 : "kernel"
[    0.686164] 0x0000001a0000-0x000001000000 : "rootfs"
[    0.692845] mtd: device 7 (rootfs) set to be root filesystem
[    0.698730] 1 squashfs-split partitions found on MTD device rootfs
[    0.705181] 0x000000720000-0x000001000000 : "rootfs_data"
[    0.713204] libphy: Fixed MDIO Bus: probed
[    0.735008] libphy: ag71xx_mdio: probed
[    1.362469] ag71xx-mdio.1: Found an AR934X built-in switch
[    1.416024] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    1.424041] NET: Registered protocol family 10
[    1.431910] NET: Registered protocol family 17
[    1.436554] 8021q: 802.1Q VLAN Support v1.8
[    1.449147] VFS: Mounted root (squashfs filesystem) readonly on device 31:7.
[    1.457673] Freeing unused kernel memory: 212K
[    1.462291] This architecture does not have kernel memory protection.
[    2.063061] init: Console is alive
[    2.066811] init: - watchdog -
[    2.450184] random: fast init done
[    3.294578] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.442934] usbcore: registered new interface driver usbfs
[    3.448710] usbcore: registered new interface driver hub
[    3.454351] usbcore: registered new device driver usb
[    3.466737] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.475074] ehci-platform: EHCI generic platform driver
[    3.480618] ehci-platform ehci-platform: EHCI Host Controller
[    3.486596] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    3.496902] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    3.530193] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    3.537500] hub 1-0:1.0: USB hub found
[    3.541728] hub 1-0:1.0: 1 port detected
[    3.548594] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.556286] ohci-platform: OHCI generic platform driver
[    3.564064] uhci_hcd: USB Universal Host Controller Interface driver
[    3.586947] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.604905] init: - preinit -
[    4.164636] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.298836] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.364504] random: procd: uninitialized urandom read (4 bytes read)
[    5.931589] eth0: link up (1000Mbps/Full duplex)
[    5.936391] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.647313] jffs2: notice: (392) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.664745] mount_root: switching to jffs2 overlay
[    7.709653] urandom-seed: Seeding with /etc/urandom.seed
[    7.804743] eth0: link down
[    7.818712] procd: - early -
[    7.822507] procd: - watchdog -
[    8.555815] random: jshn: uninitialized urandom read (4 bytes read)
[    8.598654] procd: - watchdog -
[    8.653308] procd: - ubus -
[    8.855007] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.879302] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.901474] procd: - init -
[   10.087064] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.098496] tun: Universal TUN/TAP device driver, 1.6
[   10.103790] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   10.112732] Netfilter messages via NETLINK v0.30.
[   10.120274] ip_set: protocol 6
[   10.161103] usbcore: registered new interface driver cdc_wdm
[   10.169313] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   10.177649] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   10.186730] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.201325] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   10.261924] usbcore: registered new interface driver usbserial
[   10.268036] usbcore: registered new interface driver usbserial_generic
[   10.274924] usbserial: USB Serial support registered for generic
[   10.298493] xt_time: kernel timezone is -0000
[   10.305340] usbcore: registered new interface driver cdc_ether
[   10.314759] usbcore: registered new interface driver cdc_ncm
[   10.342779] usbcore: registered new interface driver huawei_cdc_ncm
[   10.390268] usbcore: registered new interface driver qmi_wwan
[   10.401522] rndis_host 1-1:1.0 eth1: register 'rndis_host' at usb-ehci-platform-1, RNDIS device, ac:ff:ff:00:00:00
[   10.412455] usbcore: registered new interface driver rndis_host
[   10.628220] usbcore: registered new interface driver option
[   10.634163] usbserial: USB Serial support registered for GSM modem (1-port)
[   10.660880] ath: EEPROM regdomain: 0x0
[   10.660890] ath: EEPROM indicates default country code should be used
[   10.660893] ath: doing EEPROM country->regdmn map search
[   10.660908] ath: country maps to regdmn code: 0x3a
[   10.660913] ath: Country alpha2 being used: US
[   10.660916] ath: Regpair used: 0x3a
[   10.671740] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.675954] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47
[   10.686760] kmodloader: done loading kernel modules from /etc/modules.d/*
[   18.659147] IPv6: ADDRCONF(NETDEV_UP): br-wan: link is not ready
[   18.739662] br-wan: port 1(eth0) entered blocking state
[   18.739678] br-wan: port 1(eth0) entered disabled state
[   18.740024] device eth0 entered promiscuous mode
[   18.824452] IPv6: ADDRCONF(NETDEV_UP): br-lan_001: link is not ready
[   18.846590] IPv6: ADDRCONF(NETDEV_UP): br-lan_002: link is not ready
[   20.461977] eth0: link up (1000Mbps/Full duplex)
[   20.462029] br-wan: port 1(eth0) entered blocking state
[   20.462038] br-wan: port 1(eth0) entered forwarding state
[   20.473763] IPv6: ADDRCONF(NETDEV_CHANGE): br-wan: link becomes ready
[   21.005056] ath: EEPROM regdomain: 0x833a
[   21.005066] ath: EEPROM indicates we should expect a country code
[   21.005074] ath: doing EEPROM country->regdmn map search
[   21.005079] ath: country maps to regdmn code: 0x37
[   21.005085] ath: Country alpha2 being used: GB
[   21.005088] ath: Regpair used: 0x37
[   21.005094] ath: regdomain 0x833a dynamically updated by user
[   22.751169] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   22.755108] br-lan_001: port 1(wlan0) entered blocking state
[   22.755122] br-lan_001: port 1(wlan0) entered disabled state
[   22.755616] device wlan0 entered promiscuous mode
[   24.697557] device br-lan_001 entered promiscuous mode
[   28.568975] device br-lan_001 left promiscuous mode
[   29.261003] export_store: invalid GPIO 45
[   31.049280] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   31.049483] br-lan_001: port 1(wlan0) entered blocking state
[   31.049494] br-lan_001: port 1(wlan0) entered forwarding state
[   31.052138] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan_001: link becomes ready
[   31.071311] br-lan_002: port 1(wlan0-1) entered blocking state
[   31.071328] br-lan_002: port 1(wlan0-1) entered disabled state
[   31.071719] device wlan0-1 entered promiscuous mode
[   31.073378] IPv6: ADDRCONF(NETDEV_UP): wlan0-1: link is not ready
[   31.073405] br-lan_002: port 1(wlan0-1) entered blocking state
[   31.073414] br-lan_002: port 1(wlan0-1) entered forwarding state
[   31.073905] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan_002: link becomes ready
[   32.220593] br-lan_002: port 1(wlan0-1) entered disabled state
[   32.246707] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   32.246907] br-lan_002: port 1(wlan0-1) entered blocking state
[   32.246918] br-lan_002: port 1(wlan0-1) entered forwarding state
[   71.650082] random: crng init done
[   71.650098] random: 6 urandom warning(s) missed due to ratelimiting
[  104.855604] device br-lan_001 entered promiscuous mode
cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  1, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.09
S:  Manufacturer=Linux 4.9.109 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=ehci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2cd2 ProdID=0001 Rev= 1.00
S:  Manufacturer=MikroTik
S:  Product=R11e-LTE
S:  SerialNumber=000000000000
C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
A:  FirstIf#= 2 IfCount= 2 Cls=02(comm.) Sub=02 Prot=01
A:  FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=02 Prot=01
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E:  Ad=8c(I) Atr=03(Int.) MxPS=  16 Ivl=4096ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0d(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none)
E:  Ad=84(I) Atr=03(Int.) MxPS=  16 Ivl=4096ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=4096ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
lsusb
Bus 001 Device 002: ID 2cd2:0001  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Wireless, Driver=rndis_host, 480M
    |__ Port 1: Dev 2, If 1, Class=CDC Data, Driver=rndis_host, 480M
    |__ Port 1: Dev 2, If 2, Class=Communications, Driver=, 480M
    |__ Port 1: Dev 2, If 3, Class=CDC Data, Driver=, 480M
    |__ Port 1: Dev 2, If 4, Class=Communications, Driver=, 480M
    |__ Port 1: Dev 2, If 5, Class=CDC Data, Driver=, 480M
    |__ Port 1: Dev 2, If 6, Class=Mass Storage, Driver=, 480M

Noticed this topic suggesting the modem is EHCI - https://forum.mikrotik.com/viewtopic.php?t=128484


#83

Modem is USB. Install also kmod-usb-acm, use /dev/ttyACM1 as device.
Connect:

AT+CFUN=4
AT*CGDFLT=0,"IP","$APN",,,,,,,,,,,,,,,,,,1 or AT*CGDFLT=0,"IP","$APN",,,,,,,,,,1,0,,,,,,,1
AT+CFUN=1
__wait for +CGEV: EPS PDN ACT <profile>

Disconnect:
AT+CFUN=0

Also:
technology:
*2G only
AT*BAND=0,79,147,480,589829,0,2,0
*3G only
AT*BAND=1,79,147,480,589829,0,2,0
*4G only
AT*BAND=5,79,147,480,589829,0,2,0
*4G + 3G
AT*BAND=11,79,147,480,589829,0,2,0
*3G + 2G
AT*BAND=1,79,147,480,589829,0,2,0

Band:
*band1
AT*BAND=15,79,147,0,1,0,2,0
*band3
AT*BAND=15,79,147,0,4,0,2,0
*band7
AT*BAND=15,79,147,0,64,0,2,0
*band 20
AT*BAND=15,79,147,0,524288,0,2,0
*band 3+7
AT*BAND=15,79,147,0,68,0,2,0
*band 1+20
AT*BAND=15,79,147,0,524289,0,2,0
*band 1+3+7+20
AT*BAND=15,79,147,0,524357,0,2,0
*all
AT*BAND=15,79,147,480,589829,0,2,0


#84

Only mystery is control LED.

Are there any devices in this family with two SIM card slots? I wonder if this GPIO pin could be used to toggle between them.


#85

I have not seen one, but it could be that it has not yet been released.
I configured the signal strength bar to display WiFi strength as I am not aware of a RSSI trigger.


#87

Do you actually have the R11e modem working with OpenWRT? If so I wonder you can point me in the right direction:

network:

config interface 'wwan'
        option proto '3g'
        option device '/dev/ttyACM1'
        option service 'umts_only'
        option ipv6 'auto'
        option delegate '0'
        option apn 'wap.vodafone.co.uk'
        option username 'wap'
        option password 'wap'

firewall:

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option network 'wan wwan'
root@OpenWrt:/etc/chatscripts# cat 3g.chat 
ABORT   BUSY
ABORT   'NO CARRIER'
ABORT   ERROR
REPORT  CONNECT
TIMEOUT 10
""      "AT&F"
OK      'AT+CFUN=0'
OK      'AT*BAND=5,79,147,480,589829,0,2,0'
OK      'AT+CFUN=4'
'+CPIN: READY'  'AT*CGDFLT=0,"IP","$USE_APN",,,,,,,,,,,,,,,,,,1'
OK      'AT+CFUN=1'
'+CGEV: EPS PDN ACT 5'  'AT+CGDCONT?'
OK      'AT+CGCONTRDP=5'
OK       'ATDT*99#'
CONNECT ' '

And the chat log is.....:

Wed Jun 27 21:25:05 2018 daemon.notice netifd: Interface 'wwan' is now down
Wed Jun 27 21:25:05 2018 daemon.notice netifd: Interface 'wwan' is setting up now
Wed Jun 27 21:25:07 2018 daemon.notice pppd[2458]: pppd 2.4.7 started by root, uid 0
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: abort on (BUSY)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: abort on (NO CARRIER)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: abort on (ERROR)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: report (CONNECT)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: timeout set to 10 seconds
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: send (AT&F^M)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: expect (OK)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: AT&F^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: OK
Wed Jun 27 21:25:08 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: send (AT+CFUN=0^M)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: expect (OK)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: AT+CFUN=0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^SRVST: 0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: +CREG: 0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: +CGEV: ME DETACH^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^SIMST: 0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: +MMSG: 1, 0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: +CPIN: SIM REMOVED^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^CARDMODE: 255^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^SIMST: 255,0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: OK
Wed Jun 27 21:25:08 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: send (AT*BAND=5,79,147,480,589829,0,2,0^M)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: expect (OK)
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: AT*BAND=5,79,147,480,589829,0,2,0^M
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: OK
Wed Jun 27 21:25:08 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:08 2018 local2.info chat[2459]: send (AT+CFUN=4^M)
Wed Jun 27 21:25:09 2018 local2.info chat[2459]: expect (+CPIN: READY)
Wed Jun 27 21:25:09 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: AT+CFUN=4^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: OK^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: ICCID: 89441000300322230115^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: ^SIMST: 0^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: +MSTK: 11, D0750103032500020281820508566F6461666F6E650F0D014D7920566F6461666F6E6
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: 52B0F0A024D79204E756D6265720F0D034D656E75205072696365732B0F070453706F72742B0F0E0
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: 54E65777326576561746865722B0F0F06456E7465727461696E6D656E742B0F0C07486F726F73636
Wed Jun 27 21:25:13 2018 local2.info chat[2459]: F7065732B^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: +CPIN: READY
Wed Jun 27 21:25:14 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: send (AT*CGDFLT=0,"IP","wap.vodafone.co.uk",,,,,,,,,,,,,,,,,,1^M)
Wed Jun 27 21:25:14 2018 kern.notice kernel: [   57.670437] random: crng init done
Wed Jun 27 21:25:14 2018 kern.notice kernel: [   57.673968] random: 6 urandom warning(s) missed due to ratelimiting
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: expect (OK)
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^SIMST: 1^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: +MSTK: 14^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: +CPIN: READY^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:14 2018 local2.info chat[2459]: ^SIMST: 1^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: AT*CGDFLT=0,"IP","wap.vodafone.co.uk",,,,,,,,,,,,,,,,,,1^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: OK
Wed Jun 27 21:25:15 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: send (AT+CFUN=1^M)
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: expect (+CGEV: EPS PDN ACT 5)
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: AT+CFUN=1^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: ^SRVST: 0^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: +CREG: 2^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: +CEREG: 2^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: OK^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:15 2018 local2.info chat[2459]: +MMSG: 2, 0^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: +NITZ: 18/06/27,21:25:16+4,1^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^SRVST: 2^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: +CREG: 1^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: +CEREG: 1,"182e","0021e30e",7^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: +CGEV: EPS PDN ACT 5
Wed Jun 27 21:25:16 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: send (AT+CGDCONT?^M)
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: expect (OK)
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: AT+CGDCONT?^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: +CGDCONT: 5,"IP","wap.vodafone.co.uk.mnc015.mcc234.gprs","10.12.173.213",,,000d0
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: 40acb8001000d040acb80018021100301001081060acb800183060acb8001,^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: OK
Wed Jun 27 21:25:16 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: send (AT+CGCONTRDP=5^M)
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: expect (OK)
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: AT+CGCONTRDP=5^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: +CGCONTRDP: 5,5,"wap.vodafone.co.uk.mnc015.mcc234.gprs","10.12.173.213","","","1
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: 0.203.128.1","","","","0","0"^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: ^M
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: OK
Wed Jun 27 21:25:16 2018 local2.info chat[2459]:  -- got it
Wed Jun 27 21:25:16 2018 local2.info chat[2459]: send (^M)
Wed Jun 27 21:25:16 2018 daemon.info pppd[2458]: Serial connection established.
Wed Jun 27 21:25:16 2018 kern.info kernel: [   59.501598] 3g-wwan: renamed from ppp0
Wed Jun 27 21:25:16 2018 daemon.info pppd[2458]: Using interface 3g-wwan
Wed Jun 27 21:25:16 2018 daemon.notice pppd[2458]: Connect: 3g-wwan <--> /dev/ttyACM1
Wed Jun 27 21:25:47 2018 daemon.warn pppd[2458]: LCP: timeout sending Config-Requests
Wed Jun 27 21:25:47 2018 daemon.notice pppd[2458]: Connection terminated.
Wed Jun 27 21:25:47 2018 daemon.warn pppd[2458]: Receive serial link is not 8-bit clean:
Wed Jun 27 21:25:47 2018 daemon.warn pppd[2458]: Problem: all had bit 7 set to 0
Wed Jun 27 21:25:48 2018 daemon.notice pppd[2458]: Modem hangup
Wed Jun 27 21:25:48 2018 daemon.info pppd[2458]: Exit.

split this topic #88

A post was split to a new topic: Support for MikroTik RBSXTR


#89

This connection looks like ncm - you can speak with modem on /dev/ttyACM1, and after connection you can obtain ip on normal interface (eth1). So:
manually: run udhcpc on eth1
or make custom proto or add new modem to ncm.


#90

Thanks! After adding this to network config:

config interface 'wwan0'
        option proto 'dhcp'
        option ifname '3g-wwan'

I am getting the following in the logs. Do you believe the chat script is correct as per your syntax? I am not getting the CONNECT, maybe I shouldn't.

Thu Jun 28 10:55:35 2018 daemon.info pppd[14956]: Serial connection established.
Thu Jun 28 10:55:35 2018 daemon.notice netifd: Interface 'wwan0' is enabled
Thu Jun 28 10:55:35 2018 daemon.notice netifd: Network device '3g-wwan' link is up
Thu Jun 28 10:55:35 2018 daemon.notice netifd: Interface 'wwan0' has link connectivity
Thu Jun 28 10:55:35 2018 daemon.notice netifd: Interface 'wwan0' is setting up now
Thu Jun 28 10:55:35 2018 kern.info kernel: [ 2834.382561] 3g-wwan: renamed from ppp0
Thu Jun 28 10:55:35 2018 daemon.info pppd[14956]: Using interface 3g-wwan
Thu Jun 28 10:55:35 2018 daemon.notice pppd[14956]: Connect: 3g-wwan <--> /dev/ttyACM1
Thu Jun 28 10:55:35 2018 daemon.notice netifd: wwan0 (15021): udhcpc: started, v1.28.4
Thu Jun 28 10:55:35 2018 daemon.notice netifd: wwan0 (15021): udhcpc: sending discover
Thu Jun 28 10:55:38 2018 daemon.notice netifd: wwan0 (15021): udhcpc: sending discover
Thu Jun 28 10:55:41 2018 daemon.notice netifd: wwan0 (15021): udhcpc: sending discover
Thu Jun 28 10:56:06 2018 daemon.warn pppd[14956]: LCP: timeout sending Config-Requests
Thu Jun 28 10:56:06 2018 daemon.notice pppd[14956]: Connection terminated.
Thu Jun 28 10:56:06 2018 daemon.warn pppd[14956]: Receive serial link is not 8-bit clean:
Thu Jun 28 10:56:06 2018 daemon.warn pppd[14956]: Problem: all had bit 7 set to 0
Thu Jun 28 10:56:06 2018 daemon.notice netifd: Network device '3g-wwan' link is down
Thu Jun 28 10:56:06 2018 daemon.notice netifd: Interface 'wwan0' has link connectivity loss
Thu Jun 28 10:56:06 2018 daemon.notice netifd: wwan0 (15021): udhcpc: read error: Network is down, reopening socket
Thu Jun 28 10:56:06 2018 daemon.notice netifd: Interface 'wwan0' is disabled
Thu Jun 28 10:56:06 2018 daemon.notice netifd: wwan0 (15021): udhcpc: bind: No such device
Thu Jun 28 10:56:07 2018 daemon.notice pppd[14956]: Modem hangup
Thu Jun 28 10:56:07 2018 daemon.info pppd[14956]: Exit.

#91

You shouldn't. CGEV: EPS PDN ACT 5 <- this means you are connected, after that just run dhcp client on eth1 (network interface come from modem, not ppp0 aka 3g-wan)


#92

Getting the connection, thank you. Disconnecs after few seconds when

Thu Jun 28 12:02:07 2018 daemon.notice pppd[2894]: Connect: 3g-wwan <--> /dev/ttyACM1
Thu Jun 28 12:02:08 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:11 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:13 2018 daemon.warn odhcpd[1073]: DHCPV6 SOLICIT IA_NA from 0004514d31688212aa9a7eb6651dafc0ba5e on br-lan_001: no addresses available
Thu Jun 28 12:02:14 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:17 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:20 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:23 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:26 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:29 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:32 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:35 2018 daemon.debug pppd[2894]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x123c2a2e>]
Thu Jun 28 12:02:38 2018 daemon.warn pppd[2894]: LCP: timeout sending Config-Requests
Thu Jun 28 12:02:38 2018 daemon.notice pppd[2894]: Connection terminated.
Thu Jun 28 12:02:38 2018 daemon.warn pppd[2894]: Receive serial link is not 8-bit clean:
Thu Jun 28 12:02:38 2018 daemon.warn pppd[2894]: Problem: all had bit 7 set to 0
Thu Jun 28 12:02:39 2018 daemon.notice pppd[2894]: Modem hangup
Thu Jun 28 12:02:39 2018 daemon.info pppd[2894]: Exit.

comes up but this is PPP configuration, looking into it.


#93

As I wrote: for simplicity change proto ncm. Very ugluy way: (without check connection status):

  1. Add to /etc/gcom/ncm.js after mtk:
	,"mikrotik": {
		"initialize": [
                        "AT+CFUN=4"                                                               
                ],    
		"configure": [
			"AT*CGDFLT=0,\\\"${pdptype}\\\",\\\"${apn}\\\",,,,,,,,,,,,,,,,,,1"
		],
		"connect": "AT+CFUN=1",
		"disconnect": "AT+CFUN=0"
	}
  1. Change /lib/netifd/proto/ncm.sh:
    line 60:

ifname="$( ls "$devpath"/../*/net )"

line 76:

manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk 'NF && $0 !~ /AT\+CGMI/ { sub(/\+CGMI: /,""); gsub(/"/,""); print tolower($1); exit; }'
  1. Add to /etc/config/network:
config interface 'wan'
	option apn 'internet'
 	option proto ncm
 	option device '/dev/ttyACM1'

Results:

root@OpenWrt # ifstatus wan
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 602,
	"l3_device": "eth1",
	"proto": "ncm",
	"updated": [
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		
	],
	"dns-server": [
		
	],
	"dns-search": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		]
	},
	"data": {
		"manufacturer": "mikrotik"
	}
}
root@OpenWrt# ifstatus wan_4
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": true,
	"uptime": 538,
	"l3_device": "eth1",
	"proto": "dhcp",
	"device": "eth1",
	"updated": [
		"addresses",
		"routes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		{
			"address": "100.70.86.148",
			"mask": 8
		}
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "0.0.0.0",
			"mask": 0,
			"nexthop": "100.70.86.107",
			"source": "100.70.86.148\/32"
		}
	],
	"dns-server": [
		"185.89.185.1",
		"89.108.195.20"
	],
	"dns-search": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		]
	},
	"data": {
		"leasetime": 86400
	}
}
root@OpenWrt# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr AC:FF:FF:00:00:00  
          inet addr:100.70.86.148  Bcast:100.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::aeff:ffff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71 errors:0 dropped:0 overruns:0 frame:0
          TX packets:218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6035 (5.8 KiB)  TX bytes:61191 (59.7 KiB)

root@OpenWrt# ping google.com
PING google.com (216.58.215.110): 56 data bytes
64 bytes from 216.58.215.110: seq=0 ttl=56 time=19.457 ms
^C
--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 19.457/19.457/19.457 ms

#94

Another way is to slightly alter ppp

cat /etc/ppp/options 
<...>
passive
<...>

also ugly but will keep the connection on.


#95

I built Openwrt from the wAp-LTE branch in @robimarko's repo and flashed the wAP R with that image. lsusb doesn't list my LTE modem:

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The device shows up in RouterOS, and its docs say it uses a USB interface. I installed the following USB-related modules:

  • kmod-usb-acm
  • kmod-usb-core
  • kmod-usb-ehci
  • kmod-usb-ohci
  • kmod-usb-ohci-pci
  • kmod-usb2
  • kmod-usb2-pci
  • kmod-usb3

My first guess was that the card isn't powered, but toggling /sys/class/gpio/gpio15/value didn't change anything.

I tried removing the SIM card, and I switched from POE power to the adapter provided in case power consumption was my problem, but nothing. Any other ideas? As far as I can tell, mach-rbspi.c supports USB and powers on the card. My next guess is to flash back to RouterOS and make sure the device still shows up there.


#96

You also have the R11e LTE modem?


#97

for R11e LTE try to install:

kmod-usb-net-rndis
kmod-usb-net-cdc-ncm

and if you still can't see the modem run

dmesg | grep USB

and post the output. The modem shall be available as ttyACM1 device.


#98

You also have the R11e LTE modem?

No, it's a Sierra Wireless Airprime 73xx. It's listed on Mikrotik's supported hardware page, and I got it to show up in Routeros.

I'm not sure if I have the modules it needs installed, but even if I didn't, I'd expect it to be in lsusb.


#99

Have you installed kmod-usb-serial-sierrawireless ?

https://openwrt.org/docs/guide-developer/build-image-with-3g-dongle-support


#100

Have you installed kmod-usb-serial-sierrawireless?

Just tried it, but nothing. Even if I didn't have the module, shouldn't the device show up in /sys/bus/usb/devices/*/product?


#101

Can you post your dmesg output?