Skip to content

SPoE drive discovery #58

Open

Description

@markosankovic

User story

As an engineer connecting to SOMANET drives over SPoE,
I want Motion Master to find the IP addresses of the drives on the network, including drives behind each other in a chain,
so that I do not have to look up and type each address before I can connect.

Context

#36 adds the SPoE fieldbus driver. It takes a list of IP addresses, fieldbus.ipAddresses, and the Console Fieldbus page lets the user type that list. Nothing helps the user find the addresses. SPoE.md in the old server sends the user to PRONETA or to a DHCP server to assign them (motion_master/libs/comm/SPoE.md:169-195), and it does not say how to find them afterwards.

The design of this issue is open. Anu at Synapticon has already done work on drive discovery. Sync with him before deciding the approach, and replace or confirm the candidates below with what that work found.

One rule is already settled

Discovery must not connect to the SPoE port. A SPoE drive accepts one client at a time, and a new connection evicts the current one (#36, Notes). A sweep of TCP port 8080 over a subnet would disconnect whoever is working with a drive. So discovery must use a mechanism that does not open a SPoE connection.

Candidates, not yet checked on a drive

  • PROFINET DCP Identify All. A raw Ethernet multicast on one adapter. A PROFINET device must answer with its name of station, IP address, MAC address, vendor ID and device ID. PRONETA uses it. It needs raw socket access, which Motion Master already has for SOEM.
  • EtherNet/IP ListIdentity. A UDP broadcast to port 44818. An EtherNet/IP device must answer with its IP address, vendor ID, product code and serial number.

Both are Layer 2 or broadcast, so they pass through the switch ports of a drive and reach every drive in a chain. Nobody has checked yet whether the netX firmware of a SOMANET drive answers either one in each firmware variant.

Acceptance criteria

To be written after the sync. These outcomes are expected whatever the approach:

  • A server-side route lists the drives found on one adapter, each with at least its IP address and MAC address, and with its name, vendor and product where the mechanism gives them.
  • Discovery never opens a SPoE connection.
  • Discovery finds every drive of a chain, not only the first.
  • A drive on a different subnet than the adapter is listed, and marked as not reachable from this host.
  • The Console Fieldbus page has a Discover button beside the IP address list of SPoE fieldbus driver #36. A found drive is added to the list with one click.
  • apps/motion_master/swagger.yml documents the route, and the generated client is regenerated.

Out of scope

  • Assigning or changing a drive's IP address. DCP can set one, but SPoE fieldbus driver #36 leaves address assignment to PRONETA and DHCP.
  • Discovery of EtherCAT devices. POST /api/scan does that.
  • Advertising Motion Master itself on the network. That is a won't-do (CLAUDE.md, Networking and TLS).

Notes

References

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions