Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create, send and receive ethernet packets to UUT

I need to create and send ethernet packets to control and communicate with an RF board. I would also like to receive ethernet packets back which would be parsed and interpreted.
0 Kudos
Message 1 of 14
(5,893 Views)
What software are you developing in? LV CVI, other...

What type of packets? TCP/IP UDP, DECNET, LAN,...

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 14
(5,893 Views)
I am using LabVIEW 6i. The ethernet packets are standard, I believe, they consist of a destination, source, protocol type, data and a frame check sequence. I've done GPIB communication, but am not sure where to begin for Ethernet communication.
0 Kudos
Message 3 of 14
(5,893 Views)
Wher to begin?

Start by finding out what the PROTOCOL is.

Let me know what that is and then we can move on.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 14
(5,893 Views)
I'm attaching the dll documentation and my vi. At this point I am seeing so many access violations in LV that it is hard to debug. I can usually get the vi to return the friendly and NDIS adapter names, but it crashes when I set the boolean in frame 3 to true. This is the frame where it is supposed to open the adapter.

Any pointers on where I may have some bad data types would be helpful as well. I am having trouble finding good reference material to detail what such data types as Large_integer, Dword, Uint, etc. should be defined as in LabView.
Download All
0 Kudos
Message 5 of 14
(5,893 Views)
If you plan a using the .DLL I suggest you re-submit your Q to the LabVIEW General group.

There are many hot dogs there that can help with the .dll call.

If you decided to toss the .DLL and just want to talk to the device using the VI's that come with LV get back to me.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 14
(5,893 Views)
I need to send and receive 802.3 ethernet packets. Can you tell me what vi's come with LV that can query the adapters, read and display network traffic and ultimitely send ethernet packets?
0 Kudos
Message 7 of 14
(5,893 Views)
There you are!

I was wondering how this project was going.

As I said before, we need to know what protocol is being used.

Let me eaxplain. (Please refer to the diagrams and tutorial on pages 752-755 of 2002 NI catalog.)

802.3 is the spec for ethernet. It defines how packets will be transmitted on the wire.

Real Life analogy:
US Mail service.
It moves messages from one place to another. It defines that messages should be in an envelope. The Envelope must have a address so they know where it should be delivered to. You should also have a return address (but this is not enforced). Inside the envelope, you can put any kind of message you want as long as the person recieving it knows how to read it. The
reciever can look at the message and say "oh, this is english, I will read it in english".

Ethernet is similar. Ethernet (ignoring the electrical specs) defines a packet as consisting of
Source address (return address in US mail)
Destination address (delivery address)
Protocol (pretend there was a mark on the envelope that said this letter is in French).
Data (the letter itself)
Checksum (letter pages number as 1 of 4, 2 of 4, etc).

So what you have told me so far is that you want to send a letter!

You have been asking me how to comunicate with the other person but you have not told me what language they speak!

There are many different languages (i.e. protocol's) possible with 802.3.

Examples are

TCP/IP ( say this is English)
UDP (French)
etc....

LV has built in VI's to take a message and convert it to the protocol (lanuage) you want and send it on it's way.

So my question to you once more is;

What protocol are you using?

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 14
(5,893 Views)
I have been told that the packets are being sent using layer 2 communication rather than layer 3 which I'm told TCP/IP and UDP are. Given that, I have also heard that UDP may be the way to go as the packets are standard: MAC address of our target hardware, PC MAC address (our source), type (i.e. 1102 or 1180), proprietary commands and corresponding data, followed by a checksum.

Does this help? I did look at the UDP example, but am unsure what port to use. Does my target hardware need to be connected in order to determine the port? My preliminary attempts have just been to read network traffic on my ethernet card. I've gone into the control panel of my PC but do not see a port assigned to my ne
twork card.
0 Kudos
Message 9 of 14
(5,893 Views)
It seems that the only options in LabView are TCP/IP and UDP, neither of which will work because they force the "type" field in the packet to "0800". Does anyone know if it's possible to create a completely custom 802.3 ethernet packet, including custom "type" field, in LabView? Check out http://www.xenos.net/software/spak/ for a UNIX utility that does what we want to do in L.V.

Thanks...
0 Kudos
Message 10 of 14
(5,893 Views)