PolarView: Connecting AIS Receiver via USB

Electrical and electronic topics for small boats
jimh
Posts: 11672
Joined: Fri Oct 09, 2015 12:25 pm
Location: Michigan, Lower Peninsula
Contact:

PolarView: Connecting AIS Receiver via USB

Postby jimh » Sat Jan 28, 2017 8:39 am

I have been using a USB connection to an AIS receiver for the application POLARVIEW NS for many years under MacOS. Below is a screen shot of the port configuration:


Image

In order to make a connection to an AIS USB port, you first have to discover the device name. To find the device name of your AIS USB port, use a terminal window. Enter the command

ls /dev/cu*

--or--

ls /dev/tty*

This will list all devices. To see the data from a serial connection to the AIS device, enter the command

screen /dev/cu.yourDeviceNameHere 38400

For MacOS users it may be helpful to have a handy terminal available. An AppleScript I wrote invokes a terminal window. Here is the text of an AppleScript:

Code: Select all

set baudList to {1200, 2400, 4800, 4800, 9600, 19200, 38400, 57600, 115200, 230400}

set baudRate to (choose from list baudList default items {9600})

tell application "Terminal"
   
   set serialDevices to (do shell script "ls /dev/cu*")
   
   set theDeviceList to (paragraphs of serialDevices) as list
   
   set theDevice to (choose from list theDeviceList)
   
   do script "screen " & theDevice & " " & baudRate
   
   set number of rows of window 1 to 24
   set number of columns of window 1 to 80
   set background color of window 1 to "black"
   set normal text color of window 1 to "green"
   set custom title of window 1 to "SerialOut"
   
   
   display dialog "To quit your terminal session type control-A then control-backslash "
   
end tell


Open the Script Editor and paste this text into the editor. Then hit the COMPILE button (the hammer icon). Then SAVE the script.
Attachments
polarViewScreenShotUSB_PortConfigAIS.png
polarViewScreenShotUSB_PortConfigAIS.png (56.57 KiB) Viewed 2836 times