Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5502e91
updates
Jng468 Nov 1, 2025
e2f2713
ros service set up and potentially working
Jng468 Nov 1, 2025
1b73e86
updates
Jng468 Nov 15, 2025
cee8a79
Merge branch 'main' into dev-620
Jng468 Nov 15, 2025
616b342
merge changes
Jng468 Nov 15, 2025
04a459a
update
Jng468 Nov 16, 2025
d9a8e72
fixes
Jng468 Nov 16, 2025
3ce7463
Merge branch 'main' into dev-620
Jng468 Nov 22, 2025
b403ddf
Added echo response
Apps247 Jan 10, 2026
e7b2da6
Updated comments
Apps247 Jan 10, 2026
de89ade
Improved debug print message
Apps247 Jan 10, 2026
09966cb
Improved debug print message
Apps247 Jan 10, 2026
5457354
Merge branch 'main' into dev-620
Jng468 Jan 10, 2026
78e6cf0
Merge remote-tracking branch 'origin/dev-620' into user/Apps247/714-n…
Apps247 Jan 10, 2026
14a993f
Changed ros service to use debugSend function
Apps247 Jan 10, 2026
81b8cdf
Changed ros service to use debugSendAT
Apps247 Jan 10, 2026
034eb7f
Add ros user to dialout group in container
lross03 Jan 11, 2026
78edcc0
Separated debug_send_data ros service from regular send_data. Also ad…
Apps247 Jan 15, 2026
946f88c
Commented out \r character check
Apps247 Jan 24, 2026
ac9206c
Switched from cout/cerr to ros logging in debugSendAT
Apps247 Jan 25, 2026
a647cc0
Clear incoming serial buffer before attempting send or debugSendAT
Apps247 Jan 29, 2026
c6e3fa4
Merge remote-tracking branch 'origin/main' into user/Apps247/714-new-…
Apps247 Jan 31, 2026
90905e9
Added skeleton for clearSerialBuffer
Apps247 Feb 7, 2026
108bae8
Fixed clearSerialBuffer
Apps247 Feb 7, 2026
5db0896
Added clearSerialBuffer calls to send()
Apps247 Feb 7, 2026
4399255
Commented out temporary logging
Apps247 Feb 7, 2026
1765919
Cleaned code
Apps247 Feb 7, 2026
1ffff36
Changed cout calls to logging callbacks so they can show on ros2 logs
Apps247 Feb 7, 2026
66f6ae2
Merge remote-tracking branch 'origin/main' into user/Apps247/714-new-…
Apps247 Feb 7, 2026
6878352
Remove sudo
lross03 Feb 7, 2026
6699146
Remove commented-out AT::Line
lross03 Feb 7, 2026
35f98bd
Merge branch 'main' into user/Apps247/714-new-create-debug-send-at-fu…
lross03 Feb 7, 2026
4bbf100
Added virtual iridium test terminal (dev tool)
Apps247 Feb 7, 2026
3b17191
Added checkIridiumSignalQuality function
Apps247 Feb 7, 2026
d9a1d83
Added ROS service to check signal quality
Apps247 Feb 7, 2026
7a8be7b
Added test for checkIridiumSignalQuality
Apps247 Feb 7, 2026
f4a23c8
Made sailbot_db connection failure non-blocking for other project tests
Apps247 Feb 7, 2026
f2321cb
Added signal quality checking before attempting to send
Apps247 Feb 7, 2026
3a765d3
Switched to INFO ros logging
adambrett40 Feb 11, 2026
93e2c53
Fixed serial read timeout not working
adambrett40 Feb 11, 2026
f991621
Increased timeout, raised signal threshold
adambrett40 Feb 12, 2026
54995e5
Added constant
Apps247 Feb 12, 2026
b6748c2
Added debugSendAT() Tested Fixes to send()
Apps247 Feb 12, 2026
a3b478f
Merge branch 'main' into user/Apps247/714-new-create-debug-send-at-fu…
lross03 Feb 14, 2026
ce87667
Merge remote-tracking branch 'origin/user/Apps247/714-new-create-debu…
Apps247 Feb 14, 2026
2ee6865
shorten comment line to pass linter
lross03 Feb 14, 2026
646dc05
fix comment to pass linter again
lross03 Feb 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ services:
network_mode: host
privileged: true
user: ros
group_add:
- dialout
devices:
- /dev/ttyS0:/dev/ttyS0
# ports:
# website
#### We do not use anymore. We pulled website development out of docker in PR #614
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if [[ "$PACKAGE" == "network_systems" || "$PACKAGE" == "" ]]; then

NET_DIR=src/network_systems
if [ -d $NET_DIR ]; then
./scripts/run_virtual_iridium.sh &> /dev/null &
./scripts/run_virtual_iridium.sh &> /tmp/virtual_iridium.log &
pushd $NET_DIR
./scripts/sailbot_db sailbot_db --clear
./scripts/sailbot_db sailbot_db --populate
Expand Down
1 change: 1 addition & 0 deletions src/network_systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(ROS_DEPS
rclcpp
std_msgs
custom_interfaces
std_srvs
)
find_package(ament_cmake REQUIRED)
foreach(dep IN LISTS ROS_DEPS)
Expand Down
1 change: 1 addition & 0 deletions src/network_systems/lib/cmn_hdrs/shared_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace SYSTEM_MODE
{
static const std::string PROD = "production";
static const std::string DEV = "development";
static const std::string TEST_SAT = "test_satellite";
}; // namespace SYSTEM_MODE

constexpr unsigned int MAX_LOCAL_TO_REMOTE_PAYLOAD_SIZE_BYTES = 340;
Expand Down
3 changes: 2 additions & 1 deletion src/network_systems/lib/sailbot_db/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ int main(int argc, char ** argv)

if (!db.testConnection()) {
std::cerr << "Failed to establish connection to DB \"" << db_name << "\"" << std::endl;
return -1;
// Return 0 so test script continues running other tests
return 0;
}

if (vm.count(to_string(CLIOpt::Clear)) != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(module local_transceiver)

set(link_libs
${PROTOBUF_LINK_LIBS}
CURL::libcurl
)

set(inc_dirs
Expand Down
20 changes: 16 additions & 4 deletions src/network_systems/projects/local_transceiver/inc/at_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ namespace AT
const std::string DELIMITER = "\r\n";
const std::string STATUS_OK = "OK";
const std::string RSP_READY = "READY";
const std::string CSQ = "READY";
const std::string GARBAGE = "\n";

const std::string CHECK_CONN = "AT";
const std::string SBD_SESSION = "AT+SBDIX"; // 5.144
const std::string DSBL_CTRLFLOW = "AT&K0";
const std::string DNLD_TO_QUEUE = "AT+SBDRB";
const std::string CHECK_CONN = "AT";
const std::string SBD_SESSION = "AT+SBDIX"; // 5.144
const std::string DSBL_CTRLFLOW = "AT&K0";
const std::string DNLD_TO_QUEUE = "AT+SBDRB";
const std::string CHECK_SIG_QUALITY = "AT+CSQ";

namespace write_bin // 5.154
{
Expand All @@ -34,6 +36,16 @@ const std::string WRONG_SIZE = "3";
} // namespace rsp
} // namespace write_bin

namespace signal_quality
{
const int NOSIGNAL = 0;
const int POOR = 1;
const int MARGINAL = 2;
const int GOOD = 3;
const int VERYGOOD = 4;
const int EXCELLENT = 5;
} // namespace signal_quality

/**
* @brief Simple Line struct to help enforce DRY when dealing with strings while performing reads and writes
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <boost/asio/streambuf.hpp>
#include <functional>
#include <string>

#include "at_cmds.h"
Expand Down Expand Up @@ -29,6 +30,17 @@ class LocalTransceiver
friend class TestLocalTransceiver_checkCache_Test;

public:
// Logging callback types
using LogCallback = std::function<void(const std::string &)>;

/**
* @brief Set logging callbacks for debug and error messages
*
* @param debug_cb Callback for debug messages
* @param error_cb Callback for error messages
*/
void setLogCallbacks(LogCallback debug_cb, LogCallback error_cb);

/**
* @brief Update the sensor with new GPS data
*
Expand Down Expand Up @@ -104,6 +116,23 @@ class LocalTransceiver
*/
bool send();

/**
* @brief Debug helper that sends a small payload through the same
* flow used by `send()` but using the provided bytes. Useful for
* testing without serializing the full sensors protobuf.
* ticket #714
*
* @param data payload to send
* @return true on success, false on failure
*/
bool debugSendAT(const std::string & data);

/**
* @brief Checks Iridium satellite connection strength via AT+CSQ
* @return signal strength value from 0-5, or -1 if an error occurs
*/
int checkIridiumSignalQuality();

/**
* @brief Send a debug command and return the output
*
Expand Down Expand Up @@ -139,17 +168,27 @@ class LocalTransceiver

private:
// Serial port read/write timeout
// * This 'TIMEOUT' timeout is used for the socket - it doesn't work with the actual hardware modem
constexpr static const struct timeval TIMEOUT
{
0, // seconds
200000 // microseconds
};
// * This 'SERIAL_TIMEOUT' timeout actually works for the serial port, both on hardware and virtual
static constexpr std::chrono::milliseconds SERIAL_TIMEOUT{std::chrono::seconds(15)};

static constexpr std::chrono::seconds SMALL_WAIT{std::chrono::seconds(2)};
static constexpr std::chrono::seconds MEDIUM_WAIT{std::chrono::seconds(2)};

// boost io service - required for boost::asio operations
boost::asio::io_service io_;
// serial port data where is sent and received
boost::asio::serial_port serial_;
// underlying sensors object
Polaris::Sensors sensors_;
// Logging callbacks
LogCallback log_debug_;
LogCallback log_error_;

/**
* @brief Send a command to the serial port
Expand All @@ -170,6 +209,13 @@ class LocalTransceiver

std::optional<std::string> readRsp();

/**
* @brief Drain/clear any pending data in the serial buffer to remove stale data
* from previous iterations or operations. This helps prevent stale data from one attempt/operation
* from interfering with subsequent reads.
*/
void clearSerialBuffer();

/**
* @brief Parse the message received from the remote server
*
Expand Down Expand Up @@ -197,4 +243,7 @@ class LocalTransceiver
* @return checksum value
*/
static std::string checksum(const std::string & data);

template <typename AsyncReadOp>
bool runWithTimeout(AsyncReadOp && op, boost::system::error_code & out_ec);
};
Loading