<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="text-align:left; direction:ltr;"><span style="font-family: monospace;">I found the issue using your TSV file; you'll need to re-compile tidy.</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">In tidy.c find</span><br style="font-family: monospace;"><span style="font-family: monospace;"> char buff[1000];</span><br style="font-family: monospace;"><span style="font-family: monospace;">and change to</span><br style="font-family: monospace;"><span style="font-family: monospace;"> char buff[100000];</span><br style="font-family: monospace;"><span style="font-family: monospace;">then find</span><br style="font-family: monospace;"><span style="font-family: monospace;"> char outbuff[1000];</span><br style="font-family: monospace;"><span style="font-family: monospace;">and change to </span><br style="font-family: monospace;"><span style="font-family: monospace;"> char outbuff[100000];</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">One buffer isn't large enough for your trace file and the stack is getting over written which causes a segfault, unless the file is written in such a way that it starts executing code, but I digress.</span><br style="font-family: monospace;"><span style="font-family: monospace;">I didn't drill down into which one is the real problem or verify that all of the data is there, so take it with a grain of salt :) But it doesn't crash anymore!</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">I'm going to enclose the regular expressions in quotes -- don't copy/use those, it's just to show you there's a trailing space in the replace string. Depending on your editor you may need to change \1</span><br style="font-family: monospace;"><span style="font-family: monospace;">to $1</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">Search: "([0-9a-f]{2})"</span><br style="font-family: monospace;"><span style="font-family: monospace;">Replace with: "\1 "</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">Tony</span><br style="font-family: monospace;"><div><br></div><div>On Thu, 2020-03-05 at 03:40 +0000, Ryan Fuller wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Hi Rich, I'm on mobile so no inline reply this time.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
If you can copy/paste the TSV file to pastebin.com or similar place I can inspect the file and see what tidy is choking on.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
As far as next steps go, it seems you are on the right track. Make a small change, get another radiotrace file and do a difference/comparison.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
I have a regular expression I use (on my computer) that adds spaces in between the hex characters so graphical diff programs like Meld work better when they perform highlighting. I can pull that up if you (or anyone in chirp-devel) is interested.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Tony</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Richard Gordon <rich@lowswr.com><br>
<b>Sent:</b> Wednesday, March 4, 2020 7:01:45 PM<br>
<b>To:</b> goldstar611@hotmail.com <goldstar611@hotmail.com><br>
<b>Cc:</b> chirp_devel@intrepid.danplanet.com <chirp_devel@intrepid.danplanet.com><br>
<b>Subject:</b> Re: [chirp_devel] Linux USB sniffing</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Thanks for the reply Tony.</div>
<div>TShark version is 2.6.8.</div>
<div>Yes, I have to remove the space between the dash and the i in the start_trace command. I also have to 'sudo modprobe usbmon' and 'touch cap.pcap' before starting.</div>
<div>(time goes by)</div>
<div>I was trying to capture a read from the radio. If I run tidy on this data to stdout I can see where the fault takes place in the tsv but I don't know why.</div>
<div>I had success sniffing a write to the radio and I now have a nice radiotrace file.</div>
<div>What is the next step? I will make some subtle changes and figure out how the memories are laid out.<br>
</div>
<div>Rich</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Mar 3, 2020 at 7:49 PM <<a href="mailto:goldstar611@hotmail.com">goldstar611@hotmail.com</a>> wrote:<br>
</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
Hi Rich,<br>
<br>
I've added some thoughts in line.<br>
<br>
Tony<br>
<br>
On Tue, 2020-03-03 at 17:25 -0700, Richard Gordon via chirp_devel wrote:<br>
> I really like Chirp and I thought I might try to help out with adding a new old radio.<br>
> I recently bought a used Icom IC-V8 and I have a programming cable.<br>
> Programming software runs fine under Wine.<br>
> I followed the directions on the Linux USB sniffing page.<br>
> I can capture fine and I end up with a cap.pcap file that is about 1 MB in size.<br>
Did you have to update the start_trace.sh script and remove the space between the dash and the i? start_trace.sh didnt work for me until I did that<br>
tshark - i usbmon$bus -w cap.pcap<br>
vs<br>
tshark -i usbmon$bus -w cap.pcap<br>
> I can then run the first 2 commands in the clean script and end up with the capdev and capdev.tsv files.<br>
> But when I try to run the tsv file through tidy, I get a segmentation fault but it does create an empty radiotrace.<br>
Just ensuring that you are compiling tidy.c using the info at the wiki: <a href="https://chirp.danplanet.com/projects/chirp/wiki/DevelopersUSB_Sniffing_in_Linux" rel="noreferrer" target="_blank">
https://chirp.danplanet.com/projects/chirp/wiki/DevelopersUSB_Sniffing_in_Linux</a><br>
> Any ideas?<br>
This doesn't help but I can reliably crash tidy with the non-tsv file so, maybe open up the TSV file in a text editor and ensure it "looks good"?<br>
<br>
The c file is written with a pretty high expectation that the TSV file is perfect so I suspect the TSV file formatting.<br>
<br>
What version of tshark are you using (tshark --version from a command line should be sufficient)<br>
> Thanks,<br>
> Rich Gordon k0eb<br>
> <br>
> _______________________________________________<br>
> chirp_devel mailing list<br>
> <a href="mailto:chirp_devel@intrepid.danplanet.com" target="_blank">chirp_devel@intrepid.danplanet.com</a><br>
> <a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel" rel="noreferrer" target="_blank">
http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br>
> Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers" rel="noreferrer" target="_blank">
http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><br>
<br>
</blockquote>
</div>
</div>
</div>
</blockquote></body></html>