![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
AT terminal for the mDot using the USB debug port instead of the serial port.
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
CommandTerminal/CmdIdentification.cpp@18:f5d28d621bb0, 2018-03-02 (annotated)
- Committer:
- pferland
- Date:
- Fri Mar 02 20:01:38 2018 +0000
- Revision:
- 18:f5d28d621bb0
- Parent:
- 16:d5cf2af81a6d
Added ability to force the AT terminal to use the USB debug port
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mike Fiore |
1:e52ae6584f1c | 1 | #include "CmdIdentification.h" |
Mike Fiore |
14:f9a77400b622 | 2 | #include "mts_at_version.h" |
Mike Fiore |
1:e52ae6584f1c | 3 | |
Mike Fiore |
14:f9a77400b622 | 4 | CmdIdentification::CmdIdentification() : Command("Request Id", "ATI", "Request Identification", "NONE") |
Mike Fiore |
1:e52ae6584f1c | 5 | { |
Mike Fiore |
1:e52ae6584f1c | 6 | } |
Mike Fiore |
1:e52ae6584f1c | 7 | |
Mike Fiore |
1:e52ae6584f1c | 8 | uint32_t CmdIdentification::action(std::vector<std::string> args) |
Mike Fiore |
1:e52ae6584f1c | 9 | { |
Mike Fiore |
1:e52ae6584f1c | 10 | std::string version = AT_APPLICATION_VERSION; |
Mike Fiore |
14:f9a77400b622 | 11 | #ifdef DEBUG_MAC |
Mike Fiore |
14:f9a77400b622 | 12 | version += "-debug"; |
Mike Fiore |
14:f9a77400b622 | 13 | #endif |
Mike Fiore |
1:e52ae6584f1c | 14 | |
Mike Fiore |
14:f9a77400b622 | 15 | char buf[16]; |
Mike Fiore |
14:f9a77400b622 | 16 | size_t size = snprintf(buf, sizeof(buf), "-mbed%d", MBED_LIBRARY_VERSION); |
Mike Fiore |
14:f9a77400b622 | 17 | if (size > 0) { |
Mike Fiore |
14:f9a77400b622 | 18 | version.append(buf, size); |
Mike Fiore |
14:f9a77400b622 | 19 | } |
Mike Fiore |
14:f9a77400b622 | 20 | |
Mike Fiore |
14:f9a77400b622 | 21 | #if defined(TARGET_MTS_MDOT_F411RE) |
Mike Fiore |
14:f9a77400b622 | 22 | CommandTerminal::Serial()->writef("MultiTech mDot\r\n"); |
Mike Fiore |
14:f9a77400b622 | 23 | #else |
Mike Fiore |
14:f9a77400b622 | 24 | CommandTerminal::Serial()->writef("MultiTech xDot\r\n"); |
Mike Fiore |
14:f9a77400b622 | 25 | #endif /* TARGET_MTS_MDOT_F411RE */ |
jenkins@jenkinsdm1 | 16:d5cf2af81a6d | 26 | CommandTerminal::Serial()->writef("Firmware : %s\r\n", version.c_str()); |
jenkins@jenkinsdm1 | 16:d5cf2af81a6d | 27 | CommandTerminal::Serial()->writef("Library : %s\r\n", CommandTerminal::Dot()->getId().c_str()); |
jenkins@jenkinsdm1 | 16:d5cf2af81a6d | 28 | CommandTerminal::Serial()->writef("MTS-Lora : %s\r\n", CommandTerminal::Dot()->getMtsLoraId().c_str()); |
Mike Fiore |
1:e52ae6584f1c | 29 | |
Mike Fiore |
1:e52ae6584f1c | 30 | return 0; |
Mike Fiore |
1:e52ae6584f1c | 31 | } |