Skip to content

Conversation

zrezke
Copy link
Contributor

@zrezke zrezke commented Sep 30, 2025

Purpose

  • Fix X_LINK_LOCAL_SHDMEM protocol mode only working once and then requiring rm /tmp/xlink.sock or reboot.
  • [FW] Enable depthai device usage from device side during X_LINK_GATE_SETUP state.

Specification

None / not applicable

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

Tested creating dai.Device locally multiple times in a row.
Tested as described in XLink PR as well

This is the foundation for oak setup working with depthai on device.
…nd then requiring rm /tmp/xlink.sock or reboot.

Incorrect X_LINK state was being reported from XLink, which caused depthai
 to treat the device as booted. That had the effect of not booting the FW via gate.
@zrezke zrezke requested a review from moratom September 30, 2025 17:11
Comment on lines +55 to +60
auto gateHost = deviceInfo.name;
if (deviceInfo.protocol == X_LINK_LOCAL_SHDMEM) {
gateHost = "127.0.0.1";
}
// Discover and connect
pimpl->cli = std::make_unique<httplib::Client>(deviceInfo.name, DEFAULT_PORT);
pimpl->cli = std::make_unique<httplib::Client>(gateHost, DEFAULT_PORT);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have to connect to gate to boot the fw - but the deviceInfo.name == /tmp/xlink.sock, so have to overwrite that. Perhaps X_LINK_LOCAL_SHDMEM should be removed from discovery altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants