capture and storage of marine AIS data

Hi, I have recently added an AIS receiver to my gadget collection. The device was supplied by Marinetraffic.com and is configured to send the data it receives via the internet to populate the live chart you see on the web page there. There's a number of stations around the place, all of which contribute to the chart on a first-in best dressed basis for each position report. One of my areas of interest is VHF propagation and recently I noticed on my station's coverage graph that there had been some 'troppo' about and I had received signals from over 1000km away. Unfortunately, the Marinetraffic website only shows a sliding 2-day window of coverage and so I "lost" the chance to grab a screenshot before I realised. The device (a Comar SLR300N) also has a USB port through which data can be captured locally. I currently have this talking quite happily to OpenCPN on my Kubuntu machine and displaying the data received by my station, which I can compare against the live chart on the website. I'd like to be able to tap the USB output and grab the data as it comes off, parse it and store it locally so I can play around with it. I have found various bits and pieces, that do part of the job, but my attempts to glue it all together have been a bit Heath-Robinson. I believe the device sends NMEA sentences. I have verified this by using aisdispatcher and dumping the output and then using an online decoder/parser to view the data, but have not yet succeeded in setting it up to run a local routine without way more manual intervention than I want. Just wondering if anyone else has played with such devices and done a similar thing ? Andrew -- - http://surfcoast.redbubble.com | https://picasaweb.google.com/107747436224613508618 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- "Unless someone like you, cares a whole awful lot, nothing is going to get better...It's not !" - The Lorax -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- A committee is a cul-de-sac, down which ideas are lured and then quietly strangled. Sir Barnett Cocks -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- "A mind is like a parachute. It doesnt work if it's not open." :- Frank Zappa -

You can use tcpdump and wireshark to capture and analyse USB data. mount -t debugfs / /sys/kernel/debug modprobe usbmon At this point you can just `cat /sys/kernel/debug/usb/usbmon/1u` to get an ascii representation of the USB traffic, meaning you'll probably have to write a parser, or you could use tcpdump to capture the data, and wireshark to analyse it. tcpdump -i usbmon1 -w /tmp/usb_data.pcap wireshark /tmp/usb_data.pcap I don't have a suitable device to test wireshark's handling of NMEA with. So this is more of a store then parse the data solution, rather than parse then store. Maybe useful? Depends a lot on what you want to do with it next. Andrew On 07/02/14 13:49, Andrew Mather wrote:
Hi,
I have recently added an AIS receiver to my gadget collection. The device was supplied by Marinetraffic.com and is configured to send the data it receives via the internet to populate the live chart you see on the web page there. There's a number of stations around the place, all of which contribute to the chart on a first-in best dressed basis for each position report.
One of my areas of interest is VHF propagation and recently I noticed on my station's coverage graph that there had been some 'troppo' about and I had received signals from over 1000km away. Unfortunately, the Marinetraffic website only shows a sliding 2-day window of coverage and so I "lost" the chance to grab a screenshot before I realised.
The device (a Comar SLR300N) also has a USB port through which data can be captured locally. I currently have this talking quite happily to OpenCPN on my Kubuntu machine and displaying the data received by my station, which I can compare against the live chart on the website.
I'd like to be able to tap the USB output and grab the data as it comes off, parse it and store it locally so I can play around with it. I have found various bits and pieces, that do part of the job, but my attempts to glue it all together have been a bit Heath-Robinson.
I believe the device sends NMEA sentences. I have verified this by using aisdispatcher and dumping the output and then using an online decoder/parser to view the data, but have not yet succeeded in setting it up to run a local routine without way more manual intervention than I want.
Just wondering if anyone else has played with such devices and done a similar thing ?
Andrew
participants (2)
-
Andrew Mather
-
Andrew McNaughton