I have been using the BACnet stack for quite some time now and it works very well. I recently ported my code to use MSTP on a embedded linux platform. I notice that I have to wait anywhere from 5 to 25 seconds to get a response. I have ran the code on my desktop linux using a USB to Serial adapter and it works great.
For example if I read the present value property it takes around 20 seconds to respond.
Could you give me some insight on why this would occur? I don't think it has to do with CPU load since the program only around 3% CPU usage.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So I used the dlmstp.c found "https://sourceforge.net/p/bacnet/code/HEAD/tree/trunk/bacnet-stack/ports/". I saw improvements in the response but it's still quite slow around 10 seconds or so.
I only updated the ringbuffer and dlmstp code.
Do you think it will help if I update to all the code found in the trunk?
I noticed the MSTP_Receive_Frame_FSM only process a single byte at a time. Would it be possible to process all the bytes coming off the UART and pack them into a frame buffer for processing? That is if 1kB read from the UART process the entire 1KB into "n" frames and then process the frames.
Last edit: ElmerFudge 2016-02-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Before updating lots of code for possibly no gain, it might be useful to monitor the MS/TP traffic with a tool like mstpcap to see where the delays are coming from.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have been using the BACnet stack for quite some time now and it works very well. I recently ported my code to use MSTP on a embedded linux platform. I notice that I have to wait anywhere from 5 to 25 seconds to get a response. I have ran the code on my desktop linux using a USB to Serial adapter and it works great.
For example if I read the present value property it takes around 20 seconds to respond.
Could you give me some insight on why this would occur? I don't think it has to do with CPU load since the program only around 3% CPU usage.
Are you using the ports/linux/dlmstp.c from SVN? It was updated to fix some problems, but there has not been a release since then.
Hi Steve,
I am using the dlmstp found in "bacnet-stack-0.8.2". I will give it a shot and let you know.
Last edit: ElmerFudge 2016-02-17
Hi Steve,
So I used the dlmstp.c found "https://sourceforge.net/p/bacnet/code/HEAD/tree/trunk/bacnet-stack/ports/". I saw improvements in the response but it's still quite slow around 10 seconds or so.
I only updated the ringbuffer and dlmstp code.
Do you think it will help if I update to all the code found in the trunk?
I noticed the MSTP_Receive_Frame_FSM only process a single byte at a time. Would it be possible to process all the bytes coming off the UART and pack them into a frame buffer for processing? That is if 1kB read from the UART process the entire 1KB into "n" frames and then process the frames.
Last edit: ElmerFudge 2016-02-17
Before updating lots of code for possibly no gain, it might be useful to monitor the MS/TP traffic with a tool like mstpcap to see where the delays are coming from.