bacpypes icon indicating copy to clipboard operation
bacpypes copied to clipboard

Object not responding to python script

Open SamsherSidhu opened this issue 8 years ago • 1 comments

Joel,

I am new to bacnet and bacpypes. I am attempting to connect a Shark 100b voltage meter to our 4-object system. Using Wireshark, we can detect all four objects' I-am responses, however the WhoIsIAm.py script is only detecting two objects. We have a Linux machine as our workstation that has a differing IP Address, Device Name, and unique Device ID set in the BACpypes.ini file (each object on the system has different addresses, names, and ID's). Any idea where I went wrong trying to detect the Shark? We have been following the guidelines in your tutorial PDF

SamsherSidhu avatar Jun 13 '17 19:06 SamsherSidhu

Sam,

On 6/13/17 3:40 PM, Sam Sidhu wrote:

I am new to bacnet and bacpypes. I am attempting to connect a Shark 100b voltage meter to our 4-object system. Using Wireshark, we can detect all four objects' I-am responses, however the WhoIsIAm.py script is only detecting two objects.

By "objects" you mean devices, correct? In BACnet terms the "object" is the analog or binary inputs and outputs.

According to the Shark documentation, the default BACnet Device Number is generated from the MAC address, so the Who-Is request you send out has to (a) not have any low or high limit or (b) have the low and high limit encompass the number that is on the BACnet/IP Interface configuration web page. From the WhoIsIAm.py application it should be as simple as this:

 > whois *:*

Which is a global broadcast. If you run it with a debugger attached to the UDP module like this:

 $ python WhoIsIAm.py --debug bacpypes.udp

Then you should see the Who-Is going out on the broadcast IP address for your workstation. For example, my address is 10.0.1.205/24 so the broadcast is sent to the ('10.1.0.255', 47808) socket address:

 DEBUG:bacpypes.udp.UDPActor:indication <bacpypes.pdu.PDU object at 

0x101399f10> <bacpypes.pdu.PDU object at 0x101399f10> pduDestination = ('10.0.1.255', 47808) pduExpectingReply = 0 pduNetworkPriority = 0 pduData = x'81.0b.00.0c.01.20.ff.ff.00.ff.10.08' DEBUG:bacpypes.udp.UDPDirector:handle_write DEBUG:bacpypes.udp.UDPDirector: - sent 12 octets to ('10.0.1.255', 47808)

We have a Linux machine as our workstation that has a differing IP Address, Device Name, and unique Device ID set in the BACpypes.ini file (each object on the system has different addresses, names, and ID's). Any idea where I went wrong trying to detect the Shark?

If you can see the Who-Is request that is prompting all of the devices to respond and the one the BACpypes application is generating then it should be pretty clear what is going on. I'm assuming that you can get to its web page after configuring it? It would be interesting to see what is on its "Advanced" configuration page and why you shouldn't change anything (bottom of page 7-10).

Joel

JoelBender avatar Jun 13 '17 21:06 JoelBender