LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I've got soap in my udp?

I have a LV 2011 compiled application running on a private network talking to a microcontroller, 

 

While using the LV UDP write/read functions (command, response), I occasionally get what looks like a soap services discovery message in our data stream.  It cant possibly be from the microcontroller and I can only conclude its originating in the application or runtime itself?  The application has no web services vi's or related in the project, I do open and close the UDP port on every command / responce.

 

Example:

Sent Command: "GET,MSG,1,:34bc9d"

 

Received: "</wsa:MessageID></soap:Header><soap:Body><wsd:Probe><wsd:Types>wsdp:Device</wsd:Types></wsd:Probe></soap:Body></soap:Envelope>1€

76D1
Ùãsvelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsdp=458515949::Data:4B-41-60-00-37-12-00-00
ParsedMsgObj: 1 MsgId: 1458 Mask: 0 Len: 8 ptrData: 536871184 uTime: 3382654
Flags->394
:255406297"

 

What should have been received: "Data:4B-41-60-00-37-12-00-00 ParsedMsgObj: 1 MsgId: 1458 Mask: 0 Len: 8 ptrData: 536871184 uTime: 3382654 Flags->394 :255406297"

 

 

Whats intersting is that the data I am looking for is there, at the end but polluted.

It feels to me like something in the default build profile is getting turned on? Is there something I can turn off at the build stage? This does not occur in the development environment.

 

 

 

Environment:

Win7 (only running the LV app and runtime - no 3rd party software is installed, and I have pruned windows services to the minimum, no firewall, Ive accounted for all running threads)

Private, non routed network.

2011 32bit, 

udp port 824

 

0 Kudos
Message 1 of 6
(2,731 Views)

Hello wolfeman,

 

I am currently looking in to the reason you have been receiving remnants of SOAP framework in your receive message but I would like to ask you if there is any pattern as to when this occurs? You mentioned that this "occasionally" happens which leads me to believe that this is a product of a particular send command or situation as opposed to the UDP functions being used.

 

Also, simply for my reference, could you please tell me what microcontroller you are using? This shouldn't have any bearing on the communication but it may help in clarifying the details of the overall system.  

 

Best Regards, 

 

Wes W

Wes W
Application Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 6
(2,669 Views)

Wes,

 

Thanks for looking into this!

 

I have been trying to corralate this as well to some external event or trigger source, and I cant think of anything - the garbled message seems to  happen randomly.  The message you see here is basically a heartbeat that continues to run every second; 99% of the time the system is idle so we see most failures when nothing is going on other than the hearbeat. (~once a day) But it has also happened during operation.  If I didnt know better its like the runtime got bored and decided to see if any web services wanted to play.  The app is running a ~100mb of memory and appers not to be growing / memory leaking.  The thing that I am curious about is the "web services discovery" in the message.  I know the LV 2011 version has that web publishing stuff but I checked the development system and nothing is used or enabled.  The app is built on another PC and the binary is moved to the production.  

 

Thinking it was a common udp port someone else was using we moved the firmware and application to another port (we started on 828 and moved to 824).  Same problem and result.  

 

We are using a stellaris LM3S9B96 with the keil toolchain and RTX kernel. 

 

 

Thanks again

0 Kudos
Message 3 of 6
(2,661 Views)

Wolfeman, 

 

After conferring with my resources, I would like to ask if it is possible that your buffer size is set to be much larger than the receive message you expect? If so, you may be unexpectedly receiving data from an unrelated web service in your receive message which we may be able to filter out by using a smaller buffer. You may also use Wireshark, a packet analyzer, to capture a log file of the packets being sent/received by your system which may help us to locate the problem. As a last resort, you may also consider simply adding in a filter that can run inside your code to look for the particular SOAP framework messages being added in to your receive message if it appears to be the same every time. Please let me know how changing the buffer size effects the behavior of this VI and we can determine how to proceed from there. Have a great day!

 

On a related note, I've also found this blog post that seems to have some of the same characteristics as what you are experiencing. While the details of the issue are slightly different, they both deal with an inconsistency happening when using UDP and a microcontroller. 

Wes W
Application Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 4 of 6
(2,634 Views)

Wes,

 

I have the (udp read call) buffer defined at 8196 bytes? Do you think thats too big for UDP? We can get messages up to that length during operation, I am going to change it to 4096.  I ran wireshark on a 3rd pc on the private network.  The event occured and NO evidence of that message was in the transmission from the uC to the PC.  I guess my next step is to put wireshark on the embedded PC, and see if the capture can get loopback traffic as well. 

0 Kudos
Message 5 of 6
(2,598 Views)

Hello wolfeman, 

 

I would like to know if you have continued to see this error and what results you have seen from using wireshark on your embedded PC? This seems to be a relatively isolated incident so I would like to gather as much information as possible. 

Wes W
Application Engineering
National Instruments
www.ni.com/support
0 Kudos
Message 6 of 6
(2,569 Views)