LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using ethernet TCP/UDP frames with header

Solved!
Go to solution

Hello everyone,

 

I didn't manage to find a clear answer to my specific problem.

 

I need to send an ethernet frame following UDP or TCP protocols. The problem is that I can't access to the frame header if I use TCP / UDP LabVIEW function. I really need to control the frame's header in my application.

I first thought about using VISA functions, but it doesn't seem to work :

A frame is sent (not the expected frame, probably a synchronisation one), then the write function waits 2 seconds (timeout value), and do a -1073807343 error : "VISA:  (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system."

Maybe I didn't use it properly.

 

If not possible, i will probably use an external DLL.

 

Can you confirm that what I am trying to do is possible with VISA or any other LabVIEW function ?

Do you have other ideas before I try to find an appropriate library ?

 

Thanks

Alban RCENTUM ADENEO
Certified LabVIEW Developer

Message 1 of 5
(3,785 Views)
Solution
Accepted by RavensFan

Hello,

In this (linked) forum, they have discussed problems similar to yours. You can take a look at it and find some useful hints.

 

If everything is fine with your hardware, software and connection, you could use the following example to parse out the Ethernet and IP header information.

 

Greetings and Regards,

 

James

Greetings and Regards,
James
Message 2 of 5
(3,703 Views)

Hello and thank you for your answer.

 

I did have some time to search on it, and i now know that what I was trying to do with VISA is not possible : there is no option for UDP, so I can't send a unique custom frame.

I did see your example. It works, but i wanted to send frame with custom IP header too. I am currently searching around Wincap dll and similar libraries.

 

I will update this post with the answers I find, but feel free to continue submitting your ideas if you have some.

 

Regards,

 

Alban RCENTUM ADENEO
Certified LabVIEW Developer

0 Kudos
Message 3 of 5
(3,685 Views)

Thanks to the example you gave me, i was able to catch raw packets in my application.

 

I used the library (also based on Winpcap) linked in this forum to write raw ethernet frames and it works well !

Note that the "read" function in this library has a size limit, so i couldn't use it.

 

I eventually used the 2 Labview libraries, one for the read part and the other for the write part.

 

I hope it will help some,

Thank you again James.

 

Alban RCENTUM ADENEO
Certified LabVIEW Developer

Message 4 of 5
(3,657 Views)

Hi,

you are welcome!

We are here to help each other.. 
And thanks for marking the problem as solved. 
Like that, you will help others to find a possible answer quicker.

 

Have fun programming in LabView,

 

Greetings and Regards,

 

James

 

Greetings and Regards,
James
0 Kudos
Message 5 of 5
(3,641 Views)