Consistent Bus/Hub/Port Naming

2 posts / 0 new
Last post
xieliwei
Consistent Bus/Hub/Port Naming

Hi, I'm trying to bind certain ports on the server to different clients, for example:

Server:
Port A
Port B
Port C
Port D

Client 1:
Bound to Port A and Port B

Client 2:
Bound to Port C

Client 3:
Bound to Port D

This way users can plug and unplug any device they want into their allocated ports without having to mess around with the command line (clients are running as services on Windows). There is only one server, added via Avahi and using SSL.

I've done this by using [AutoShare] specified with (I believe) only the port number:
4b589b939329cfb2.392=1
4b589b939329cfb2.393=1

etc.

This works fine at first, but whenever the server is rebooted, the port numbers change, and everything stops working. Is there a better way to do this?

Michael
.

Hi, actually the address is composed of the connection number shifted 32 bits left followed by the bus, host controller, hub and port address, (also, since there can be multiple levels of hubs, they may also be included in the address).

The number would change because your connection id would initially be 0 as its the clients first connection to the server. Then when you reboot the server and the clients connect back, the new connection number will be 1 and the new address would be very large as 1 is shifted 32-bits. If you were to reboot the server then restart the clients they would have the same address as before.

All these issues are handled automatically by the client if you use the API (AUTO USE) instead of directly editing the configuration file. It will automatically translate the address correctly for the server reconnections.

Log in or register to post comments