Menu

Sending segmented packets

Help
Paul
2012-07-19
2013-05-28
  • Paul

    Paul - 2012-07-19

    Hi,
    I am trying to force vts to segment by allowing segmentation in the device properties and setting both the segment size and max apdu size to a low number, ie 100.
    I then use the AtomicWriteFile service to send say 500 bytes, which should be sent to the remote bacnet device in 5 segments, however it does not work.  I can even fill the file data window with 1600 bytes and vts will try to send it at that size.  Is this a bug, or is there something in the set up I am missing.

    Thanks,
    Paul

     
  • John Hartman

    John Hartman - 2012-07-19

    The dialog-driven message senders basically can't do segmentation.  You can (sometimes) craft individual segments, but you would need to do the Acks manually, etc.

    The SCRIPTING engine CAN do segmentation, based on the segment size you specify in the device properties.

    VTS scripting isn't pretty, but it does offer the big advantage that it lets you repeat your test by re-running the script without needing to re-populate the dialog.

     
  • Paul

    Paul - 2012-07-19

    Many thanks for your super fast response John, and very helpful.
    I will have a look at the scripting engine, and see if its possible to basically allow me to send a large file (about 2Mbytes) via AtmWriteFile service, hopefully its not too difficult :)

    Paul

     
  • John Hartman

    John Hartman - 2012-07-19

    I'm afraid you are likely to be frustrated by scripting as well:  your payload would have to be encoded something like
         OctetString X'12345678'
    Reasonable for a 4-octet string, not so good for 2 Meg!  I would expect you to find at least one buffer-overflow error on your attempt to parse a 4-Meg text line…

    If you have Visual Studio (not the free version - VTS uses MFC), you might be able to build what you want:  the backup/restore tests (on the Test menu) contain code to do file read and write.  You could probably harvest code from there to make a general-purpose file reader/writer.  If you do, I would encourage you to contribute it to the project.  If you send it to me, I can check it in for you.

     
  • Paul

    Paul - 2012-07-20

    Hi John,
    Thanks again, I have just tried playing around with the scripts and have got a basic ReadProperty test going on a couple of objects.  Can't find any examples for AtmRead/WriteFile operation but will have another read of the documentation to try to figure it out.  Unfortunately I don't have Visual Studio or the C++ knowledge to do the coding, otherwise I would do as you suggest.
    Cheers!

     

Log in to post a comment.