Skip to content

Alpaca potrocol is "ip restricted" #87

Description

@StefanoTesla

Hello, as requested here Developer@AscomTalks I'm opening this enhancement request.

Currently, once Alpaca has registered a device, it tries to reconnect using the stored IP address.

But, there are many reasons why a board with a static IP may not get the expected address. Assigning static IPs outside the DHCP range is common practice, and I assumed that would always work, until I found a (poorly designed) router that would not allow a static IP outside the DHCP pool.
Based on my experience, static IP addresses should always be assigned via the router instead of the device. That being said, when the router fails to cooperate, it causes significant issues.

That led me to this idea:

Every Alpaca device should expose a UniqueID in ConfiguredDevicesResponse. I know the specification currently treats this as optional, not mandatory, but we are good developers so.... 🥹

Consider this scenario:

  1. Alpaca tries to connect using the stored IP address.
  2. The device cannot be reached.
  3. Alpaca sends a discovery/broadcast and reads all ConfiguredDevices responses.
  4. Alpaca finds the board by matching UniqueID.
  5. Alpaca connects to the new IP and (optionally) stores it.

Many failure cases are still possible:

  • No device responds to the broadcast.
  • Devices respond, but none match the expected UniqueID.
  • More than one device reports the same UniqueID.

In all of those cases, the connection would fail, which is expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions