Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tunneled LoRa module AT commands #316

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Jul 25, 2022

  1. Add support for optional parameters to AT actions

    AT actions, i.e., AT commands that are neither setters nor getters, may
    sometimes need to accept an optional argument delimited from the AT
    command with a space, e.g., "AT$JOIN 1". This patch modifies the ATCI API
    to support optional parameters in AT actions.
    janakj committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    0312452 View commit details
    Browse the repository at this point in the history
  2. Make AT$AT both an action and a setter

    Previously, the only supported AT$AT syntax was AT$AT=AT... This can be
    a bit confusing since, technically, the AT command is not a setter. It
    just passes its argument to the LoRa modem. This patch adds support for
    the following syntax:
    
    AT$AT AT+....
    
    That is, the AT$AT prefix and the actual AT command to be passed to the
    LoRa modem are space-separated. The original setter syntax is also
    retained.
    janakj committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    99f7d65 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

  1. Configuration menu
    Copy the full SHA
    d34df84 View commit details
    Browse the repository at this point in the history
  2. Check buffer overflow in twr_cmwx1zzabz_custom_at

    When the buffer for custom AT commands isn't large enough to hold the
    command, indicate an error to the caller rather than sending an
    incomplete command to the LoRa module.
    janakj committed Jul 27, 2022
    Configuration menu
    Copy the full SHA
    d5ce109 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    df41df2 View commit details
    Browse the repository at this point in the history
  4. Pass custom AT responses from LoRa to upstream

    When an application invokes a custom LoRa command via AT$AT, pass the
    response generated by the LoRa module to the upstream ATCI, on separate
    lines prefixed with "$LORA: ". This feature provides applications using
    the Tower Core module ATCI with full access to the LoRa module's ATCI in
    a "tunneled" mode.
    
    Also, only generate an "OK" response to AT$AT once the tunneled AT
    command has been actually sent to LoRa module. If it cannot be sent,
    e.g., because the command could not fit into an internal buffer, send an
    "ERROR" instead.
    janakj committed Jul 27, 2022
    Configuration menu
    Copy the full SHA
    3451d66 View commit details
    Browse the repository at this point in the history
  5. Implement AT$LORA>ATCI

    This AT command can be used to enable or disable the forwarding of LoRa
    responses and events over the ATCI. When set to 1, the responses
    generated in response to custom AT commands and all asynchronous
    notifications will be forwarded to the ATCI. Each such message will be
    prefixed with "$LORA: ". When set to 0 (default), no LoRa responses and
    asynchronous notification will be sent to the ATCI.
    
    This command is meant to be used as a wrapper for custom LoRa AT
    commands sent via AT$LORA that depend on asynchronous notifications, for
    example:
    
    AT$LORA>ATCI=1
    AT$LORA AT$JOIN
    OK
    ...
    $LORA: +OK
    $LORA: +EVENT=1,1
    ...
    AT$LORA>ATCI=0
    janakj committed Jul 27, 2022
    Configuration menu
    Copy the full SHA
    fd38556 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2022

  1. Fixes a bug in ATCI command lookup

    When two AT commands start with a common prefix, continue iterating
    until you have found the right command.
    janakj committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    44e2dd6 View commit details
    Browse the repository at this point in the history