Sei sulla pagina 1di 6

OpenCPNGarminRadarPlugin

HardwareInterface
TheGarminRadarPlugInforOpenCPNrequiresaspecifichardwareinterfaceinordertoallowtheOpenCPN
applicationtoaccesstheEthernetdatacapturedandbroadcastbytheradarscanner.Therearethreeinterconnectscenarios
possible,dependinguponwhethertheinstallationincludesanexistingGarminchartplotter,andtheoperationalmode
desired.

InterfaceType0:OpenCPNSlaveMode,usingexistingGarminchartplotter.
Thisisthesimplestinterfaceoption.Inthisscenario,theinstallationincludesanexistingGarminchartplotter
interfacedtotheradarscanner.TheOpenCPNcomputerisconnectedbymeansofanEthernetpatchcabletoafreeporton
therearfaceofthechartplotter.Operationally,thechartplotterandOpenCPNcomputershareaccesstotheradarscanner
data.However,thechartplotteristhemasterinthiscase,andtheOpenCPNcomputeristheslave.Allcontrolofrange,
gain,etcisdonebythechartplotter.TheOpenCPNcomputersimplycapturestheEthernetscannerdataisitappears,and
displaysthescandataappropriatelyscaledtotheviewportshownontheOpenCPNcomputer.Asmightbeexpected,overall
OpenCPNsystemperformanceandscreendisplayqualitywillbesuboptimalinthiscase.

InterfaceType1:OpenCPNMasterMode,usingexistingGarminchartplotter.
Inthisscenario,theinstallationincludesanexistingGarminchartplotterinterfacedtotheradarscanner.Itis
desiredthatthechartplotterandOpenCPNcomputermayhavesharedaccesstoandcontroloftheradarscanner.Thismode
willprovideimproveddisplayresolutionandperformance,astheOpenCPNcomputermaydirectlycontroltheradarscanner
asrequired.

Unfortunately,thechartplotterdoesnotechoscannercontrolcommandsappearingonitsauxiliaryEthernetports
outtothescanneritself.Thus,whiletheremaybefreeEthernetportsavailableonthechartplotter,itisnotsufficientto
simplyattachtheOpenCPNhostcomputertooneofthesefreeportsifscannercontrolbytheOpenCPNcomputeris
desired.WhatisinsteadrequiredistheadditionofasimpleEthernethubbetweenthechartplotterandtheradarscannerso
thattheOpenCPNcomputermaydirectlycontrolthescannerasnecessary,aswellascapturethescannerdatastreamfor
display.
Anadditionalcomplicationexists.Theradarscannertakesadvantageofanunusedpin(Pin5)ontheEthernet
cablingtomanageitslowpowersleepmode.ThisfunctionalityisprovidedbydedicatedwiringintheEthernetconnectors
onthechartplotter,andcontrolledbythechartplotterfirmware.Unfortunately,itisnotcommonforEthernethubstopass
throughtherequireddedicatedwiringpinsonthecable,Asaresult,inanOpenCPNsharedscannerenvironment,wemust
duplicatethispowercontrolwiringexternally.Finally,wemayadditionallywishtoimplementaphysicalswitchinorderto
controltheradarscannerpowerindependentlyfromthechartplotter.
AsuggestedwiringlayoutfortheOpenCPNInterfaceType1isshownhere.

InterfaceType2:OpenCPNMasterMode,nochartplotter.
Inthisscenario,theinstallationconsistsonlyofaGarminradarscannerandanOpenCPNcomputer.Itisdesired
thattheOpenCPNcomputermayrealizefullandindependentcontrolofandaccesstotheradarscannerdata.
AsintheType1interface,anexternalmechanicalswitchisrequiredinordertocontrolthepowercyclingtothe
scanner.
AsuggestedwiringlayoutfortheOpenCPNInterfaceType2isshownhere.

OpenCPNInterfaceNotes:
1.

AconvenientmethodtoaccesstheEthernetradarscannerpowercontrolpin(Pin5)istouseaFemaleFemale
Ethernetadapterplug.Areadilyavailablecommercialadapterisrecommended,suchastheAmphenol
MRJ578001adapter.ThisparticularcomponentcontainsasmallPCboardwhichallowseasyaccesstothe
individualEthernetcablepinsforbypassjumperandswitchattachment.
Directlink:http://www.digikey.com/productdetail/en/MRJ578001/MRJ578001ND/1242671?cur=USD

OpenCPNGarminRadarPlugin
NetworkInterface
TheOpenCPNGarminRadarPlugincommunicateswiththeradarscannerbymeansofstandardEthernet
protocols.Therearetwoprotocolsofinterest;a)ControlpacketssentfromtheOpenCPNcomputer(orattached
chartplotter)tothescanneraretransmittedtoaspecificfixedscanneraddress(IP)andportusingUDPDatagramprotocol,
andb)periodicradarscandataandstatusreportsfromtheradarscanneraretransmittedsystemwidebymeansofUDP
Multicasting.ThissplitofprotocolsiscriticaltotheOpenCPNPlugIn,asitallowsharingoftheradarscannercaptured
datastream.Toenablethisinterfacetotheradarscanner,theOpenCPNcomputermustbeappropriatelyconfiguredforthe
operationalmodedesired.
ForoperationinSlavemode,thereisgenerallynospecialconfigurationrequired.Linuxsystemsmusthavetheir
EthernetportconfiguredforMULTICASTreception,usuallyenabledbydefault.WindowssystemsalsoenableMulticast
receptionbydefault.IfyouhappentoberunningWindowsasaguestunderVirtualBox,youwillneedtoenableBridged
NetworkingintheVirtualBoxsettingdialogforthisVM.
ForoperationofthePlugIninMastermode,additionalconfigurationisrequired.Thegeneralideaistoconfigure
anEthernetportontheOpenCPNcomputerwithanIPaddressbelongingtothegroupinwhichtheradarscannerlistensand
resides.Thisgroupaddressishardwiredintotheradarscanner,andistheprivate(nonroutable)addressrange
72.16.0.0/24.Formally,wemaychooseanyspecificIPaddresswithinthisgroupfortheOpenCPNcomputer,otherthanthe
addressofthescannerorthechartplotter.Practically,theOpenCPNRadarPluginassumesthattheIPaddresswillbesetto
172.16.1.1/24.
NotethatthereistypicallyonlyonephysicalEthernetportontheOpenCPNcomputer,andformostusersthatport
isconfiguredbythehostoperatingsystemaccordingtoitsneeds.WhatwewillbedoingisaddinganotherEthernetaccess
portinsoftware(alsoknownasanaliasport),toworkinparallelwiththeexistingport(s).
Forlinuxcomputers,acommandlinetocreateandenableanotherportis:
(assumingyourbaseEthernetcardiscalledeth1)
$sudoifconfigeth1:1172.16.1.1netmask255.255.240.0up
Ofcourse,youmaynotwanttoenterthiscommandeverytimeyoupowerupyourcomputer.Itispossibletoedit
thelinuxsystemconfigurationfilesinordertomakethisportcreationpersistent.Forexample,inUbuntuyoumaymodify
/etc/network/interfacesasfollows:
autoeth1:1
ifaceeth1:1inetstatic
nameGarminspecial
address172.16.1.1
netmask255.255.240.0
network172.16.1.0
broadcast172.16.1.255
gateway172.16.1.100
ifupeth1:1
Otherlinuxsystemswillhavesimilarcapabilities.

InWindows,itisalsopossibletosetupaliasIPaddresses.Forexample,inWindowsXPyoumayselect
NetworkAdapter>Properties>TCP/IP>Properties>Advanced
HereyoumayenteranyadditionalIPaddresses(aliases)asrequired.FortheOpenCPNRadarPlugin,setupanIPof
172.16.1.1withasubnetmaskof255.255.240.0.NotethatonWindows,aliasIPaddressesmayonlybesetifallstaticIP
addressesareenabled,andDHCPautoconfigurationisnotused.Thisrequirementisnotexpectedtobealimitationfor
shipboardcomputers.
Ofcourse,iftheOpenCPNcomputerhasnootherpreexistingEthernetconnections,itissufficienttosimplyset
thecomputer'smainIPaddressstaticallyto172.16.1.1/24.

Potrebbero piacerti anche