Ocvsmd error: Route Ch Unsolicited Msg

I’m trying to get Ocvsmd to send a uavcan.node.GetInfo to a node but am hitting this problem.

I get “Route Ch Unsolicited Msg” in the logs.

[2025-05-22 22:30:55.675] [1665] [] [debug] New client connection (id=9, addr='unix:').
[2025-05-22 22:30:55.675] [1665] [ipc] [trace] ClientContext(fd=9, id=9).
[2025-05-22 22:30:55.675] [1665] [ipc] [debug] Pipe is connected (cl=9).
[2025-05-22 22:30:55.675] [1665] [ipc] [debug] Route connect request (cl=9, ver='0.1', err_code=0).
[2025-05-22 22:30:55.676] [1665] [ipc] [debug] Route Ch Unsolicited Msg (cl=9, tag=0, seq=0, srv=0xB0714D553D4D8C84).
[2025-05-22 22:30:57.676] [1665] [ipc] [debug] Route Ch End (cl=9, tag=0, keep_alive=false, err=null).
[2025-05-22 22:30:57.676] [1665] [ipc] [debug] Zero bytes of msg header read - end of stream (fd=9).
[2025-05-22 22:30:57.676] [1665] [ipc] [debug] End of client stream - closing connection (id=9, fd=9).
[2025-05-22 22:30:57.676] [1665] [ipc] [debug] Pipe is disconnected (cl=9).

Looks like that’s hitting here due to missing a lookup in the gateway map:

I tweaked the src/cli/main.cpp like this but I can’t figure out what I’m doing wrong:

void tryRpcClientScenario(Executor& executor, cetl::pmr::memory_resource& memory, const Daemon::Ptr& daemon)
{
    using ocvsmd::sdk::NodeRpcClient;
    using MakeRpcClient  = Daemon::MakeRpcClient;
    using GetInfo = uavcan::node::GetInfo_1_0;
    using RpcCall        = NodeRpcClient::Call;
    using RpcCallResult  = RpcCall::Result<GetInfo::Response>;
    using RpcCallSuccess = RpcCall::Success<GetInfo::Response>;

    spdlog::info("tryRpcClientScenario -----------------");

    auto rpc_client_sender = daemon->makeRpcClient(GetInfo::Request::_traits_::FixedPortId,
                                                   46,  // target node_id
                                                   GetInfo::Response::_traits_::ExtentBytes);
    auto rpc_client_result = sync_wait<MakeRpcClient::Result>(executor, std::move(rpc_client_sender), 2s);
    if (const auto* const failure = cetl::get_if<MakeRpcClient::Failure>(&rpc_client_result))
    {
        spdlog::error("Failed to make RPC client (err={}).", *failure);
        return;
    }
    const auto rpc_client = cetl::get<MakeRpcClient::Success>(std::move(rpc_client_result));

    GetInfo::Request request{&memory};
    auto call_sender = rpc_client->call<GetInfo::Response>(memory, request, 1s, 2s - 10ms);
    auto call_result = sync_wait<RpcCallResult>(executor, std::move(call_sender), 2s);
    if (const auto* const failure = cetl::get_if<RpcCall::Failure>(&call_result))
    {
        spdlog::error("Failed to make RPC client call (err={}).", *failure);
        return;
    }
    const auto called = cetl::get<RpcCallSuccess>(std::move(call_result));

    spdlog::info(  //
        "🆔 response from {} node: software_vcs_revision_id={} (cy_priority={}).",
        called.server_node_id,
        called.response.software_vcs_revision_id,
        static_cast<int>(called.priority));
}

Bah, figured this out. I was errantly running the client against an older version of the ocvsmd daemon that didn’t have this commit for the RPC support.

1 Like