EMTC

来自Jack's Lab
2021年2月19日 (五) 16:56Comcat (讨论 | 贡献)的版本

跳转到: 导航, 搜索

目录

1 Overview

LTE Cat1

工信部 2020年1月1日起施行的《增强机器类通信系统频率使用管理规定(暂行)》中明确 eMTC 的频率为:

  • eMTC 系统使用无线电频率应当取得无线电频率使用许可
  • 已规划用于 LTE 的 800MHz、900MHz、1800MHz、1900MHz 和 2100MHz 等公众移动通信频段
  • 已规划用于 LTE 的 1447-1467MHz 和 1785-1805MHz 等专用移动通信频段



2 Hardware

2.1 Overview

鉴于其上电需要按开关开机的特性,外部必须加一个 MCU:

  • 检测电池电压,10 min 持续的 < 3.2V,关机。10 min 持续的 > 3.3V,开机
  • 作为 LTE Cat1 模组系统的外部看门狗,系统异常需重启
  • 定时重启
  • 备用系统:切换为 AT 模式


需给 Linux Core 留有接口:

  • LoRa (SPI)
  • LTE Cat 1 (USB)
  • UART ---> MODBUS


RT5350F

RT5350 Core Module Interface

F1C


TF 卡 + 文件系统


电源:

  • SX1278: 1.8 ~ 3.7V
  • SX1268: 1.8 ~ 3.7V (3.9 max)
  • ASR6500: 1.8 ~ 3.7V
  • Air724: 3.3 ~ 4.3V,至少 2A 电流能力。IO 电压 1.8V


2.2 ML302

移动官方 LTE Cat1 模组

  • 32mm x 29mm x2.5mm
  • 紫光展锐 UIS8910 / RDA8910 / 春藤 8910DM



2.3 Air724UG

  • 24mm x 24mm
  • 紫光展锐 UIS8910 / RDA8910


2.4 移远


3 Air724UG


3.1 RNDIS

Ubuntu:

comcat@auto:~/f1c/linux$ uname -a
Linux auto 5.3.0-64-generic #58-Ubuntu SMP Fri Jul 10 19:33:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
comcat@auto:~/f1c/linux$ dmesg|tail -n 16
[4658581.814120] tg3 0000:05:00.1 eno2: EEE is disabled
[4659835.062397] usb 1-6: new high-speed USB device number 47 using xhci_hcd
[4659835.210999] usb 1-6: New USB device found, idVendor=1782, idProduct=4d12, bcdDevice= 0.00
[4659835.211000] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[4659835.211001] usb 1-6: Product: UNISOC-8910
[4659835.211002] usb 1-6: Manufacturer: UNISOC
[4659835.714741] usb 1-6: USB disconnect, device number 47
[4659836.822341] usb 1-6: new high-speed USB device number 48 using xhci_hcd
[4659836.971039] usb 1-6: New USB device found, idVendor=1782, idProduct=4e00, bcdDevice= 0.00
[4659836.971041] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[4659836.971042] usb 1-6: Product: UNISOC-8910
[4659836.971043] usb 1-6: Manufacturer: UNISOC
[4659836.985660] usbcore: registered new interface driver cdc_ether
[4659836.987884] rndis_host 1-6:1.0 eth0: register 'rndis_host' at usb-0000:00:14.0-6, RNDIS device, f0:4b:b3:b9:eb:e5
[4659836.987904] usbcore: registered new interface driver rndis_host
[4659836.992163] rndis_host 1-6:1.0 enxf04bb3b9ebe5: renamed from eth0
# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 1782:4e00


BSP .config:

CONFIG_USB_USBNET=y
CONFIG_USB_NET_CDCETHER=y
CONFIG_USB_NET_RNDIS_HOST=y
CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
CONFIG_USB_NET_CDC_SUBSET=y

CONFIG_USB_ARMLINUX=y

CONFIG_USB_NET_RNDIS_WLAN=y

正常启动 log;

# dmesg | grep usb
[    0.087514] usbcore: registered new interface driver usbfs
[    0.087722] usbcore: registered new interface driver hub
[    0.087957] usbcore: registered new device driver usb
[    0.152829] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.890802] usbcore: registered new interface driver rndis_wlan
[    0.896935] usbcore: registered new interface driver asix
[    0.902571] usbcore: registered new interface driver ax88179_178a
[    0.908815] usbcore: registered new interface driver cdc_ether
[    0.914896] usbcore: registered new interface driver net1080
[    0.920790] usbcore: registered new interface driver rndis_host
[    0.926844] usbcore: registered new interface driver cdc_subset
[    0.933026] usbcore: registered new interface driver zaurus
[    0.938802] usbcore: registered new interface driver cdc_ncm
[    0.968749] usbcore: registered new interface driver usb-storage
[    1.057718] usbcore: registered new interface driver usbhid
[    1.063495] usbhid: USB HID core driver
[    1.094510] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.106535] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.112542] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.145447] usb0: HOST MAC 4a:0a:44:64:74:fd
[    1.149904] usb0: MAC 5e:2f:11:c1:2c:d0
[    1.830558] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[    2.025078] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, f0:4b:b3:b9:eb:e5
# dmesg | grep rndis
[   74.669913] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[   76.149922] usb 1-1: new high-speed USB device number 4 using musb-hdrc
[   76.335014] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, f0:4b:b3:b9:eb:e5
[   82.117916] protocol 0003 is buggy, dev eth0
[   83.842840] protocol 0003 is buggy, dev eth0
[   85.558717] protocol 0003 is buggy, dev eth0
[   93.933175] random: crng init done
# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 004: ID 1782:4e00

Buildroot 选中 udhcpc (dhcp客户端, BR2_PACKAGE_DHCPCD=y) 后自动连网:

# dmesg | grep rndis
[   74.669913] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[   76.149922] usb 1-1: new high-speed USB device number 4 using musb-hdrc
[   76.335014] rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, f0:4b:b3:b9:eb:e5
[   82.117916] protocol 0003 is buggy, dev eth0
[   83.842840] protocol 0003 is buggy, dev eth0
[   85.558717] protocol 0003 is buggy, dev eth0
[   93.933175] random: crng init done
# ifconfig
eth0      Link encap:Ethernet  HWaddr F0:4B:B3:B9:EB:E5
          inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6179 (6.0 KiB)  TX bytes:7480 (7.3 KiB)

Or:

启动后 log:

rndis_host 1-1:1.0 eth0: register 'rndis_host' at usb-musb-hdrc.1.auto-1, RNDIS device, f0:4b:b3:b9:eb:e5

发现新注册了eth0,手动将 eth0 添加到 network 中的 wan 部分。

/etc/config/network

config interface 'wan'
        option force_link '1'
        option proto 'dhcp'
        option ifname 'eth0'

/etc/init.d/network restart


3.2 PPoE

  • Air720 0x1286:0x4e3d
  • Air724 0x1782:0x4e00
  • 带 RNDIS 网卡驱动
    • ttyUSB0 AT 口
    • ttyUSB1 AT+ ppp 口
    • ttyUSB2 log 输出口
  • 不带 RNDIS 网卡驱动
    • ttyUSB2 AT 口
    • ttyUSB3 AT+ ppp 口
    • ttyUSB4 log 输出口
    • ttyUSB0 和 ttyUSB1 为无效口


#  cat /sys/class/udc/musb-hdrc.1.auto/device/usb1/1-1/idVendor
1782
# cat /sys/class/udc/musb-hdrc.1.auto/device/usb1/1-1/idProduct
4e00
# cat /sys/class/udc/musb-hdrc.1.auto/device/usb1/1-1/manufacturer
UNISOC


# ifconfig eth0 down
# picocom -b 115200 /dev/ttyUSB0
ATI                          # 查看版本
Luat_V0024_RDA8910_FLOAT
AT+CIMI                  # 查 SIM 卡的 IMSI
AT+CGSN               # 查模组 IMEI

AT+CSQ                  #信号质量
 +CSQ: 14,99
AT+CESQ               # 查看信号强度
 +CESQ: 99,99,255,255,24,67
AT+CEREG?          # EPS network registration status, 确认基站注册状态 0,1 或者 0,5   1-代表本地已注册上, 5-代表漫游已注册
 +CEREG: 2,1,"0513","00000000",7
AT+CGACT?         # Context activation, state = 0:  deactivated; =1: activated
 +CGACT: 5, 1
AT+CCLK?
+CCLK: "21/02/19,16:45:59+32"
AT+CGDCONT?
+CGDCONT: 5,"IP","cmiot","10.169.84.172",

AT+CPOF       # 软件关机
AT+CFUN?     # Phone functionality, 0 最小功能,1 全功能 (Default),4 射频电路关闭,7 disable sim only


# Heart beat:
[I]-[ril.sendat] AT+CSQ
[I]-[ril.proatc] +CSQ: 31,99
[I]-[ril.proatc] OK
[I]-[ril.sendat] AT+CESQ
[I]-[ril.proatc] +CESQ: 99,99,255,255,19,62
[I]-[ril.proatc] OK
[I]-[ril.sendat] AT+EEMGINFO?
[I]-[ril.proatc] +EEMGINFO: 3, 2


AT+CFUN=0  # 让模组强制进入深度休眠(opencpu 时只能选择此方式)
[I]-[ril.proatc] ^MODE: 0,0

*CGEV: DEACT,5

^MODE: 0,0


+CREG: 0,"0000","00005011",0
[I]-[net.UpdNetMode] nil 4 0 0

^CARDMODE: 255
[I]-[net.NET_UPD_NET_MODE] 0

+CPIN: SIM REMOVED
[I]-[ril.proatc] +CREG: 0,"0000","00005011",0
[I]-[net.creg] 0 +CREG:
[I]-[ril.proatc] ^CARDMODE: 255
[I]-[ril.defurc] ^CARDMODE: 255
[I]-[ril.proatc] +CPIN: SIM REMOVED
[I]-[ril.sendat] AT+COPS?
[I]-[SIM.subscribe] false NORDY
[I]-[ril.proatc] +COPS: 0
[I]-[cops] nil nil true
[I]-[ril.proatc] OK
[I]-[ril.defrsp] AT+COPS? true OK nil
[I]-[ril.sendat] AT+CREG?
[I]-[ril.proatc] +CREG: 2,0,"0000","00005011",0
[I]-[net.creg] 0 +CREG:
[I]-[ril.proatc] OK
[I]-[ril.defrsp] AT+CREG? true OK nil
[I]-[ril.sendat] AT+CSQ
[I]-[ril.proatc] +CSQ: 99,99
[I]-[ril.proatc] OK
[I]-[ril.sendat] AT+CESQ
[I]-[ril.proatc] +CESQ: 99,99,255,255,255,255
[I]-[ril.proatc] OK
[I]-[ril.sendat] AT+EEMGINFO?

+EEMGINFOSVC: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0 0, 0, 65535, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

[I]-[ril.proatc] +EEMGINFO: 3, 0
[I]-[ril.defurc] +EEMGINFO: 3, 0
[I]-[ril.proatc] OK
[I]-[ril.defrsp] AT+EEMGINFO? true OK nil
[I]-[ril.proatc] +EEMGINFOSVC: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0 0, 0, 65535, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0
[I]-[link.Pdp_Act] false 0 true
[I]-[ril.sendat] AT+CGATT?
[I]-[ril.proatc] +CGATT: 0
[I]-[ril.proatc] OK
[I]-[testLbsLoc.getLocCb] 1 nil nil
[I]-[ril.sendat] AT+CSQ
[I]-[ril.proatc] +CSQ: 99,99
[I]-[ril.proatc] OK
[I]-[ril.sendat] AT+CESQ
[I]-[ril.proatc] +CESQ: 99,99,255,255,255,255
[I]-[ril.proatc] OK
[I]-[ril.sendat] AT+EEMGINFO?

+EEMGINFOSVC: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0 0, 0, 65535, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

[I]-[ril.proatc] +EEMGINFO: 3, 0
[I]-[ril.defurc] +EEMGINFO: 3, 0
[I]-[ril.proatc] OK
[I]-[ril.defrsp] AT+EEMGINFO? true OK nil
[I]-[ril.proatc] +EEMGINFOSVC: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0 0, 0, 65535, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0


4 Reference



个人工具
名字空间

变换
操作
导航
工具箱