Skip to content

BACnet MSTP Slave mode doesn't seem to work #536

Answered by HyperFrank
HyperFrank asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, thank you for the reply.

I copied the dlmstp.c function MSTP_Slave_Node_FSM() from the port "bacnet-stack\ports\at91sam7s", which uses the flag you mentioned, MSTP_Flag.ReceivePacketPending = true;. Also, in function dlmstp_receive(), I had to adapt the clearing of the flag so the MSTP_Slave_Node_FSM() could capture the pending state on the next loop:

/* if there is a packet that needs processed, do it now. */
if (MSTP_Flag.ReceivePacketPending) {
    if (This_Station <= 127) {
        MSTP_Flag.ReceivePacketPending = false;
    }
    Statistics.receive_pdu_counter++;
    pdu_len = DataLength;
    src->mac_len = 1;
    src->mac[0] = SourceAddress;
    /* data is already in the pdu …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@HyperFrank
Comment options

Answer selected by HyperFrank
@skarg
Comment options

@HyperFrank
Comment options

@skarg
Comment options

@HyperFrank
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants