Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the Source port ? #66

Closed
dibrony opened this issue Jan 19, 2021 · 4 comments
Closed

How to change the Source port ? #66

dibrony opened this issue Jan 19, 2021 · 4 comments

Comments

@dibrony
Copy link

dibrony commented Jan 19, 2021

Hi,

Each time I run the application i have a new random source port while the destination port is always 47808.
How can I fix the source port ? I need it to be 47808 as well.

Thank you

@gralin
Copy link
Member

gralin commented Jan 20, 2021

Hi @dibrony, you need to set useExclusivePort on the transport to true and specify the port you want to use.

var localPort = 0xBAC0;
var localEndpointIp = "192.168.1.2";

var transport = new BacnetIpUdpProtocolTransport(
    localPort, useExclusivePort: true, localEndpointIp: localEndpointIp);

var client = new BacnetClient(transport);

This is the same setting you need to change in Yabe the first time you use it, so it always uses the same source UDP port.

image

@ameyaalpha
Copy link

Which BACnet protocol version does the stack support? Has any of the device using the stack gone through BTL testing? Can you please let us know?

@gralin
Copy link
Member

gralin commented Apr 23, 2021

@ameyaalpha please open a new issue as this question is not related to this topic

@gralin gralin closed this as completed Apr 23, 2021
@ameyaalpha
Copy link

OK thanks @gralin

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

No branches or pull requests

3 participants