ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL prototype issue for loading PCAP File

Solved!
Go to solution

Great news!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 18
(2,889 Views)

@TenJigoku77 wrote:

Hi guys !

 

I'm happy to announce you that the solution with tshark is working fine.
I didn't finalize my application but it is well on track.

So I launch tshark from "system exec.vi" and I execute severals command line to : 

1) Select the interface

2) Acquire frames during a specified amoung of time, or after n packets acquired

3) Store those data in a pcap file

4) Read the pcap file and extract data as a json or xml file

 

I even succeed in selecting the correct channel for my zigbee network by re-writting the correct file.

Idem for the zigbee network key.

 

Anyway thanks guys for your help, you changed my week ^^


I have a similar requirement of Capturing the UDP data Frame Data )and Saving the same as pcap file and load/replay  back the saved pcap file in LabVIEW UI.

 

Please share the one you have tried to check whether that suits my requirement

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 12 of 18
(2,748 Views)

Hi !
I used the following command line :

TenJigoku77_0-1685130436824.png

the description of the command lines elements can be found here :
https://www.wireshark.org/docs/man-pages/tshark.html

I chosed to save the data as a json file, in order to read the data later with a labview thread, and as a pcap to be able to read the data back with wireshark if needed.
After that I needed to extract all the desired data from the json file. It's here that I spent a lot of time ^^'

Message 13 of 18
(2,736 Views)

Thanks for the response, I will try based on the suggestion.

 

What does the sub vi does, does it logs the data. If yes how?

 

Thanks a million.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 14 of 18
(2,727 Views)

Hi !
This sub vi starts tshark, and then tshark will log acquire data and log them as specified in the command line.
In this command line, for example I specified the path file and the extension (pcap and json).
So technically it's tshark that does all the work, this sub vi just call tshark. 

0 Kudos
Message 15 of 18
(2,714 Views)

Hi!

How do you stop the tshark capture?  Do you send a Ctrl-C command through the system exec?

 

Thanks!

0 Kudos
Message 16 of 18
(2,622 Views)

I think you have two options.  The first is to configure tshark to run for a certain amount of time and then it exits by itself.  The other is to kill it from the taskkill command (from a new prompt).

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 17 of 18
(2,615 Views)

Here is what I'm doing. Indeed taskill. I didn't see any drawback as far as I can tell.

0 Kudos
Message 18 of 18
(1,272 Views)