• Система автоматизации с открытым исходным кодом на базе esp8266/esp32 микроконтроллеров и приложения IoT Manager. Наша группа в Telegram

Air302 NB-IOT модуль + GPRS

nikolz

Well-known member
Air302 имеет встроенную VMLua.
можно писать на луа и грузить скрипты как в ESP8266 на lua
--------------------------------
Вот пример MQTT:
-- LuaTools
PROJECT = "mqttairm2m"
VERSION = "1.0.0"
_G.sys = require("sys")
local mqtt = require "mqtt"
sys.taskInit(function()
local host, port, selfid = "lbsmqtt.airm2m.com", 1884, nbiot.imei()
while true do
while not socket.isReady() do
log.info("net", "wait for network ready")
sys.waitUntil("NET_READY", 1000)
end
log.info("main", "Airm2m mqtt loop")

local mqttc = mqtt.client(selfid, nil, nil, false)
while not mqttc:connect(host, port) do sys.wait(2000) end
local topic_req = string.format("/device/%s/req", selfid)
local topic_report = string.format("/device/%s/report", selfid)
local topic_resp = string.format("/device/%s/resp", selfid)
log.info("mqttc", "mqtt seem ok", "try subscribe", topic_req)
if mqttc:subscribe(topic_req) then
log.info("mqttc", "mqtt subscribe ok", "try publish")
if mqttc _ublish(topic_report, "test publish " .. os.date() .. crypto.md5("12345"), 1) then
while true do
log.info("mqttc", "wait for new msg")
local r, data, param = mqttc:receive(120000, "pub_msg")
log.info("mqttc", "mqttc:receive", r, data, param)
if r then
log.info("mqttc", "get message from server", data.payload or "nil", data.topic)
elseif data == "pub_msg" then
log.info("mqttc", "send message to server", data, param)
mqttc_ublish(topic_resp, "response " .. param)
elseif data == "timeout" then
log.info("mqttc", "wait timeout, send custom report")
mqttc_ublish(topic_report, "test publish " .. os.date() .. nbiot.imei())
else
log.info("mqttc", "ok, something happen", "close connetion")
break
end
end
end
end
mqttc:disconnect()
sys.wait(5000)
end
end)
sys.run()
----------------------------
 

nikolz

Well-known member
исходники VMLua
LuatOS : Мощный встроенный движок Lua для устройств интернета вещей,
со множеством компонентов и низкими требованиями к памяти (16 Кб оперативной памяти, 128 Кб флэш-памяти)
Air101/Air103/Air105/ESP32C3
-----------------------------
 

enjoynering

Well-known member
еще накидаю rкитайских GPRS:
- Air208
- WIS800C
- A6 (часто зовут GA6)
- M590E
- ну и наш герой Air302

теперь бы понять кто из них лучший/худший и почему
 

nikolz

Well-known member
еще накидаю rкитайских GPRS:
- Air208
- WIS800C
- A6 (часто зовут GA6)
- M590E
- ну и наш герой Air302

теперь бы понять кто из них лучший/худший и почему
Air302 - это фактически ESP32С3 , но с протоколом NB-Iot вместо Wifi. Т е Вы работаете сразу через сотового оператора без использования проводного интернет или роутеров Wifi.
-----------------
Большинство указанных Вами модулей лишь модули связи на уровне AT команд с закрытыми прошивками.
Т е к ним надо еще довешивать микроконтроллер.
Ну и потребление у них не хилое.
 

nikolz

Well-known member
и еще для затравки.
В отличии от BLE -смартфон, NB-Iot может спать до 440 дней (ток потребления менее 1 мкА ),
оставаясь подключенным к оператору и передавая когда надо данные не выполняя подключения и без заголовков(режим non-IP).
 

nikolz

Well-known member
характеристики чипа EC616s
  • processor Cortex-M3, supportMPU, Configurable CPU frequency, up to204MHz, 8-channel DMA memory
  • 4MB on-chip NOR flash,272KB on-wafer SRAM, divided into 256KB, and 16KB two blocks 16KB instructions cache
- Flexible configuration supports 1.8/2.8/3.3V IO
  • Clock source: 26MHz TCXO or DCXO, 32.768KHz crystal oscillator
  • 1 external wake-up source (interrupt)
  • UniqueMCU mode, in which the internal
RC oscillator as clock for lower power consumption
  • LOG port, UNILOG
  • Debug port, SWD
  • Peripherals
  • 16 GPIO, 3 UART, 2 SSP, 2 I2C
  • 6 PWM, 6 Timers, 6 GPIO counters, 1 WDG
  • 32KHz RTC timer
  • USIM, supports Esim
  • LPUART
  • 4 channels 12-bitAUXADC
  • Temperature Sensor
  • Battery voltage monitoring
  • Low power consumption
  • Unique low-power architecture, 4-level sleep mode
  • PSM: 800nA
- DRX(2.56s): Typical 110uA
  • RX: Typical 10mA
  • TX: Typical 24mA
  • communication
  • fully support3GPP R14 NB-IoT
  • Category NB2, 2-HARQ
  • Multi-tone NPUSCH
  • Anchor and non-anchor carriers
  • In-band same/different PCI, guard-band, standalone
  • Multi-carrier paging, NPRACH
  • Positioning: OTDOA & ECID
  • ROHC, RAI, multiple-DRB, RRC connection re-establish
  • - SC-PTM (need SW upgrade)
  • radio frequency
- Supported Bands: 1, 2, 3, 4, 5, 8, 18, 19, 20,25, 26, 66, 70
  • chip integrationPA, support APT function
  • Chip integrated RF transceiver filter and antenna switch
  • power level3
  • Safety
  • Hardware encryption and decryption module (AES, SHA)
  • Secure boot
  • flash encryption
  • True random number generator
  • application
  • Support open-CPU
  • software conformsCMSIS Architecture
  • Support mainstream cloud services
  • IPv4, IPv6 and non-IP
  • UDP,TCP
  • DTLS, TLS, SSL
  • MQTT, CoAP, HTTP(S)
  • LWM2M
  • support FOTA
  • package
  • Voltage range: 2.2V to 4.5V
  • SoC
The processor subsystem uses a single-core architecture, i.e., both protocol software and application software run on a single on the CPU
  • CPU adopts ARM Cortex-M3, supports frequency 204M/102M/26M
  • 8-entry MPU
  • 8-channel DMA
  • 16KB cache
  • 256KB Large SRAM and 16KB small SRAM, different low-power modes can keep different SRAM content to achieve the lowest sleep power consumption
  • 4MB on-chip NOR flash
  • Hardware encryption and decryption module
  • hardwarelog module, can output log through UART and SSP
  • 8 NVIC interrupt ports, two 32-port secondary interrupt controllers (XICs)
Communication subsystem includes The baseband hardware, radio frequency and protocol software of NB-IoT are characterized as follows:
  • fully support3GPP R14 NB-IoT standard
  • Support global frequency bands
  • supportCategory NB2, Max TBS = 2536
  • support 2-HARQ, combined with CAT-NB2, the data throughput rate is 5 times higher than that of CAT-NB1
  • Support Multi-tone NPUSCH, support 1/3/6/12 subcarriers
  • supportAnchor and non-anchor carriers
  • Support In-band same/different PCI, guard-band, standalone network deployment
  • Support Multi-carrier paging and Multi-carrier NPRACH
  • Positioning: OTDOA & ECID
  • Others: ROHC, RAI, multiple-DRB, RRC connection re-establish
  • support SC-PTM (software upgrade required)
Peripherals include:
  • maximum support 16 GPIO
  • maximum support 6 GPIOs with input count
  • maximum support 3 UARTs
  • maximum support 2 SSPs
  • maximum support 2 I2C
  • maximum support 6 PWM, 6 Timer
  • 1 WDG
  • supportUSIM and eSIM
  • Support low power UART
  • 4-channel 12-bit AUXADC
  • Temperature Sensor
  • Battery voltage monitoring
 
Сверху Снизу