🌡️  Monitor legacy analog systems with TinyML, Edge Impulse, and Blues Wireless. Learn more in our webinar on May 26th!

Search
Documentation Results
End of results
Community Results
End of results
Support
Blues.io
Notehub.io
Shop
Sign In
Search
Documentation Results
End of results
Community Results
End of results
Support
Blues.io
Notehub.io
Shop
×
HomeReference
Glossary
HardwareNotecard API
Introduction
card Requestscard.attncard.auxcard.carriercard.contactcard.iocard.locationcard.location.modecard.location.trackcard.monitorcard.motioncard.motion.modecard.motion.synccard.motion.trackcard.randomcard.restartcard.restorecard.statuscard.tempcard.timecard.triangulatecard.usage.getcard.usage.testcard.versioncard.voltagecard.wificard.wirelesscard.wireless.penalty
dfu Requests
env Requests
file Requests
hub Requests
note Requests
web Requests
Notehub API
API Introduction
Device API
Environment Variable API
Event API
File API
Fleet API
Note API
Product API
Project API
Rate this page  
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★

card Requests

The Notecard provides a number of requests that can be used to configure the behavior of the Notecard, its pins, its use of GPS and accelerometer data, and to query the state of the Device, its network connection and peripherals. All of these requests begin with the card prefix.

card.attn

Configure hardware notification from the Notecard to MCU host. Note: Requires a connection between the notecard ATTN pin and a GPIO pin on the host MCU.

Arguments

mode

string

A comma-separated list of one or more of the following keywords:

""

Fetches currently-pending events in the "files" collection.

"arm"

Clear "files" events and cause the ATTN pin to go LOW. After an event occurs or "seconds" has elapsed, the ATTN pin will then go HIGH (a.k.a. "fires"). If "seconds" is 0, no timeout will be scheduled. If ATTN is armed, calling arm again will disarm (briefly pulling ATTN HIGH), then arm (non-idempotent).

"connected"

When armed, will cause ATTN to fire whenever the module connects to cellular. Disable with -connected.

"disarm"

Causes ATTN pin to go HIGH if it had been LOW. As of v3.2.1, -all can be used with disarm to clear all ATTN monitors currently set.

"files"

When armed, will cause ATTN to fire if any of the "files" are modified. Disable by using -files.

"location"

When armed, will cause ATTN to fire whenever the Notecard GPS module makes a position fix.

"motion"

When armed, will cause ATTN to fire whenever the accelerometer detects module motion. Disable with -motion.

"rearm" (Added in v1.5.3)

Will arm ATTN if not already armed. Otherwise, resets the values of mode, files, and seconds specified in the initial arm or rearm request (idempotent).

"signal"

When armed, will cause ATTN to fire whenever the Notecard receives a signal.

"sleep"

Instruct the Notecard to pull the ATTN pin low for a period of time, and optionally keep a payload in memory. Can be used by the host to sleep the host MCU.

"watchdog"

Not an "arm" mode, rather will cause the ATTN pin to go from HIGH to LOW, then HIGH if the notecard fails to receive any JSON requests for "seconds."

"wireless" (Added in v1.5.3)

Instruct the Notecard to fire the ATTN pin whenever the card.wireless status changes.

files

array (optional)

A list of Notefiles to watch for file-based interrupts.

seconds

int32 (optional)

To set an ATTN timeout when arming, or when using sleep.

NOTE: When the Notecard is in continuous mode, the seconds timeout is serviced by a routine that wakes every 15 seconds. You can predict when the device will wake, by rounding up to the nearest 15 second interval.

payload

base64 string (optional)

When using sleep mode, a payload of data from the host that the Notecard should hold in memory until retrieved by the host.

start

boolean (optional)

When using sleep mode and the host has reawakened, request the Notecard to return the stored payload.

verify (Added in v3.2.1)

boolean (optional)

When true, returns the current attention mode configuration, if any.

      {
        "req": "card.attn",
        "mode": "arm,files",
        "files": ["data.qi", "my-settings.db"]
      }
      J *req = NoteNewRequest("card.attn");
      JAddStringToObject(req, "mode", "arm, files");
      
      J *files = JAddArrayToObject(req, "files");
      JAddItemToArray(files, JCreateString("data.qi"));
      JAddItemToArray(files, JCreateString("my-settings.db"));
      
      NoteRequest(req);
      req = {"req": "card.attn"}
      req["mode"] = "arm, files"
      req["files"] = ["data.qi", "my-settings.db"]
      card.Transaction(req)

      Configure the Notecard to perform an interrupt on the data.qi and my-settings.db.

        {
          "req": "card.attn",
          "mode": "arm,connected"
        }
        J *req = NoteNewRequest("card.attn");
        JAddStringToObject(req, "mode", "arm, connected");
        
        NoteRequest(req);
        req = {"req": "card.attn"}
        req["mode"] = "arm, connected"
        card.Transaction(req)

        Configure the Notecard to perform an interrupt on a successful connection to Notehub.

          {
            "req": "card.attn",
            "mode": "arm,motion"
          }
          J *req = NoteNewRequest("card.attn");
          JAddStringToObject(req, "mode", "arm, motion");
          
          NoteRequest(req);
          req = {"req": "card.attn"}
          req["mode"] = "arm, motion"
          card.Transaction(req)

          Configure the Notecard to perform an interrupt when the Notecard detects motion.

            {
              "req": "card.attn",
              "mode": "arm,location"
            }
            J *req = NoteNewRequest("card.attn");
            JAddStringToObject(req, "mode", "arm, location");
            
            NoteRequest(req);
            req = {"req": "card.attn"}
            req["mode"] = "arm, location"
            card.Transaction(req)

            Configure the Notecard to perform an interrupt when the Notecard makes a position fix.

              {
                "req": "card.attn",
                "mode": "arm,signal"
              }
              J *req = NoteNewRequest("card.attn");
              JAddStringToObject(req, "mode", "arm, signal");
              
              NoteRequest(req);
              req = {"req": "card.attn"}
              req["mode"] = "arm, signal"
              card.Transaction(req)

              Configure the Notecard to perform an interrupt when the Notecard receives a signal.

                {
                  "req": "card.attn",
                  "mode": "watchdog",
                  "seconds": 60
                }
                J *req = NoteNewRequest("card.attn");
                JAddStringToObject(req, "mode", "watchdog");
                JAddNumberToObject(req, "seconds", 60);
                
                NoteRequest(req);
                req = {"req": "card.attn"}
                req["mode"] = "watchdog"
                req["seconds"] = 60
                card.Transaction(req)

                Configure the Notecard to function as a watchdog timer with a 60 second timeout.

                  {
                    "req": "card.attn",
                    "mode": "sleep",
                    "seconds": 3600,
                    "payload": "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ=="
                  }
                  J *req = NoteNewRequest("card.attn");
                  JAddStringToObject(req, "mode", "sleep");
                  JAddNumberToObject(req, "seconds", 3600);
                  JAddStringToObject(req, "payload", "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ==");
                  
                  NoteRequest(req);
                  req = {"req": "card.attn"}
                  req["mode"] = "sleep"
                  req["seconds"] = 3600
                  req["payload"] = "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ=="
                  card.Transaction(req)

                  Configure the Notecard instruct the host MCU to sleep for a period of time.

                    {
                      "req": "card.attn",
                      "start": true
                    }
                    J *req = NoteNewRequest("card.attn");
                    JAddBoolToObject(req, "sync", true);
                    
                    NoteRequest(req);
                    req = {"req": "card.attn"}
                    req["start"] = True
                    card.Transaction(req)

                    Retrieve a payload from the Notecard after sleep.

                      {
                        "req": "card.attn",
                        "mode": "arm,connected"
                      }
                      J *req = NoteNewRequest("card.attn");
                      JAddStringToObject(req, "mode", "arm, connected");
                      
                      NoteRequest(req);
                      req = {"req": "card.attn"}
                      req["mode"] = "arm, connected"
                      card.Transaction(req)

                      Configure the Notecard to perform an interrupt on a successful connection to Notehub.

                        {
                          "req": "card.attn",
                          "mode": "disarm,-all"
                        }
                        J *req = NoteNewRequest("card.attn");
                        JAddStringToObject(req, "mode", "disarm,-all");
                        
                        NoteRequest(req);
                        req = {"req": "card.attn"}
                        req["mode"] = "disarm,-all"
                        card.Transaction(req)

                        Configure the Notecard to perform an interrupt when the Notecard detects motion.

                        Response Members

                        set

                        boolean

                        true if an attention mode is currently active. A response with no set field indicates false.

                        files

                        array

                        A list of files changed since file attention mode was set. In addition, this field will include keywords to signify the occurrence of other attention mode triggers:

                        "connected"

                        "files"

                        "location"

                        "motion"

                        "timeout"

                        "watchdog"

                        payload

                        base64 string

                        When using sleep mode with a payload, the payload provided by the host to the Notecard.

                        time

                        UNIX Epoch time

                        When using sleep mode with a payload, the time that the payload was stored by the Notecard.

                        Example Response
                        {
                          "files": ["data.qi", "modified"],
                          "set": true
                        }
                        More information:
                        • Handling Notecard Interrupts from a Host
                        • Putting a Host to Sleep

                        card.aux

                        Configure various uses of the general-purpose AUX1-AUX4 pins on the Notecard edge connector for tracking applications.

                        note

                        Utilizing these pins requires a physical connection to each, separate from a communications connection with the Notecard.

                        Arguments

                        mode

                        string

                        The AUX mode. Must be one of the following:

                        "gpio"

                        "off"

                        "motion"

                        "track"

                        "-"

                        state

                        array of strings (required for gpio mode)

                        An ordered list of pin modes for each AUX pin when in GPIO mode. Possible values are:

                        "" to leave the pin unchanged.

                        "off" to disable the pin.

                        "high" to set the pin as a HIGH output.

                        "low" to set the pin as a LOW output.

                        "input" to set the pin as an input.

                        "count" to set the pin as an input that increments a counter for each rising edge pulse on the pin.

                        seconds

                        int (optional)

                        When in gpio mode, if an AUX pin is configured as a count type, the count of rising edges can be broken into samples of this duration. Passing 0 or omitting this field will total into a single sample.

                        max

                        int (optional)

                        When in gpio mode, if an AUX pin is configured as a count type, the maximum number of samples of duration seconds, after which all subsequent counts are added to the final sample. Passing 0 or omitting this value will provide a single incrementing count of rising edges on the pin.

                        start

                        boolean (optional)

                        When in gpio mode, if an AUX pin is configured as a count type, set to true to reset counters and start incrementing.

                        gps

                        boolean (optional)

                        If true, along with mode:"track" the Notecard supports the use of an external GPS module. See Using AUX Track Mode with an External GPS for more information.

                        datarate

                        int (optional)

                        The serial baud rate of the Notecard.

                        rate (Added in v3.2.1)

                        int (optional)

                        The AUX UART baud rate for debug communication over the AUXRX and AUXTX pins.

                            {
                              "req": "card.aux",
                              "mode": "motion"
                            }
                            J *req = NoteNewRequest("card.aux");
                            JAddStringToObject(req, "mode", "motion");
                            
                            NoteRequest(req);
                            req = {"req": "card.aux"}
                            req["mode"] = "motion"
                            card.Transaction(req)

                            Supplement autonomous tracking with digital inputs and a status output.

                              {
                                "req": "card.aux",
                                "mode": "track"
                              }
                              J *req = NoteNewRequest("card.aux");
                              JAddStringToObject(req, "mode", "track");
                              
                              NoteRequest(req);
                              req = {"req": "card.aux"}
                              req["mode"] = "track"
                              card.Transaction(req)

                              Enhance the built-in sensor readings from the Notecard with temperature, pressure, and humidity readings through an external BME280 sensor.

                                {
                                  "req": "card.aux",
                                  "mode": "track",
                                  "gps": true
                                }
                                J *req = NoteNewRequest("card.aux");
                                JAddStringToObject(req, "mode", "track");
                                JAddBoolToObject(req, "gps", true);
                                
                                NoteRequest(req);
                                req = {"req": "card.aux"}
                                req["mode"] = "track"
                                req["gps"] = True
                                card.Transaction(req)

                                When the gps:true parameter is set, this mode disables the internal GNSS/GPS and looks for an external GNSS/GPS module. See Using AUX Track Mode with an External GPS for more information.

                                  {
                                    "req": "card.aux",
                                    "mode": "gpio",
                                    "usage": [
                                      "off", // AUX1
                                      "low", // AUX2
                                      "high", // AUX3
                                      "input" // AUX4
                                    ]
                                  }
                                  J *req = NoteNewRequest("card.aux");
                                  JAddStringToObject(req, "mode", "gpio");
                                  
                                  J *pins = JCreateArray();
                                  JAddItemToArray(pins, "off");   // AUX1
                                  JAddItemToArray(pins, "low");   // AUX2
                                  JAddItemToArray(pins, "high");  // AUX3
                                  JAddItemToArray(pins, "input"); // AUX4
                                  JAddArrayToObject(req, "usage", pins);
                                  
                                  NoteRequest(req);
                                  req = {"req": "card.aux"}
                                  req["mode"] = "gpio"
                                  req["usage"] = [
                                      "off", # AUX1
                                      "low", # AUX2
                                      "high", # AUX3
                                      "input" # AUX4
                                    ]
                                  card.Transaction(req)

                                  Configure the Notecard for GPIO mode with AUX1 OFF, AUX2 as an output LOW, AUX3 as an output HIGH, and AUX4 as an input.

                                    {
                                      "req": "card.aux",
                                      "mode": "gpio",
                                      "usage": [
                                        "off", // AUX1
                                        "low", // AUX2
                                        "high", // AUX3
                                        "count" // AUX4
                                      ],
                                      "seconds": 2,
                                      "max": 5,
                                      "start": true
                                    }
                                    J *req = NoteNewRequest("card.aux");
                                    JAddStringToObject(req, "mode", "gpio");
                                    
                                    J *pins = JCreateArray();
                                    JAddItemToArray(pins, "off");   // AUX1
                                    JAddItemToArray(pins, "low");   // AUX2
                                    JAddItemToArray(pins, "high");  // AUX3
                                    JAddItemToArray(pins, "count"); // AUX4
                                    JAddArrayToObject(req, "usage", pins);
                                    
                                    JAddNumberToObject(req, "seconds", 2);
                                    JAddNumberToObject(req, "max", 5);
                                    JAddBoolToObject(req, "start", true);
                                    
                                    NoteRequest(req);
                                    req = {"req": "card.aux"}
                                    req["mode"] = "gpio"
                                    req["usage"] = [
                                        "off", # AUX1
                                        "low", # AUX2
                                        "high", # AUX3
                                        "input" # AUX4
                                      ]
                                    req["seconds"] = 2
                                    req["max"] = 5
                                    req["start"] = True
                                    card.Transaction(req)
                                      {
                                        "req":  "card.aux",
                                        "mode": "-",
                                        "rate": 9600
                                      }
                                      J *req = NoteNewRequest("card.aux");
                                      JAddStringToObject(req, "mode", "-");
                                      JAddNumberToObject(req, "rate", 9600);
                                      
                                      NoteRequest(req);
                                      req = {"req": "card.aux"}
                                      req["mode"] = "-"
                                      req["rate"] = 9600
                                      card.Transaction(req)
                                      Response Members

                                      mode

                                      string

                                      The current AUX mode, or off if not set.

                                      state

                                      array of JSON objects

                                      When in AUX gpio mode, the state of each AUX pin. Possible values are:

                                      {} when the pin is off.

                                      {"high": true}

                                      {"low": true}

                                      {"input": true}

                                      {"count": [4]} where each item in the array is the count per sample.

                                      time

                                      UNIX Epoch time

                                      When in AUX gpio mode, and if count is enabled on an AUX pin, the time that counting started.

                                      seconds

                                      integer

                                      When in AUX gpio mode, and if count is enabled on an AUX pin, the number of seconds per sample.

                                      Example Response
                                      {
                                        "mode": "gpio",
                                        "state": [
                                          {}, // AUX1
                                          { "low": true }, // AUX2
                                          { "high": true }, // AUX3
                                          { "count": [3] } // AUX4
                                        ],
                                        "time": 1592587637,
                                        "seconds": 2
                                      }
                                      More information:
                                      • Working with the Notecard AUX Pins

                                      card.carrier

                                      Uses the AUX5 pin on the Notecard edge connector to notify the Notecard that the pin is connected to a Notecarrier that supports charging, using open-drain.

                                      Once set, {"charging":true} will appear in a response if the Notecarrier is currently indicating that charging is in progress.

                                      Arguments

                                      mode

                                      string

                                      The AUX5 mode. Set to "charging" to tell the Notecard that AUX5 is connected to a Notecarrier that supports charging on AUX5. Set to "-" or "off" to turn off the AUX5 detection.

                                          {
                                            "req": "card.carrier",
                                            "mode": "charging"
                                          }
                                          J *req = NoteNewRequest("card.carrier");
                                          JAddStringToObject(req, "mode", "charging");
                                          
                                          NoteRequest(req);
                                          req = {"req": "card.carrier"}
                                          req["mode"] = "charging"
                                          card.Transaction(req)
                                          Response Members

                                          mode

                                          string

                                          The current AUX5 mode, or off if not set.

                                          charging

                                          boolean

                                          Will display true when in AUX5 "charging" mode.

                                          Example Response
                                          {
                                           "mode": "charging",
                                           "charging": true
                                          }

                                          card.contact

                                          Used to set or retrieve information about the Notecard maintainer. Once set, this information is synched to Notehub and can be found in the _env.dbs file.

                                          Arguments

                                          name

                                          string (optional)

                                          org

                                          string (optional)

                                          role

                                          string (optional)

                                          email

                                          string (optional)

                                              {
                                                "req": "card.contact",
                                                "name": "Tom Turkey",
                                                "org": "Blues Wireless",
                                                "role": "Head of Security",
                                                "email": "tom@blues.com"
                                              }
                                              J *req = NoteNewRequest("card.contact");
                                              JAddStringToObject(req, "name", "Tom Turkey");
                                              JAddStringToObject(req, "org", "Blues Wireless");
                                              JAddStringToObject(req, "role", "Head of Security");
                                              JAddStringToObject(req, "email", "tom@blues.com");
                                              
                                              NoteRequest(req);
                                              req = {"req": "card.contact"}
                                              req["name"] = "Tom Turkey"
                                              req["org"] = "Blues Wireless"
                                              req["role"] = "Head of Security"
                                              req["email"] = "tom@blues.com"
                                              rsp = card.Transaction(req)
                                              Response Members

                                              name

                                              string

                                              Name of the Notecard maintainer.

                                              org

                                              string

                                              Organization name of the Notecard maintainer.

                                              role

                                              string

                                              Role of the Notecard maintainer.

                                              email

                                              string

                                              Email address of the Notecard maintainer.

                                              Example Response
                                              {
                                                "name": "Tom Turkey",
                                                "org":  "Blues Wireless",
                                                "role":  "Head of Security",
                                                "email": "tom@blues.com"
                                              }

                                              card.io

                                              Can be used to override the Notecard's I2C address from its default of 0x17.

                                              Arguments

                                              i2c

                                              decimal (optional)

                                              The alternate address to use for I2C communication. Pass -1 to reset to the default address.

                                                  {
                                                    "req": "card.io",
                                                    "i2c": 24
                                                  }
                                                  J *req = NoteNewRequest("card.io");
                                                  JAddNumberToObject(req, "i2c", 24);
                                                  
                                                  NoteRequest(req);
                                                  req = {"req": "card.io"}
                                                  req["i2c"] = 24
                                                  card.Transaction(req)

                                                  Set the I2C address to 0x18.

                                                  Response Members
                                                  None: an empty object {} means success.

                                                  card.location

                                                  Retrieves the current location of the Notecard.

                                                  Arguments
                                                  None
                                                      { "req": "card.location" }
                                                      J *req = NoteNewRequest("card.location");
                                                      
                                                      NoteRequest(req);
                                                      req = {"req": "card.location"}
                                                      rsp = card.Transaction(req)
                                                      Response Members

                                                      status

                                                      string

                                                      The current status of the Notecard GPS connection.

                                                      mode

                                                      string

                                                      The GPS connection mode. Will be continuous, periodic, or off.

                                                      lat

                                                      decimal

                                                      The latitude in degrees of the last known location.

                                                      lon

                                                      decimal

                                                      The longitude in degrees of the last known location.

                                                      time

                                                      UNIX Epoch time

                                                      The time of location capture.

                                                      max

                                                      integer

                                                      If a geofence is enabled by card.location.mode, meters from the geofence center.

                                                      Example Response
                                                      {
                                                        "status": "GPS updated (58 sec, 41dB SNR, 9 sats) {gps-active}
                                                                  {gps-signal} {gps-sats} {gps}",
                                                        "mode":   "periodic",
                                                        "lat":    42.577600,
                                                        "lon":    -70.871340,
                                                        "time":   1598554399,
                                                        "max":    25
                                                      }
                                                      More information:
                                                      • Notecard Time & Location Requests

                                                      card.location.mode

                                                      Sets location-related configuration settings. Retrieves the current location mode when passed with no argument.

                                                      Arguments

                                                      mode

                                                      string (optional)

                                                      Must be one of:

                                                      "" to retrieve the current mode.

                                                      "off" to turn location mode off.

                                                      "periodic" to sample location at a specified interval, if the device has moved.

                                                      "continuous" to enable the Notecard's GNSS module for continuous sampling.

                                                      seconds

                                                      int (optional)

                                                      When in periodic mode, location will be sampled at this interval, if the Notecard detects motion. If seconds is < 300, during periods of sustained movement the Notecard will leave the GPS on continuously to avoid powering GPS on and off repeatedly.

                                                      vseconds

                                                      string (optional)

                                                      In periodic mode, overrides seconds with a voltage-variable value.

                                                      delete

                                                      boolean (optional)

                                                      Set to true to delete the last known location stored in the Notecard.

                                                      max

                                                      int (optional)

                                                      Meters from a geofence center. Used to enable geofence location tracking.

                                                      lat

                                                      decimal (Default: last known location)

                                                      When geofence is enabled, latitude in degrees of the geofence center.

                                                      lon

                                                      decimal (Default: last known location)

                                                      When geofence is enabled, longitude in degrees of the geofence center.

                                                      minutes

                                                      int (Default: 5)

                                                      When geofence is enabled, the number of minutes the device should be outside the geofence before the Notecard location is tracked.

                                                      threshold

                                                      int (Default: 0)

                                                      When in periodic mode, the number of motion events (registered by the built-in accelerometer) required to trigger GPS to turn on.

                                                          {
                                                            "req": "card.location.mode",
                                                            "mode": "continuous"
                                                          }
                                                          J *req = NoteNewRequest("card.location.mode");
                                                          JAddStringToObject(req, "mode", "continuous");
                                                          
                                                          NoteRequest(req);
                                                          req = {"req": "card.location.mode"}
                                                          req["mode"] = "continuous"
                                                          rsp = card.Transaction(req)
                                                            {
                                                              "req": "card.location.mode",
                                                              "mode": "periodic",
                                                              "seconds": 3600
                                                            }
                                                            J *req = NoteNewRequest("card.location.mode");
                                                            JAddStringToObject(req, "mode", "periodic");
                                                            JAddNumberToObject(req, "seconds", 3600);
                                                            
                                                            NoteRequest(req);
                                                            req = {"req": "card.location.mode"}
                                                            req["mode"] = "periodic"
                                                            req["seconds"] = 3600
                                                            rsp = card.Transaction(req)
                                                              {
                                                                "req": "card.location.mode",
                                                                "mode": "periodic",
                                                                "vseconds": "usb:3600;high:14400;normal:43200;low:86400;dead:0"
                                                              }
                                                              J *req = NoteNewRequest("card.location.mode");
                                                              JAddStringToObject(req, "mode", "periodic");
                                                              JAddStringToObject(req, "vseconds", "usb:3600;high:14400;normal:43200;low:86400;dead:0");
                                                              
                                                              NoteRequest(req);
                                                              req = {"req": "card.location.mode"}
                                                              req["mode"] = "periodic"
                                                              req["vseconds"] = "usb:3600;high:14400;normal:43200;low:86400;dead:0"
                                                              rsp = card.Transaction(req)
                                                                {
                                                                  "req": "card.location.mode",
                                                                  "mode": "periodic",
                                                                  "lat": 42.5776,
                                                                  "lon": -70.87134,
                                                                  "max": 100,
                                                                  "minutes": 2
                                                                }
                                                                J *req = NoteNewRequest("card.location.mode");
                                                                JAddStringToObject(req, "mode", "periodic");
                                                                JAddNumberToObject(req, "lat", 42.577600);
                                                                JAddNumberToObject(req, "lon", -70.871340);
                                                                JAddNumberToObject(req, "max", 100);
                                                                JAddNumberToObject(req, "minutes", 2);
                                                                
                                                                NoteRequest(req);
                                                                req = {"req": "card.location.mode"}
                                                                req["mode"] = "periodic"
                                                                req["lat"] = 42.577600
                                                                req["lon"] = -70.871340
                                                                req["max"] = 100
                                                                req["minutes"] = 2
                                                                rsp = card.Transaction(req)
                                                                Response Members

                                                                mode

                                                                string

                                                                The current location mode.

                                                                seconds

                                                                integer

                                                                If specified, the periodic sample interval.

                                                                vseconds

                                                                string

                                                                If specified, the voltage-variable period.

                                                                max

                                                                integer

                                                                If geofence is enabled, the meters from geofence center.

                                                                lat

                                                                decimal

                                                                If geofence is enabled, the geofence center latitude in degrees.

                                                                lon

                                                                decimal

                                                                If geofence is enabled, the geofence center longitude in degrees.

                                                                minutes (Added in v1.5.3)

                                                                integer

                                                                If geofence is enabled, the currently configured geofence debounce period.

                                                                Example Response
                                                                {
                                                                  "mode": "continuous",
                                                                  "max": 100,
                                                                  "lat": 42.5776,
                                                                  "lon": -70.87134,
                                                                  "minutes": 2
                                                                }
                                                                More information:
                                                                • Location Continuous Mode
                                                                • Location Periodic Mode
                                                                • Location Sampling at Voltage Variable Intervals
                                                                • Geofencing with the Notecard

                                                                card.location.track

                                                                Store location data in a Notefile at the periodic interval, or using a specified heartbeat. Only available when card.location.mode has been set to periodic.

                                                                Arguments

                                                                start

                                                                boolean

                                                                Set to true to start Notefile tracking.

                                                                heartbeat

                                                                boolean

                                                                When start is true, set to true to enable tracking even when motion is not detected.

                                                                sync (Added in v1.5.5)

                                                                boolean

                                                                Set to true to perform an immediate sync to the Notehub each time a new Note is added.

                                                                stop

                                                                boolean

                                                                Set to true to stop Notefile tracking.

                                                                hours

                                                                integer

                                                                If heartbeat is true, add a heartbeat entry at this interval.

                                                                file

                                                                string (Default: _track.qo)

                                                                The Notefile in which to store tracked location data.

                                                                    {
                                                                      "req": "card.location.track",
                                                                      "start": true,
                                                                      "file": "locations.qo"
                                                                    }
                                                                    J *req = NoteNewRequest("card.location.track");
                                                                    JAddBoolToObject(req, "sync", true);
                                                                    JAddStringToObject(req, "file", "locations.qo");
                                                                    
                                                                    NoteRequest(req);
                                                                    req = {"req": "card.location.track"}
                                                                    req["sync"] = True
                                                                    req["file"] = "locations.qo"
                                                                    rsp = card.Transaction(req)
                                                                      {
                                                                        "req": "card.location.track",
                                                                        "stop": true
                                                                      }
                                                                      J *req = NoteNewRequest("card.location.track");
                                                                      JAddBoolToObject(req, "stop", true);
                                                                      
                                                                      NoteRequest(req);
                                                                      req = {"req": "card.location.track"}
                                                                      req["stop"] = True
                                                                      rsp = card.Transaction(req)
                                                                        {
                                                                          "req": "card.location.track",
                                                                          "start": true,
                                                                          "heartbeat": true,
                                                                          "hours": 2
                                                                        }
                                                                        J *req = NoteNewRequest("card.location.track");
                                                                        JAddBoolToObject(req, "sync", true);
                                                                        JAddBoolToObject(req, "heartbeat", true);
                                                                        JAddNumberToObject(req, "hours", 2);
                                                                        
                                                                        NoteRequest(req);
                                                                        req = {"req": "card.location.track"}
                                                                        req["sync"] = True
                                                                        req["heartbeat"] = True
                                                                        req["hours"] = 2
                                                                        rsp = card.Transaction(req)
                                                                        Response Members

                                                                        start

                                                                        boolean

                                                                        true if tracking is enabled.

                                                                        stop

                                                                        boolean

                                                                        true if tracking is disabled.

                                                                        heartbeat

                                                                        boolean

                                                                        true if heartbeat is enabled.

                                                                        seconds

                                                                        integer

                                                                        If tracking is enabled and a heartbeat hours value is not set, the tracking interval set in card.location.mode.

                                                                        hours

                                                                        integer

                                                                        The heartbeat interval, if provided.

                                                                        file

                                                                        string

                                                                        The tracking Notefile, if provided.

                                                                        Example Response
                                                                        {
                                                                          "start": true,
                                                                          "heartbeat": true,
                                                                          "file": "locations.qo",
                                                                          "hours": 2
                                                                        }
                                                                        More information:
                                                                        • Tracking GPS Location Readings

                                                                        card.monitor

                                                                        Configure the general-purpose AUX1-AUX4 pins on the Notecard edge connector to test and monitor Notecard activity.

                                                                        note

                                                                        Utilizing these pins requires a physical connection to each, separate from a communications connection with the Notecard.

                                                                        Arguments

                                                                        mode

                                                                        string (optional)

                                                                        Can be set to one of green, red or yellow to temporarily override the behavior of an AUX pin LED.

                                                                        count

                                                                        int (optional)

                                                                        The number of pulses to send to the overridden AUX pin LED. Set this value to 0 to return the LED to its default behavior.

                                                                        usb

                                                                        boolean (optional)

                                                                        Set to true to configure LED behavior so that it is only active when the Notecard is connected to USB power.

                                                                            {
                                                                              "req": "card.monitor",
                                                                              "mode": "green",
                                                                              "count": 5
                                                                            }
                                                                            J *req = NoteNewRequest("card.monitor");
                                                                            JAddStringToObject(req, "mode", "green");
                                                                            JAddNumberToObject(req, "count", 5);
                                                                            
                                                                            NoteRequest(req);
                                                                            req = {"req": "card.monitor"}
                                                                            req["mode"] = "green"
                                                                            req["count"] = 5
                                                                            card.Transaction(req)
                                                                            Response Members
                                                                            None: an empty object {} means success.
                                                                            More information:
                                                                            • Using Monitor Mode

                                                                            card.motion

                                                                            Returns information about the Notecard's motion and orientation. Motion tracking must be enabled first with card.motion.mode. Otherwise, this request will return {}.

                                                                            Arguments

                                                                            minutes

                                                                            integer (optional)

                                                                            Amount of time to sample for buckets of movement. For instance, 5 will sample motion events for the previous five minutes and return a movements string with motion counts in each bucket.

                                                                                {
                                                                                  "req": "card.motion",
                                                                                  "minutes": 2
                                                                                }
                                                                                J *req = NoteNewRequest("card.motion");
                                                                                JAddNumberToObject(req, "minutes", 2);
                                                                                
                                                                                NoteRequest(req);
                                                                                req = {"req": "card.motion"}
                                                                                req["minutes"] = 2
                                                                                rsp = card.Transaction(req)
                                                                                Response Members

                                                                                count

                                                                                integer

                                                                                The number of motion events since the card.motion request was last made.

                                                                                alert

                                                                                boolean

                                                                                true if the Notecard detected a free-fall since the last request to card.motion.

                                                                                motion

                                                                                UNIX Epoch time

                                                                                Time of the last motion event.

                                                                                status

                                                                                string

                                                                                comma-separated list of orientation events that ocurred since the last request to card.motion. One or more of the following:

                                                                                "face-up"

                                                                                "face-down"

                                                                                "portrait-up"

                                                                                "portrait-down"

                                                                                "landscape-right"

                                                                                "landscape-left"

                                                                                seconds

                                                                                integer

                                                                                If the minutes argument is provided, the duration of each bucket of sample movements.

                                                                                movements

                                                                                string

                                                                                If the minutes argument is provided, a string of base-36 characters, where each character represents the number of movements in each bucket during the sample duration. Each character will be a digit 0-9, A-Z to indicate a count of 10-35, or * to indicate a count greater than 35.

                                                                                Example Response
                                                                                {
                                                                                  "count": 17,
                                                                                  "status": "face-up",
                                                                                  "alert": true,
                                                                                  "motion": 1599741952,
                                                                                  "seconds": 5,
                                                                                  "movements": "520000000000000000000A"
                                                                                }
                                                                                More information:
                                                                                • Motion Monitoring
                                                                                • Retrieving Motion Results over a Time Period

                                                                                card.motion.mode

                                                                                Configures motion monitoring parameters used when providing results to card.motion.

                                                                                Arguments

                                                                                start

                                                                                boolean (optional)

                                                                                true to enable the Notecard accelerometer and start motion tracking.

                                                                                stop

                                                                                boolean (optional)

                                                                                true to disable the Notecard accelerometer stop motion tracking.

                                                                                seconds

                                                                                integer (optional)

                                                                                Period for each bucket of movements to be accumulated when minutes is used with card.motion.

                                                                                sensitivity

                                                                                integer (Default 1)

                                                                                The sensitivity level of the Notecard's accelerometer. Must be one of:

                                                                                1 for 7.808G (lowest sensitivity)

                                                                                2 for 3.904G

                                                                                3 for 1.952G

                                                                                4 for 0.976G

                                                                                5 for 0.244G (highest sensitivity)

                                                                                    {
                                                                                      "req": "card.motion.mode",
                                                                                      "start": true,
                                                                                      "seconds": 10,
                                                                                      "sensitivity": 2
                                                                                    }
                                                                                    J *req = NoteNewRequest("card.motion.mode");
                                                                                    JAddBoolToObject(req, "start", true);
                                                                                    JAddNumberToObject(req, "seconds", 10);
                                                                                    JAddNumberToObject(req, "sensitivity", 2);
                                                                                    
                                                                                    NoteRequest(req);
                                                                                    req = {"req": "card.motion.mode"}
                                                                                    req["start"] = True
                                                                                    req["seconds"] = 10
                                                                                    req["sensitivity"] = 2
                                                                                    card.Transaction(req)
                                                                                    Response Members
                                                                                    None: an empty object {} means success.
                                                                                    More information:
                                                                                    • Configuring Motion Monitoring with card.motion.mode

                                                                                    card.motion.sync

                                                                                    Configures automatic sync triggered by Notecard movement.

                                                                                    Arguments

                                                                                    start

                                                                                    boolean (optional)

                                                                                    true to start motion-triggered syncing.

                                                                                    stop

                                                                                    boolean (optional)

                                                                                    true to stop motion-triggered syncing.

                                                                                    minutes

                                                                                    integer (optional)

                                                                                    The maximum frequency at which sync will be triggered. Even if a threshold is set and exceeded, there will only be a single sync for this amount of time.

                                                                                    count

                                                                                    integer (optional)

                                                                                    The number of most recent motion buckets to examine.

                                                                                    threshold

                                                                                    integer (optional)

                                                                                    The number of buckets that must indicate motion in order to trigger a sync.

                                                                                        {
                                                                                          "req": "card.motion.sync",
                                                                                          "start": true,
                                                                                          "minutes": 20,
                                                                                          "count": 20,
                                                                                          "threshold": 5
                                                                                        }
                                                                                        J *req = NoteNewRequest("card.motion.sync");
                                                                                        JAddBoolToObject(req, "start", true);
                                                                                        JAddNumberToObject(req, "minutes", 20);
                                                                                        JAddNumberToObject(req, "count", 20);
                                                                                        JAddNumberToObject(req, "threshold", 5);
                                                                                        
                                                                                        NoteRequest(req);
                                                                                        req = {"req": "card.motion.sync"}
                                                                                        req["start"] = True
                                                                                        req["minutes"] = 20
                                                                                        req["count"] = 20
                                                                                        req["threshold"] = 5
                                                                                        card.Transaction(req)
                                                                                        Response Members
                                                                                        None: an empty object {} means success.
                                                                                        More information:
                                                                                        • Configuring Notehub Sync on Motion

                                                                                        card.motion.track

                                                                                        Configures automatic capture of Notecard motion in a Notefile.

                                                                                        Arguments

                                                                                        start

                                                                                        boolean (optional)

                                                                                        true to start motion capture.

                                                                                        stop

                                                                                        boolean (optional)

                                                                                        true to stop motion capture.

                                                                                        minutes

                                                                                        integer (optional)

                                                                                        The maximum period to capture Notes in the Notefile.

                                                                                        count

                                                                                        integer (optional)

                                                                                        The number of most recent motion buckets to examine.

                                                                                        threshold

                                                                                        integer (optional)

                                                                                        The number of buckets that must indicate motion in order to capture.

                                                                                        file

                                                                                        string (Default _motion.qo)

                                                                                        The Notefile to use for motion capture Notes.

                                                                                            {
                                                                                              "req": "card.motion.track",
                                                                                              "start": true,
                                                                                              "minutes": 20,
                                                                                              "count": 20,
                                                                                              "threshold": 5,
                                                                                              "file": "movements.qo"
                                                                                            }
                                                                                            J *req = NoteNewRequest("card.motion.track");
                                                                                            JAddBoolToObject(req, "start", true);
                                                                                            JAddNumberToObject(req, "minutes", 20);
                                                                                            JAddNumberToObject(req, "count", 20);
                                                                                            JAddNumberToObject(req, "threshold", 5);
                                                                                            JAddStringToObject(req, "file", "movements.qo");
                                                                                            
                                                                                            NoteRequest(req);
                                                                                            req = {"req": "card.motion.track"}
                                                                                            req["start"] = True
                                                                                            req["minutes"] = 20
                                                                                            req["count"] = 20
                                                                                            req["threshold"] = 5
                                                                                            req["file"] = "movements.qo"
                                                                                            card.Transaction(req)
                                                                                            Response Members
                                                                                            None: an empty object {} means success.
                                                                                            More information:
                                                                                            • Automatic Motion Capture

                                                                                            card.random

                                                                                            Added in v1.5.3

                                                                                            Obtain a single random 32 bit unsigned integer modulo count or count bytes of random data from the Notecard hardware random number generator.

                                                                                            Arguments

                                                                                            mode

                                                                                            string (optional)

                                                                                            Accepts a single value "payload" and, if specified, uses the count value to determine the number of bytes of random data to generate and return to the host.

                                                                                            count

                                                                                            int

                                                                                            If the mode argument is excluded from the request, the Notecard uses this as an upper-limit parameter and returns a random unsigned 32 bit integer between zero and the value provided.

                                                                                            If "mode":"payload" is used, this argument sets the number of random bytes of data to return in a base64-encoded buffer from the Notecard.

                                                                                                {
                                                                                                  "req": "card.random",
                                                                                                  "count": 100
                                                                                                }
                                                                                                J *req = NoteNewRequest("card.random");
                                                                                                JAddNumberToObject(req, "count", 100);
                                                                                                NoteRequest(req);
                                                                                                req = {"req": "card.random"}
                                                                                                req["count"] = 100
                                                                                                rsp = card.Transaction(req)
                                                                                                  {
                                                                                                    "req":"card.random",
                                                                                                    "mode": "payload",
                                                                                                    "count":100
                                                                                                  }
                                                                                                  J *req = NoteNewRequest("card.random");
                                                                                                  JAddStringToObject(req, "mode", "payload");
                                                                                                  JAddNumberToObject(req, "count", 100);
                                                                                                  NoteRequest(req);
                                                                                                  Response Members

                                                                                                  count

                                                                                                  int

                                                                                                  A random number generated by the Notecard's onboard hardware random number generator.

                                                                                                  payload

                                                                                                  bas64 string

                                                                                                  If using "mode":"payload", a base64-encoded string with random values, the length of which is specified by the count argument.

                                                                                                  Example Response
                                                                                                  {
                                                                                                    "count": 86
                                                                                                  }

                                                                                                  card.restart

                                                                                                  Performs a firmware restart of the Notecard.

                                                                                                  Arguments
                                                                                                  None
                                                                                                      {
                                                                                                        "req": "card.restart"
                                                                                                      }
                                                                                                      J *req = NoteNewRequest("card.restart");
                                                                                                      
                                                                                                      NoteRequest(req);
                                                                                                      req = {"req": "card.restart"}
                                                                                                      card.Transaction(req)
                                                                                                      Response Members
                                                                                                      None: an empty object {} means success.

                                                                                                      card.restore

                                                                                                      Performs a factory reset on the Notecard and restarts.

                                                                                                      Arguments

                                                                                                      delete

                                                                                                      boolean (optional)

                                                                                                      true to also clear out configuration settings (for example, the ProductUID). Please note that the Notecard will be unable to sync to notehub until the ProductUID is re-set if this option is used.

                                                                                                      connected (Added in v1.5.5)

                                                                                                      boolean (optional)

                                                                                                      true to request the Notehub perform a device specific factory reset (delete and deprovision) the next time the Notecard connects. Conversely, if connected is false (or omitted), then the Notecard's settings and data will be restored from the Notehub the next time the Notecard connects.

                                                                                                          {
                                                                                                            "req": "card.restore",
                                                                                                            "delete": true,
                                                                                                            "connected": true
                                                                                                          }
                                                                                                          J *req = NoteNewRequest("card.restore");
                                                                                                          JAddBoolToObject(req, "delete", true);
                                                                                                          JAddBoolToObject(req, "connected", true);
                                                                                                          
                                                                                                          NoteRequest(req);
                                                                                                          req = {"req": "card.restore"}
                                                                                                          req["delete"] = True
                                                                                                          req["connected"] = True
                                                                                                          card.Transaction(req)
                                                                                                          Response Members
                                                                                                          None: an empty object {} means success.

                                                                                                          card.status

                                                                                                          Returns general information about the Notecard's operating status.

                                                                                                          Arguments
                                                                                                          None
                                                                                                              {
                                                                                                                "req": "card.status"
                                                                                                              }
                                                                                                              J *req = NoteNewRequest("card.status");
                                                                                                              
                                                                                                              NoteRequest(req);
                                                                                                              req = {"req": "card.status"}
                                                                                                              rsp = card.Transaction(req)
                                                                                                              Response Members

                                                                                                              status

                                                                                                              string

                                                                                                              General status information.

                                                                                                              usb

                                                                                                              boolean

                                                                                                              true is the Notecard is being powered by USB.

                                                                                                              storage

                                                                                                              integer

                                                                                                              The percentage of storage in use on the Notecard.

                                                                                                              time

                                                                                                              UNIX Epoch time

                                                                                                              Set if the Notecard did not have the current UNIX Epoch time at startup.

                                                                                                              connected

                                                                                                              boolean

                                                                                                              true if connected to Notehub.

                                                                                                              cell

                                                                                                              boolean

                                                                                                              true if the modem is currently powered on.

                                                                                                              Example Response
                                                                                                              {
                                                                                                                "status":    "{normal}",
                                                                                                                "usb":       true,
                                                                                                                "storage":   8,
                                                                                                                "time":      1599684765,
                                                                                                                "connected": true,
                                                                                                                "cell":      true
                                                                                                              }

                                                                                                              card.temp

                                                                                                              Get the current temperature from the Notecard's onboard calibrated temperature sensor.

                                                                                                              Arguments

                                                                                                              seconds

                                                                                                              int (optional)

                                                                                                              If specified, creates a templated _temp.qo file that gathers Notecard temperature value at the specified seconds interval. When using card.aux track mode, the sensor temperature, pressure, and humidity is also included with each Note.

                                                                                                              stop

                                                                                                              boolean (optional)

                                                                                                              If set to true, the Notecard will stop logging the temperature value at the interval specified with the seconds parameter (see above).

                                                                                                                  {
                                                                                                                    "req": "card.temp"
                                                                                                                  }
                                                                                                                  J *req = NoteNewRequest("card.temp");
                                                                                                                  
                                                                                                                  NoteRequest(req);
                                                                                                                  req = {"req": "card.temp"}
                                                                                                                  rsp = card.Transaction(req)
                                                                                                                    {
                                                                                                                      "req": "card.temp",
                                                                                                                      "seconds": 360
                                                                                                                    }
                                                                                                                    J *req = NoteNewRequest("card.temp");
                                                                                                                    JAddNumberToObject(req, "seconds", 360);
                                                                                                                    
                                                                                                                    NoteRequest(req);
                                                                                                                    req = {"req": "card.temp"}
                                                                                                                    req["seconds"] = 360
                                                                                                                    rsp = card.Transaction(req)
                                                                                                                    Response Members

                                                                                                                    value

                                                                                                                    decimal

                                                                                                                    The current temperature in degrees centigrade, including the calibration offset.

                                                                                                                    calibration

                                                                                                                    decimal

                                                                                                                    The calibration differential of the sensor.

                                                                                                                    Example Response
                                                                                                                    {
                                                                                                                      "value": 27.625,
                                                                                                                      "calibration": -3.0
                                                                                                                    }
                                                                                                                    More information:
                                                                                                                    • Notecard Temperature Monitoring

                                                                                                                    card.time

                                                                                                                    Retrieves current date and time information. Upon power-up, the Notecard must complete a sync to Notehub in order to obtain time and location data. Before the time is obtained, this request will return {"zone":"UTC,Unknown"}.

                                                                                                                    Arguments
                                                                                                                    None
                                                                                                                        {
                                                                                                                          "req": "card.time"
                                                                                                                        }
                                                                                                                        J *req = NoteNewRequest("card.time");
                                                                                                                        
                                                                                                                        NoteRequest(req);
                                                                                                                        req = {"req": "card.time"}
                                                                                                                        rsp = card.Transaction(req)
                                                                                                                        Response Members

                                                                                                                        time

                                                                                                                        UNIX Epoch time

                                                                                                                        The current time. Will only populate if the Notecard has completed a sync to Notehub to obtain the time.

                                                                                                                        area

                                                                                                                        string

                                                                                                                        The geographic area of the Notecard, if the cell tower is recognized.

                                                                                                                        zone

                                                                                                                        string

                                                                                                                        The time zone of the Notecard, if the cell tower is recognized.

                                                                                                                        minutes

                                                                                                                        integer

                                                                                                                        Number of minutes East of GMT, if the cell tower is recognized.

                                                                                                                        lat

                                                                                                                        decimal

                                                                                                                        Latitude of the Notecard, if the cell tower is recognized.

                                                                                                                        lon

                                                                                                                        decimal

                                                                                                                        Longitude of the Notecard, if the cell tower is recognized.

                                                                                                                        country

                                                                                                                        string

                                                                                                                        The country where the Notecard is located, if the cell tower is recognized.

                                                                                                                        Example Response
                                                                                                                        {
                                                                                                                          "time": 1599769214,
                                                                                                                          "area": "Beverly, MA",
                                                                                                                          "zone": "CDT,America/New York",
                                                                                                                          "minutes": -300,
                                                                                                                          "lat": 42.5776,
                                                                                                                          "lon": -70.87134,
                                                                                                                          "country": "US"
                                                                                                                        }
                                                                                                                        More information:
                                                                                                                        • Obtaining the Current Time and Date

                                                                                                                        card.triangulate

                                                                                                                        Enables or disables a behavior by which the Notecard gathers information about surrounding cell towers or Wi-Fi access points before each connection to Notehub.

                                                                                                                        Arguments

                                                                                                                        mode

                                                                                                                        string

                                                                                                                        The triangulation approach to use for determining the Notecard location. The following keywords can be used separately or together in a comma-delimited list, in any order.

                                                                                                                        cell enables cell tower scanning to determine the position of the Device.

                                                                                                                        wifi enables the use of nearby Wi-Fi access points to determine the position of the Device. To leverage this feature, the host will need to provide access point information to the Notecard via the text argument in successive requests.

                                                                                                                        - to clear the currently-set triangulation mode.

                                                                                                                        on

                                                                                                                        boolean (Default: false)

                                                                                                                        true to instruct the Notecard to triangulate even if the module has not moved. Only takes effect when set is true.

                                                                                                                        usb

                                                                                                                        boolean (Default: false)

                                                                                                                        true to use perform triangulation only when the Notecard is connected to USB power. Only takes effect when set is true.

                                                                                                                        set

                                                                                                                        boolean (Default: false)

                                                                                                                        true to instruct the module to use the state of the on and usb arguments.

                                                                                                                        minutes

                                                                                                                        integer (Default: 0)

                                                                                                                        Minimum delay, in minutes, between triangulation attempts. Use 0 for no time-based suppression.

                                                                                                                        text

                                                                                                                        string (Optional)

                                                                                                                        When using Wi-Fi triangulation, a newline-terminated list of Wi-Fi access points obtained by the external module. Format should follow the ESP32's AT+CWLAP command output .

                                                                                                                        time

                                                                                                                        UNIX Epoch time (Optional)

                                                                                                                        When passed with text, records the time that the Wi-Fi access point scan was performed. If not provided, Notecard time is used.

                                                                                                                            {
                                                                                                                              "req": "card.triangulate",
                                                                                                                              "mode": "cell",
                                                                                                                              "on": true,
                                                                                                                              "set": true
                                                                                                                            }
                                                                                                                            J *req = NoteNewRequest("card.triangulate");
                                                                                                                            JAddStringToObject(req, "mode", "cell");
                                                                                                                            JAddBoolToObject(req, "on", true);
                                                                                                                            JAddBoolToObject(req, "set", true);
                                                                                                                            
                                                                                                                            NoteRequest(req);
                                                                                                                            req = {"req": "card.triangulate"}
                                                                                                                            req["mode"] = "cell"
                                                                                                                            req["on"] = True
                                                                                                                            req["set"] = True
                                                                                                                            rsp = card.Transaction(req)
                                                                                                                              {
                                                                                                                                "req": "card.triangulate",
                                                                                                                                "mode": "wifi,cell",
                                                                                                                                "on": true,
                                                                                                                                "usb": true,
                                                                                                                                "set": true
                                                                                                                              }
                                                                                                                              J *req = NoteNewRequest("card.triangulate");
                                                                                                                              JAddStringToObject(req, "mode", "wifi,cell");
                                                                                                                              JAddBoolToObject(req, "on", true);
                                                                                                                              JAddBoolToObject(req, "usb", true);
                                                                                                                              JAddBoolToObject(req, "set", true);
                                                                                                                              
                                                                                                                              NoteRequest(req);
                                                                                                                              req = {"req": "card.triangulate"}
                                                                                                                              req["mode"] = "wifi,cell"
                                                                                                                              req["on"] = True
                                                                                                                              req["usb"] = True
                                                                                                                              req["set"] = True
                                                                                                                              rsp = card.Transaction(req)
                                                                                                                                {
                                                                                                                                  "req": "card.triangulate",
                                                                                                                                  "text": "+CWLAP:(4,\"Blues\",-51,\"74:ac:b9:12:12:f8\",1)\r\n+CWLAP:(3,\"AAAA-62DD\",-70,\"6c:55:e8:91:62:e1\",11)\r\n+CWLAP:(4,\"Blues\",-81,\"74:ac:b9:11:12:23\",1)\r\n+CWLAP:(4,\"Blues\",-82,\"74:ac:a9:12:19:48\",11)\r\n+CWLAP:(4,\"Free Parking\",-83,\"02:18:4a:11:60:31\",6)\r\n+CWLAP:(5,\"GO\",-84,\"01:13:6a:13:90:30\",6)\r\n+CWLAP:(4,\"AAAA-5C62-2.4\",-85,\"d8:97:ba:7b:fd:60\",1)\r\n+CWLAP:(3,\"DIRECT-a5-HP MLP50\",-86,\"fa:da:0c:1b:16:a5\",6)\r\n+CWLAP:(3,\"DIRECT-c6-HP M182 LaserJet\",-88,\"da:12:65:44:31:c6\",6)\r\n\r\n"
                                                                                                                                }
                                                                                                                                J *req = NoteNewRequest("card.triangulate");
                                                                                                                                JAddStringToObject(req, "text", "+CWLAP:(4,\"Blues\",-51,\"74:ac:b9:16:15:f8\",1)\r\n+CWLAP:(3,\"CBCI-62DD\",-70,\"6c:55:e8:91:62:e1\",11)\r\n+CWLAP:(4,\"Blues\",-81,\"74:ac:b9:16:16:80\",1)\r\n+CWLAP:(4,\"Blues\",-82,\"74:ac:b9:16:19:48\",11)\r\n+CWLAP:(4,\"Free Parking\",-83,\"02:18:4a:13:90:31\",6)\r\n+CWLAP:(5,\"GO\",-84,\"02:18:4a:13:90:30\",6)\r\n+CWLAP:(3,\"\",-84,\"7a:8a:20:51:da:c7\",6)\r\n+CWLAP:(4,\"CBCI-5C62-2.4\",-85,\"d8:97:ba:7b:fd:60\",1)\r\n+CWLAP:(3,\"PBW\",-85,\"78:8a:20:51:da:c7\",6)\r\n+CWLAP:(3,\"DIRECT-a5-HP MLP50\",-86,\"fa:da:0c:1b:16:a5\",6)\r\n+CWLAP:(3,\"DIRECT-c6-HP M182 LaserJet\",-88,\"da:12:65:44:31:c6\",6)\r\n\r\n");
                                                                                                                                
                                                                                                                                NoteRequest(req);
                                                                                                                                req = {"req": "card.triangulate"}
                                                                                                                                req["text"] = "+CWLAP:(4,\"Blues\",-51,\"74:ac:b9:12:12:f8\",1)\r\n+CWLAP:(3,\"AAAA-62DD\",-70,\"6c:55:e8:91:62:e1\",11)\r\n+CWLAP:(4,\"Blues\",-81,\"74:ac:b9:11:12:23\",1)\r\n+CWLAP:(4,\"Blues\",-82,\"74:ac:a9:12:19:48\",11)\r\n+CWLAP:(4,\"Free Parking\",-83,\"02:18:4a:11:60:31\",6)\r\n+CWLAP:(5,\"GO\",-84,\"01:13:6a:13:90:30\",6)\r\n+CWLAP:(4,\"AAAA-5C62-2.4\",-85,\"d8:97:ba:7b:fd:60\",1)\r\n+CWLAP:(3,\"DIRECT-a5-HP MLP50\",-86,\"fa:da:0c:1b:16:a5\",6)\r\n+CWLAP:(3,\"DIRECT-c6-HP M182 LaserJet\",-88,\"da:12:65:44:31:c6\",6)\r\n\r\n"
                                                                                                                                rsp = card.Transaction(req)
                                                                                                                                  {
                                                                                                                                    "req": "card.triangulate",
                                                                                                                                    "mode": "-"
                                                                                                                                  }
                                                                                                                                  J *req = NoteNewRequest("card.triangulate");
                                                                                                                                  JAddStringToObject(req, "mode", "-");
                                                                                                                                  
                                                                                                                                  NoteRequest(req);
                                                                                                                                  req = {"req": "card.triangulate"}
                                                                                                                                  req["mode"] = "-"
                                                                                                                                  rsp = card.Transaction(req)
                                                                                                                                  Response Members

                                                                                                                                  motion

                                                                                                                                  UNIX Epoch time

                                                                                                                                  Time of last detected Notecard movement.

                                                                                                                                  time

                                                                                                                                  UNIX Epoch time

                                                                                                                                  Time of last triangulation scan.

                                                                                                                                  mode

                                                                                                                                  string

                                                                                                                                  A comma-separated list indicating the active triangulation modes.

                                                                                                                                  on

                                                                                                                                  boolean

                                                                                                                                  true if triangulation scans will be performed even if the device has not moved.

                                                                                                                                  usb

                                                                                                                                  boolean

                                                                                                                                  true if triangulation scans will be performed only when the device is USB-powered.

                                                                                                                                  length

                                                                                                                                  integer

                                                                                                                                  The length of the text buffer provided in the current or a previous request.

                                                                                                                                  Example Response
                                                                                                                                  {
                                                                                                                                    "usb": true,
                                                                                                                                    "mode": "wifi,cell",
                                                                                                                                    "length": 443,
                                                                                                                                    "on": true,
                                                                                                                                    "time": 1606755042,
                                                                                                                                    "motion": 1606757487
                                                                                                                                  }
                                                                                                                                  More information:
                                                                                                                                  • Using Cell Tower Triangulation

                                                                                                                                  card.usage.get

                                                                                                                                  Returns the card's network usage statistics.

                                                                                                                                  note

                                                                                                                                  Usage data is updated by the Notecard at the end of each network connection. If connected in continuous mode, usage data will not be updated until the current session ends, which you can configure with the hub.set duration argument.

                                                                                                                                  Arguments

                                                                                                                                  mode

                                                                                                                                  string (Default: "total")

                                                                                                                                  The time period to use for statistics. Must be one of:

                                                                                                                                  "total" for all stats since the Notecard was activated.

                                                                                                                                  "1hour"

                                                                                                                                  "1day"

                                                                                                                                  "30day"

                                                                                                                                  offset

                                                                                                                                  integer (optional)

                                                                                                                                  The number of time periods to look backwards, based on the specified mode.

                                                                                                                                  To accurately determine the start of the calculated time period when using offset, use the time value of the response. Likewise, to calculate the end of the time period, add the seconds value to the time value.

                                                                                                                                      {
                                                                                                                                        "req": "card.usage.get",
                                                                                                                                        "mode": "1day",
                                                                                                                                        "offset": 5
                                                                                                                                      }
                                                                                                                                      J *req = NoteNewRequest("card.usage.get");
                                                                                                                                      JAddStringToObject(req, "mode", "1day");
                                                                                                                                      JAddNumberToObject(req, "offset", 5);
                                                                                                                                      
                                                                                                                                      NoteRequest(req);
                                                                                                                                      req = {"req": "card.usage.get"}
                                                                                                                                      req["mode"] = "1day"
                                                                                                                                      req["offset"] = 5
                                                                                                                                      rsp = card.Transaction(req)
                                                                                                                                      Response Members

                                                                                                                                      seconds

                                                                                                                                      integer

                                                                                                                                      Number of seconds in the analyzed period.

                                                                                                                                      time

                                                                                                                                      UNIX Epoch time

                                                                                                                                      Start time of the analyzed period or, if mode="total", the time of activation.

                                                                                                                                      bytes_sent

                                                                                                                                      integer

                                                                                                                                      Number of bytes sent by the Notecard to Notehub.

                                                                                                                                      bytes_received

                                                                                                                                      integer

                                                                                                                                      Number of bytes received by the Notecard from Notehub.

                                                                                                                                      notes_sent

                                                                                                                                      integer

                                                                                                                                      Approximate number of notes sent by the Notecard to Notehub.

                                                                                                                                      notes_received

                                                                                                                                      integer

                                                                                                                                      Approximate number of notes received by the Notecard from Notehub.

                                                                                                                                      sessions_standard

                                                                                                                                      integer

                                                                                                                                      Number of standard Notehub sessions.

                                                                                                                                      sessions_secure

                                                                                                                                      integer

                                                                                                                                      Number of secure Notehub sessions.

                                                                                                                                      Example Response
                                                                                                                                      {
                                                                                                                                        "seconds": 1291377,
                                                                                                                                        "time": 1598479763,
                                                                                                                                        "bytes_sent": 163577,
                                                                                                                                        "bytes_received": 454565,
                                                                                                                                        "notes_sent": 114,
                                                                                                                                        "notes_received": 26,
                                                                                                                                        "sessions_standard": 143,
                                                                                                                                        "sessions_secure": 31
                                                                                                                                      }
                                                                                                                                      More information:
                                                                                                                                      • Measuring Data Usage

                                                                                                                                      card.usage.test

                                                                                                                                      Arguments

                                                                                                                                      days

                                                                                                                                      integer (optional)

                                                                                                                                      Number of days to use for the test.

                                                                                                                                      hours

                                                                                                                                      integer (optional)

                                                                                                                                      If you want to analyze a period shorter than one day, the number of hours to use for the test.

                                                                                                                                      megabytes

                                                                                                                                      integer (Default: 1024)

                                                                                                                                      The Notecard lifetime data quota (in megabytes) to use for the test.

                                                                                                                                          {
                                                                                                                                            "req": "card.usage.test",
                                                                                                                                            "days": 7,
                                                                                                                                            "megabytes": 500
                                                                                                                                          }
                                                                                                                                          J *req = NoteNewRequest("card.usage.test");
                                                                                                                                          JAddNumberToObject(req, "days", 7);
                                                                                                                                          JAddNumberToObject(req, "megabytes", 500);
                                                                                                                                          
                                                                                                                                          NoteRequest(req);
                                                                                                                                          req = {"req": "card.usage.test"}
                                                                                                                                          req["days"] = 7
                                                                                                                                          req["megabytes"] = 500
                                                                                                                                          rsp = card.Transaction(req)
                                                                                                                                          Response Members

                                                                                                                                          max

                                                                                                                                          integer

                                                                                                                                          The days of projected data available based on test.

                                                                                                                                          days

                                                                                                                                          integer

                                                                                                                                          The number of days used for the test.

                                                                                                                                          bytes_per_day

                                                                                                                                          integer

                                                                                                                                          Average bytes per day used during the test period.

                                                                                                                                          seconds

                                                                                                                                          integer

                                                                                                                                          Number of seconds in the analyzed period.

                                                                                                                                          time

                                                                                                                                          UNIX Epoch time

                                                                                                                                          Time of device activation.

                                                                                                                                          bytes_sent

                                                                                                                                          integer

                                                                                                                                          Number of bytes sent by the Notecard to Notehub.

                                                                                                                                          bytes_received

                                                                                                                                          integer

                                                                                                                                          Number of bytes received by the Notecard from Notehub.

                                                                                                                                          notes_sent

                                                                                                                                          integer

                                                                                                                                          Number of notes sent by the Notecard to Notehub.

                                                                                                                                          notes_received

                                                                                                                                          integer

                                                                                                                                          Number of notes received by the Notecard from Notehub.

                                                                                                                                          sessions_standard

                                                                                                                                          integer

                                                                                                                                          Number of standard Notehub sessions.

                                                                                                                                          sessions_secure

                                                                                                                                          integer

                                                                                                                                          Number of secure Notehub sessions.

                                                                                                                                          Example Response
                                                                                                                                          {
                                                                                                                                            "max": 12730,
                                                                                                                                            "days": 7,
                                                                                                                                            "bytes_per_day": 41136,
                                                                                                                                            "seconds": 1291377,
                                                                                                                                            "time": 1598479763,
                                                                                                                                            "bytes_sent": 163577,
                                                                                                                                            "bytes_received": 454565,
                                                                                                                                            "notes_sent": 114,
                                                                                                                                            "notes_received": 26,
                                                                                                                                            "sessions_standard": 143,
                                                                                                                                            "sessions_secure": 31
                                                                                                                                          }
                                                                                                                                          More information:
                                                                                                                                          • Projecting the Lifetime of Available Data

                                                                                                                                          card.version

                                                                                                                                          Returns firmware version information for the Notecard.

                                                                                                                                          Arguments

                                                                                                                                          api (Added in v1.5.5)

                                                                                                                                          integer (Optional)

                                                                                                                                          Specify a major version of the Notecard firmware that a host expects to use.

                                                                                                                                              {
                                                                                                                                                "req": "card.version"
                                                                                                                                              }
                                                                                                                                              J *req = NoteNewRequest("card.version");
                                                                                                                                              
                                                                                                                                              NoteRequest(req);
                                                                                                                                              req = {"req": "card.version"}
                                                                                                                                              rsp = card.Transaction(req)
                                                                                                                                                {
                                                                                                                                                  "req": "card.version",
                                                                                                                                                  "api": 1
                                                                                                                                                }
                                                                                                                                                J *req = NoteNewRequest("card.version");
                                                                                                                                                JAddNumberToObject(req, "api", 1);
                                                                                                                                                
                                                                                                                                                NoteRequest(req);
                                                                                                                                                req = {"req": "card.version"}
                                                                                                                                                req["api"] = 1
                                                                                                                                                rsp = card.Transaction(req)
                                                                                                                                                Response Members

                                                                                                                                                body

                                                                                                                                                JSON object

                                                                                                                                                An object containing Notecard firmware details for programmatic access.

                                                                                                                                                version

                                                                                                                                                string

                                                                                                                                                The full version number of the Notecard firmware.

                                                                                                                                                device

                                                                                                                                                string

                                                                                                                                                The DeviceUID of the Notecard.

                                                                                                                                                name

                                                                                                                                                string

                                                                                                                                                The official name of the device.

                                                                                                                                                board

                                                                                                                                                integer

                                                                                                                                                The Notecard board version number.

                                                                                                                                                sku

                                                                                                                                                string

                                                                                                                                                The Notecard SKU.

                                                                                                                                                api

                                                                                                                                                integer

                                                                                                                                                The current Notecard API major version in use.

                                                                                                                                                Example Response
                                                                                                                                                {
                                                                                                                                                  "body": {
                                                                                                                                                    "org":       "Blues Wireless",
                                                                                                                                                    "product":   "Notecard",
                                                                                                                                                    "version":   "notecard-1.5.0",
                                                                                                                                                    "ver_major": 1,
                                                                                                                                                    "ver_minor": 5,
                                                                                                                                                    "ver_patch": 0,
                                                                                                                                                    "ver_build": 11236,
                                                                                                                                                    "built":     "Sep 2 2020 08:45:10"
                                                                                                                                                  },
                                                                                                                                                  "version": "notecard-1.5.0.11236",
                                                                                                                                                  "device":  "dev:000000000000000",
                                                                                                                                                  "name":    "Blues Wireless Notecard",
                                                                                                                                                  "board":   "1.11",
                                                                                                                                                  "sku":     "NOTE-WBNA500",
                                                                                                                                                  "api":     1
                                                                                                                                                }

                                                                                                                                                card.voltage

                                                                                                                                                Provides the current V+ voltage level on the Notecard, and provides information about historical voltage trends. When used with the mode argument, configures voltage thresholds based on how the device is powered.

                                                                                                                                                Arguments

                                                                                                                                                hours

                                                                                                                                                integer (Default: all available data)

                                                                                                                                                The number of hours to analyze, up to 720 (30 days).

                                                                                                                                                mode

                                                                                                                                                string (Default: default)

                                                                                                                                                Used to set voltage thresholds based on how the Notecard will be powered, and which can be used to configure voltage-variable Notecard behavior. Each value is shorthand that assigns a battery voltage reading to a given device state like high, normal, low, and dead. One of:

                                                                                                                                                "lipo" for LiPo batteries. Equivalent to "usb:4.6;high:4.0;normal:3.5 ;low:3.1;dead:0".

                                                                                                                                                "l91" for L91 batteries. Equivalent to "high:5.1;normal:4.8;low:4.2;dead:3.9".

                                                                                                                                                "alkaline" for Alkaline batteries. Equivalent to "usb:4.6;high:4.2;normal:3.6; low:3.3;dead:3.0".

                                                                                                                                                "tad" for Tadiran HLC batteries. Equivalent to "usb:4.6;normal:3.2;low:3.1;dead:0".

                                                                                                                                                "default" for the default behavior. Equivalent to "normal:2.5;dead:0".

                                                                                                                                                "?" to query the Notecard for its currently-set thresholds.

                                                                                                                                                offset

                                                                                                                                                integer (Default: 0)

                                                                                                                                                Number of hours to move into the past before starting analysis.

                                                                                                                                                vmax

                                                                                                                                                integer (Default: 4.5)

                                                                                                                                                Ignore voltage readings above this level when performing calculations.

                                                                                                                                                vmin

                                                                                                                                                integer (Default 2.5)

                                                                                                                                                Ignore voltage readings below this level when performing calculations.

                                                                                                                                                    {
                                                                                                                                                      "req": "card.voltage",
                                                                                                                                                      "hours": 300,
                                                                                                                                                      "vmax": 4,
                                                                                                                                                      "vmin": 2.2
                                                                                                                                                    }
                                                                                                                                                    J *req = NoteNewRequest("card.voltage");
                                                                                                                                                    JAddNumberToObject(req, "hours", 300);
                                                                                                                                                    JAddNumberToObject(req, "vmax", 4);
                                                                                                                                                    JAddNumberToObject(req, "vmin", 2.2);
                                                                                                                                                    
                                                                                                                                                    NoteRequest(req);
                                                                                                                                                    req = {"req": "card.voltage"}
                                                                                                                                                    req["hours"] = 300
                                                                                                                                                    req["vmax"] = 4
                                                                                                                                                    req["vmin"] = 2.2
                                                                                                                                                    rsp = card.Transaction(req)
                                                                                                                                                      {
                                                                                                                                                        "req": "card.voltage",
                                                                                                                                                        "mode": "lipo"
                                                                                                                                                      }
                                                                                                                                                      J *req = NoteNewRequest("card.voltage");
                                                                                                                                                      JAddStringToObject(req, "mode", "lipo");
                                                                                                                                                      
                                                                                                                                                      NoteRequest(req);
                                                                                                                                                      req = {"req": "card.voltage"}
                                                                                                                                                      req["mode"] = "lipo"
                                                                                                                                                      rsp = card.Transaction(req)
                                                                                                                                                        {
                                                                                                                                                          "req": "card.voltage",
                                                                                                                                                          "mode": "?"
                                                                                                                                                        }
                                                                                                                                                        J *req = NoteNewRequest("card.voltage");
                                                                                                                                                        JAddStringToObject(req, "mode", "?");
                                                                                                                                                        
                                                                                                                                                        NoteRequest(req);
                                                                                                                                                        req = {"req": "card.voltage"}
                                                                                                                                                        req["mode"] = "?"
                                                                                                                                                        rsp = card.Transaction(req)
                                                                                                                                                        Response Members

                                                                                                                                                        mode

                                                                                                                                                        string

                                                                                                                                                        Current power mode, or usb if the Notecard is connected to USB power.

                                                                                                                                                        value

                                                                                                                                                        decimal

                                                                                                                                                        The current voltage.

                                                                                                                                                        hours

                                                                                                                                                        integer

                                                                                                                                                        The number of hours used for trend analysis.

                                                                                                                                                        vmin

                                                                                                                                                        decimal

                                                                                                                                                        The lowest voltage value captured during the measurement period.

                                                                                                                                                        vmax

                                                                                                                                                        decimal

                                                                                                                                                        The highest voltage value captured during the measurement period.

                                                                                                                                                        vavg

                                                                                                                                                        decimal

                                                                                                                                                        The average voltage value during the measured period.

                                                                                                                                                        daily

                                                                                                                                                        decimal

                                                                                                                                                        Change of moving average in the last 24 hours, if relevant to the time period analyzed.

                                                                                                                                                        weekly

                                                                                                                                                        decimal

                                                                                                                                                        Change of moving average in the last 7 days, if relevant to the time period analyzed.

                                                                                                                                                        monthly

                                                                                                                                                        decimal

                                                                                                                                                        Change of moving average in the last 30 days, if relevant to the time period analyzed.

                                                                                                                                                        Example Response
                                                                                                                                                        {
                                                                                                                                                          "mode": "usb",
                                                                                                                                                          "value": 5.2791994059442461,
                                                                                                                                                          "hours": 772,
                                                                                                                                                          "vmin": 4.48,
                                                                                                                                                          "vmax": 5.28,
                                                                                                                                                          "vavg": 4.9106748466257669,
                                                                                                                                                          "daily": 0.13,
                                                                                                                                                          "weekly": 0.12,
                                                                                                                                                          "monthly": 0.11
                                                                                                                                                        }
                                                                                                                                                        More information:
                                                                                                                                                        • Voltage Monitoring

                                                                                                                                                        card.wifi

                                                                                                                                                        Sets up a Wi-Fi Notecard to connect to a Wi-Fi access point. This request is not available for Cellular Notecards.

                                                                                                                                                        note

                                                                                                                                                        Wi-Fi updates cannot occur if you have changed a Wi-Fi Notecard’s connection mode from periodic to continuous. If you have a Wi-Fi Notecard in continuous mode, you must change it using a hub.set request before using card.wifi.

                                                                                                                                                        Arguments

                                                                                                                                                        ssid

                                                                                                                                                        string (optional)

                                                                                                                                                        The SSID of the Wi-Fi access point. Alternatively, use - to clear an already set SSID.

                                                                                                                                                        password

                                                                                                                                                        string (optional)

                                                                                                                                                        The network password of the Wi-Fi access point. Alternatively, use - to clear an already set password.

                                                                                                                                                        name

                                                                                                                                                        string (optional)

                                                                                                                                                        By default, the Notecard creates a SoftAP (software enabled access point) under the name “Notecard”. You can use the name argument to change the name of the SoftAP to a custom name.

                                                                                                                                                        If you include a - at the end of the name (for example "name": "acme-"), the Notecard will append the last four digits of the network's MAC address (for example acme—025c). This allows you to distinguish between multiple Notecards in a SoftAP mode.

                                                                                                                                                        org

                                                                                                                                                        string (optional)

                                                                                                                                                        If specified, replaces the Blues logo on the SoftAP page with the provided name.

                                                                                                                                                        start

                                                                                                                                                        boolean (optional)

                                                                                                                                                        Specify true to activate SoftAP mode on the Notecard programatically.

                                                                                                                                                            {
                                                                                                                                                              "req": "card.wifi",
                                                                                                                                                              "ssid": "<ssid name>",
                                                                                                                                                              "password": "<password>"
                                                                                                                                                            }
                                                                                                                                                            J *req = NoteNewRequest("card.wifi");
                                                                                                                                                            JAddStringToObject(req, "ssid", "<ssid name>");
                                                                                                                                                            JAddStringToObject(req, "password", "<password>");
                                                                                                                                                            
                                                                                                                                                            NoteRequest(req);
                                                                                                                                                            req = {"req": "card.wifi"}
                                                                                                                                                            req["ssid"] = "<ssid name>"
                                                                                                                                                            req["password"] = "<password>"
                                                                                                                                                            rsp = card.Transaction(req)
                                                                                                                                                              {
                                                                                                                                                                "req": "card.wifi",
                                                                                                                                                                "ssid": "-",
                                                                                                                                                                "password": "-"
                                                                                                                                                              }
                                                                                                                                                              J *req = NoteNewRequest("card.wifi");
                                                                                                                                                              JAddStringToObject(req, "ssid", "-");
                                                                                                                                                              JAddStringToObject(req, "password", "-");
                                                                                                                                                              
                                                                                                                                                              NoteRequest(req);
                                                                                                                                                              req = {"req": "card.wifi"}
                                                                                                                                                              req["ssid"] = "-"
                                                                                                                                                              req["password"] = "-"
                                                                                                                                                              rsp = card.Transaction(req)
                                                                                                                                                                {
                                                                                                                                                                  "req": "card.wifi",
                                                                                                                                                                  "name": "ACME Inc",
                                                                                                                                                                  "org": "ACME Inc"
                                                                                                                                                                }
                                                                                                                                                                J *req = NoteNewRequest("card.wifi");
                                                                                                                                                                JAddStringToObject(req, "name", "ACME Inc");
                                                                                                                                                                JAddStringToObject(req, "org", "ACME Inc");
                                                                                                                                                                
                                                                                                                                                                NoteRequest(req);
                                                                                                                                                                req = {"req": "card.wifi"}
                                                                                                                                                                req["name"] = "ACME Inc"
                                                                                                                                                                req["org"] = "ACME Inc"
                                                                                                                                                                rsp = card.Transaction(req)
                                                                                                                                                                  {
                                                                                                                                                                    "req": "card.wifi",
                                                                                                                                                                    "name": "acme-",
                                                                                                                                                                    "org": "ACME Inc"
                                                                                                                                                                  }
                                                                                                                                                                  J *req = NoteNewRequest("card.wifi");
                                                                                                                                                                  JAddStringToObject(req, "name", "acme-");
                                                                                                                                                                  JAddStringToObject(req, "org", "ACME Inc");
                                                                                                                                                                  
                                                                                                                                                                  NoteRequest(req);
                                                                                                                                                                  req = {"req": "card.wifi"}
                                                                                                                                                                  req["name"] = "acme-"
                                                                                                                                                                  req["org"] = "ACME Inc"
                                                                                                                                                                  rsp = card.Transaction(req)
                                                                                                                                                                  Response Members

                                                                                                                                                                  ssid

                                                                                                                                                                  string

                                                                                                                                                                  The SSID of the Wi-Fi access point.

                                                                                                                                                                  security

                                                                                                                                                                  string

                                                                                                                                                                  The security protocol the Wi-Fi access point uses.

                                                                                                                                                                  Example Response
                                                                                                                                                                  {
                                                                                                                                                                   "ssid": "<ssid name>",
                                                                                                                                                                   "security": "wpa2-wpa1"
                                                                                                                                                                  }
                                                                                                                                                                  More information:
                                                                                                                                                                  • Connecting to a Wi-Fi Access Point

                                                                                                                                                                  card.wireless

                                                                                                                                                                  View the last known network state, or customize the behavior of the modem. Note: Be careful when using this mode with hardware not on hand as a mistake may cause loss of network and Notehub access.

                                                                                                                                                                  Arguments

                                                                                                                                                                  mode

                                                                                                                                                                  string

                                                                                                                                                                  Network scan mode. Must be one of:

                                                                                                                                                                  "-" to reset to the default mode.

                                                                                                                                                                  "auto" to perform automatic band scan mode (this is the default mode).

                                                                                                                                                                  "m" to restrict the modem to Cat-M1.

                                                                                                                                                                  "nb" to restrict the modem to Cat-NB1.

                                                                                                                                                                  "gprs" to restrict the modem to EGPRS.

                                                                                                                                                                  apn

                                                                                                                                                                  string

                                                                                                                                                                  Access Point Name (APN) when using an external SIM. Use "-" to reset to the Notecard default APN.

                                                                                                                                                                      {
                                                                                                                                                                        "req": "card.wireless"
                                                                                                                                                                      }
                                                                                                                                                                      J *req = NoteNewRequest("card.wireless");
                                                                                                                                                                      
                                                                                                                                                                      NoteRequest(req);
                                                                                                                                                                      req = {"req": "card.wireless"}
                                                                                                                                                                      rsp = card.Transaction(req)
                                                                                                                                                                        {
                                                                                                                                                                          "req": "card.wireless",
                                                                                                                                                                          "mode": "nb"
                                                                                                                                                                        }
                                                                                                                                                                        J *req = NoteNewRequest("card.wireless");
                                                                                                                                                                        JAddStringToObject(req, "mode", "nb");
                                                                                                                                                                        
                                                                                                                                                                        NoteRequest(req);
                                                                                                                                                                        req = {"req": "card.wireless"}
                                                                                                                                                                        req["mode"] = "nb"
                                                                                                                                                                        rsp = card.Transaction(req)
                                                                                                                                                                          {
                                                                                                                                                                            "req": "card.wireless",
                                                                                                                                                                            "mode": "-"
                                                                                                                                                                          }
                                                                                                                                                                          J *req = NoteNewRequest("card.wireless");
                                                                                                                                                                          JAddStringToObject(req, "mode", "-");
                                                                                                                                                                          
                                                                                                                                                                          NoteRequest(req);
                                                                                                                                                                          req = {"req": "card.wireless"}
                                                                                                                                                                          req["mode"] = "-"
                                                                                                                                                                          rsp = card.Transaction(req)
                                                                                                                                                                            {
                                                                                                                                                                              "req": "card.wireless",
                                                                                                                                                                              "apn": "myapn.nb"
                                                                                                                                                                            }
                                                                                                                                                                            J *req = NoteNewRequest("card.wireless");
                                                                                                                                                                            JAddStringToObject(req, "apn", "myapn.nb");
                                                                                                                                                                            
                                                                                                                                                                            NoteRequest(req);
                                                                                                                                                                            req = {"req": "card.wireless"}
                                                                                                                                                                            req["apn"] = "myapn.nb"
                                                                                                                                                                            rsp = card.Transaction(req)
                                                                                                                                                                            Response Members

                                                                                                                                                                            status

                                                                                                                                                                            string

                                                                                                                                                                            The current status of the wireless connection and modem.

                                                                                                                                                                            count

                                                                                                                                                                            integer

                                                                                                                                                                            Number of bars of signal quality.

                                                                                                                                                                            net

                                                                                                                                                                            JSON object

                                                                                                                                                                            An object with detailed modem, radio access technology, and signal information.

                                                                                                                                                                            Example Response
                                                                                                                                                                            {
                                                                                                                                                                              "status": "{modem-off}",
                                                                                                                                                                              "count": 1,
                                                                                                                                                                              "net": {
                                                                                                                                                                                "iccid": "00000000000000000000",
                                                                                                                                                                                "imsi": "000000000000000",
                                                                                                                                                                                "imei": "000000000000000",
                                                                                                                                                                                "modem": "EG91NAXGAR07A03M1G_BETA0415_01.001.01.001",
                                                                                                                                                                                "band": "LTE BAND 2",
                                                                                                                                                                                "rat": "lte",
                                                                                                                                                                                "rssir": -69,
                                                                                                                                                                                "rssi": -70,
                                                                                                                                                                                "rsrp": -105,
                                                                                                                                                                                "sinr": 86,
                                                                                                                                                                                "rsrq": -17,
                                                                                                                                                                                "bars": 1,
                                                                                                                                                                                "mcc": 310,
                                                                                                                                                                                "mnc": 410,
                                                                                                                                                                                "lac": 28681,
                                                                                                                                                                                "cid": 211150856,
                                                                                                                                                                                "updated": 1599225076
                                                                                                                                                                              }
                                                                                                                                                                            }
                                                                                                                                                                            More information:
                                                                                                                                                                            • Viewing and Customizing Modem Behavior

                                                                                                                                                                            card.wireless.penalty

                                                                                                                                                                            Added in v1.5.6

                                                                                                                                                                            View the current state of a Notecard network registration penalty box or manually remove the Notecard from a penalty box.

                                                                                                                                                                            Arguments

                                                                                                                                                                            stop

                                                                                                                                                                            boolean

                                                                                                                                                                            Set to true to remove the Notecard from a network registration penalty box.

                                                                                                                                                                                {
                                                                                                                                                                                  "req": "card.wireless.penalty"
                                                                                                                                                                                }
                                                                                                                                                                                J *req = NoteNewRequest("card.wireless.penalty");
                                                                                                                                                                                
                                                                                                                                                                                NoteRequest(req);
                                                                                                                                                                                req = {"req": "card.wireless.penalty"}
                                                                                                                                                                                rsp = card.Transaction(req)
                                                                                                                                                                                  {
                                                                                                                                                                                    "req": "card.wireless.penalty",
                                                                                                                                                                                    "stop": "true"
                                                                                                                                                                                  }
                                                                                                                                                                                  J *req = NoteNewRequest("card.wireless.penalty");
                                                                                                                                                                                  JAddBoolToObject(req, "stop", true);
                                                                                                                                                                                  
                                                                                                                                                                                  NoteRequest(req);
                                                                                                                                                                                  req = {"req": "card.wireless.penalty"}
                                                                                                                                                                                  req["stop"] = True
                                                                                                                                                                                  rsp = card.Transaction(req)
                                                                                                                                                                                  Response Members

                                                                                                                                                                                  minutes

                                                                                                                                                                                  integer

                                                                                                                                                                                  The time since the first network registration failure.

                                                                                                                                                                                  count

                                                                                                                                                                                  integer

                                                                                                                                                                                  The number of consecutive network registration failures.

                                                                                                                                                                                  Example Response
                                                                                                                                                                                  {
                                                                                                                                                                                      "minutes": 36,
                                                                                                                                                                                      "count": 2
                                                                                                                                                                                  }
                                                                                                                                                                                  More information:
                                                                                                                                                                                  • Understanding Notecard Penalty Boxes
                                                                                                                                                                                  Introductiondfu Requests
                                                                                                                                                                                  Can we improve this page? Send us feedbackRate this page
                                                                                                                                                                                  • ★
                                                                                                                                                                                    ★
                                                                                                                                                                                  • ★
                                                                                                                                                                                    ★
                                                                                                                                                                                  • ★
                                                                                                                                                                                    ★
                                                                                                                                                                                  • ★
                                                                                                                                                                                    ★
                                                                                                                                                                                  • ★
                                                                                                                                                                                    ★
                                                                                                                                                                                  © 2022 Blues Inc.Terms & ConditionsPrivacy
                                                                                                                                                                                  blues.ioTwitterLinkedInGitHubHackster.io
                                                                                                                                                                                  Disconnected
                                                                                                                                                                                  Disconnected
                                                                                                                                                                                  Having trouble connecting?

                                                                                                                                                                                  Try changing your Micro USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

                                                                                                                                                                                  Connect a NotecardClick 'Connect' and select a USB-connected Notecard to start issuing requests from the browser.