segunda-feira, 20 de abril de 2020

VISUINO - SMARTCORE - LoRaWAN

LOM204 - USING CLI CONTROLS WITH VISUINO

USING LOM204A02 VIA CLI CONTROLS


The objective of this BLOG is to demonstrate how it is possible to interact the LOM204A02 module via CLIMODE, through LWR commands which are sent by UART and access the LoRaWAN network. In this example, we will use VISUINO to generate C code which will run smoothly with HOST NINA B or NINA W via Arduino.

VISUINO

Visuino is the latest innovative software from Mitov Software. A visual programming environment that allows you to program your Arduino boards.
The components found in the Visuino software represent your hardware components and you can easily create and design your programs using drag and drop. No equipment or hardware is needed to run the software in design mode. Once you have completed the design, you can connect to upload the Arduino board and run it.

For those people who are not strong at writing code, then designing, compiling and creating Arduino programs has never been easier! Why waste time creating code when all the hard work is done for you? You have your Arduino board and a great hardware design, see it running in minutes, not hours!


ARDUINO (VISUINO) INTERACTION WITH LORA LOM204 (BASED ON THE FIGURES BELOW)


CLI MODE CLASS A

DON'T FORGET TO COMPILE THE LOM204 BIN (KEIL) AS FIGURE BELOW


SOFTWARE SCREENPLAY GENERATED BY VISUINO
  • (1) Sent a RESET
  • Sent commands
LRW 30 otaa (delay for RESET message)
LRW 4B 0 (delay for RESET message)

LRW 33 YOUR SetAppEUI

LRW 51 YOUR SetApplicationkey

LRW 3D 6000

LRW 6D 00ff 0000 0000 0000 00ff

LRW 43

  • Awaiting reply JOIN_COMPLETE
  • (2) Takes the LOM204 out of SLEEP mode
  • LRW 31 VISUINO cnf 1
  • Checks if FAIL, if yes, repeat commands (1)
  • Otherwise, repeat here (2)

FOLLOW-UP OF COMMAND RESULTS


MAIN VISUINO BLOCKS




Send Message Sequence to LOM204




Checks JOIN_COMPLETE message




Checks if you hear PACKAGE sending failure, then repeat process

If JOIN occurred, WAKE UP force then sends the VISUINO package

GPIOS 3 and 4 USED FOR WAKE UP AND RESET OF LOM204

If JOIN occurred, Greetings message

Checks if you sent a package to start then send another one

Checks if FAIL message appeared to reset the Modem

greetings

Message sent when JOIN occurs


CONNECTING THE HOST WITH THE LOM204

GPIO 3 ------------------------------ WAKE UP LOM204 (PULL DOWN) (HIGH ACTIVE)
GPIO 4 ------------------------------ RESET LOM204 (PULL UP) (LOW ASSET)
TXD1 -------------------------------- RXD LOM204
RXD1 -------------------------------- TXD LOM204
TXD0 <---- DEBUG
57600, N, 8.1

PACKAGE ARRIVING ON EVERYNET


payload sent: "VISUINO"

Base64
TESTS

I USED PROTEUS WITH MEGA ARDUINO AND BRIDGE FOR SERIAL (TXD, RXD, DTR AND RTS, THE TWO ULTIMATES FOR WAKE UP AND RESET)


USB converter - TTL 3.3V.
PULL-UP and PULL-DOWN resistors



VISUINO Project


Sources:


Datasheets

AppNote_LOM20xA_Firmware_Upgrade_20190401_en.pdf
AppNote_LOM20xA_Using_the_UART_20190401_en.pdf
SCH_EVL20xA_R1_170630.pdf


Doubts

support@smartcore.com.br



About SMARTCORE

SmartCore provides modules for wireless communication, biometrics, connectivity, tracking and automation.
Our portfolio inc l ui modem 2G / 3G / 4G / NB-IoT / Cat.M, satellite, WiFi modules, Bluetooth, GNSS / GPS, Sigfox, Lora, card reader, QR code reader, printer mechanism, mini-board PC, antenna, pigtail, LCD, battery, GPS repeater and sensors.

More details at  www.smartcore.com.br