This mDot firmware will allow USB to directly utilize AT command without the need the use of RS232 DB9 port.

Dependencies:   MTS-Serial libmDot mbed-rtos mbed

Fork of mDot_USB_AT_firmware by Hadi Ho

Committer:
ahario
Date:
Wed Oct 19 10:26:54 2016 +0000
Revision:
14:eecf7851d6ff
Parent:
9:ff62b20f7000
Update from libmDot has overwritten the orginal main.cpp; ; Main.cpp has been updated again to allow AT command to be accessed via USB

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Mike Fiore 9:ff62b20f7000 1 #include "CmdSessionDataRate.h"
Mike Fiore 9:ff62b20f7000 2
Mike Fiore 9:ff62b20f7000 3 CmdSessionDataRate::CmdSessionDataRate(mDot* dot, mts::MTSSerial& serial)
Mike Fiore 9:ff62b20f7000 4 :
Mike Fiore 9:ff62b20f7000 5 Command(dot, "Session Data Rate", "AT+SDR", "Get the current datarate"),
Mike Fiore 9:ff62b20f7000 6 _serial(serial)
Mike Fiore 9:ff62b20f7000 7 {
Mike Fiore 9:ff62b20f7000 8 _help = std::string(text()) + ": " + std::string(desc());
Mike Fiore 9:ff62b20f7000 9 _queryable = true;
Mike Fiore 9:ff62b20f7000 10 }
Mike Fiore 9:ff62b20f7000 11
Mike Fiore 9:ff62b20f7000 12 uint32_t CmdSessionDataRate::action(std::vector<std::string> args) {
Mike Fiore 9:ff62b20f7000 13 if (args.size() == 1) {
Mike Fiore 9:ff62b20f7000 14 if (_dot->getVerbose())
Mike Fiore 9:ff62b20f7000 15 _serial.writef("Session Data Rate: ");
Mike Fiore 9:ff62b20f7000 16
Mike Fiore 9:ff62b20f7000 17 _serial.writef("%s\r\n", mDot::DataRateStr(_dot->getSessionDataRate()).c_str());
Mike Fiore 9:ff62b20f7000 18 }
Mike Fiore 9:ff62b20f7000 19
Mike Fiore 9:ff62b20f7000 20
Mike Fiore 9:ff62b20f7000 21 return 0;
Mike Fiore 9:ff62b20f7000 22 }
Mike Fiore 9:ff62b20f7000 23
Mike Fiore 9:ff62b20f7000 24 bool CmdSessionDataRate::verify(std::vector<std::string> args) {
Mike Fiore 9:ff62b20f7000 25 if (args.size() == 1)
Mike Fiore 9:ff62b20f7000 26 return true;
Mike Fiore 9:ff62b20f7000 27
Mike Fiore 9:ff62b20f7000 28 setErrorMessage("Invalid arguments");
Mike Fiore 9:ff62b20f7000 29 return false;
Mike Fiore 9:ff62b20f7000 30 }