Menu

bacserv and I-am

2016-02-22
2016-03-05
  • Miroslav Novotny

    Hello, can someone clarify this for me, please?

    When I run the Bacnet/IP "bacserv" which is the example for bacnet server it will broadcast/execute I-am on start.
    In the Device, in the protocol services supported the "I-am" bit is on.
    This makes sense to me. Bacserv tells all clients, that it just became available.

    But then I run "Bacnet Test Client" program (http://www.bac-test.com/) against bacserv, and the Bacnet Test client flagged this error:

    BITS : BIT00040
    Only A-Devices (Client Devices) should EXECUTE I-Am.
    (Read Addendum K.5.1-K.5.4 carefully)
    Diagnostic [ BIBBSanity ] Fails

    So I read K.5.1 and K.5.2 DM-DDB-B and the way I understand it, is that a server should "execute" Who-Is and then "initiate" I-am and it should not execute I-am.
    As far as I can see the Bacnet Test Client flagging error is correct.

    What is right?

    Thank you

    Miroslav

     
  • Steve Karg

    Steve Karg - 2016-02-23

    BACnet protocol-services-supported property bit value "Execute" is equivalent to "consume" or "handle", and the BACnet stack simply loops through the list of service "handlers" to see which ones are being used to know which bits to mark.

    In demo/object/device.c module:

        /* handle i-am to support binding to other devices */
        apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_I_AM, handler_i_am_bind);
    

    The baserv demo uses Who-Is and I-Am to bind addresses for COV & Alarm & Event notifications. It acts as a client device to bind addresses and consumes the I-Am to determine the address.

    If your product doesn't use those notification features, you would likely not use apdu_set_unconfirmed_handler() with I-Am, and the bit would not be set in protocol-services-supported property. BACnet devices can be a mix of client and server.

     
  • Miroslav Novotny

    Hi Steve, thank you for clarification.

     
  • Edward Hague

    Edward Hague - 2016-03-05

    Just be aware that this stack supports both client and server mode (In BACnet terminology, A and B devices)

    If you ONLY want to act as a Server, then ONLY Who-Is is 'executed' and should be indicated.
    The I-Am is 'initiated' and therefore the services suppored bit should not be set for this.

    Here is the table: (bah, sorry for the presentation)

    . Who-Is I-Am
    Client Only (A) x
    Server Only (B) x
    Client/Server (A and B) x x
     

    Last edit: Edward Hague 2016-03-05

Log in to post a comment.