I think the demo bacwi program is bugged. The demo program invoked as:
$ bacwi 10.0.0.2:47808
per Wireshark, sends a "whois 10 10" packet to the network broadcast (10.0.255.255 in my case), as opposed to what I expected: a unicast packet to the IP with no instance ID specified.
This runs counter to the commad line help for the command, which says bacwi [ip]:[port] should work.
Am I misreading something? Is it bugged?
Newb analysis: I'm seeing that argv[1] is strtol'd straight away in the function that tries to parse the IP argument, and I get the impression this obliterates the IP. Throwing debug printf's into the code makes me wonder if it necessarily gets that far anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My preference is to migrate the demo code from trunk/bacnet-stack into the 0.8.x branch rather than patching the broken argument handling. Would the demo bacwi in SVN from trunk/bacnet-stack work for you?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the demo bacwi program is bugged. The demo program invoked as:
$ bacwi 10.0.0.2:47808
per Wireshark, sends a "whois 10 10" packet to the network broadcast (10.0.255.255 in my case), as opposed to what I expected: a unicast packet to the IP with no instance ID specified.
This runs counter to the commad line help for the command, which says bacwi [ip]:[port] should work.
Am I misreading something? Is it bugged?
Newb analysis: I'm seeing that argv[1] is strtol'd straight away in the function that tries to parse the IP argument, and I get the impression this obliterates the IP. Throwing debug printf's into the code makes me wonder if it necessarily gets that far anyway.
The demo bacwi application in the 0.8.x branch seems to have a problem handlng the unicast form with an IP address, so it is indeed bugged.
The demo bacwi application in trunk/bacnet-stack/ handles the arguments this way:
My preference is to migrate the demo code from trunk/bacnet-stack into the 0.8.x branch rather than patching the broken argument handling. Would the demo bacwi in SVN from trunk/bacnet-stack work for you?
Yes, that works quite nicely, thanks. I hadn't realized the trunk was the best way to go.