Friday, November 23, 2018

transceivers ....modify MSSI number

SRT proprietary AIS commands

My Navico NAIS-300, like most other commercial AIS class B products that have been available for a while, uses the SRT AIS class B OEM board. I know the same board is used in the Raymarine 500, True Heading AIS-CTRX, Transas, Digital Yacht AIT250/1000, and many more. The tell-tale seems to be that the AIS transponder comes with Pro AIS software. I have hooked up a serial data logger so that I could find out what NMEA-0183 commands the Pro AIS software sends to the transponder. Unfortunately neither SRT nor any of the vendors publish the protocol.

My research into this started because I wanted to control my AIS transponder's transmit setting using software. For some reason there are many functions that you can assign to the remote button input, but not a reliable level-style on/off of the transmit functionality. This has been added to recent firmware versions, but mine contains older firmware. However, an hour's worth of analysis shows that controlling the transmitter is actually quite easy. In fact, almost everything that you can set up using Pro AIS is easy as pie to implement.

Basics


The SRT product, logically, uses the 'P' prefix to indicate Proprietary, followed by SRT. Here is an example of a PSRT message:
$PSRT,LED,01*49
Just like all other sentences I document on this page the shown message format is inclusive of the NMEA style checksum bytes at the end of the line, e.g. *49 in the message above.

For some reason some sentences start with a prefix $DUAIQ. I have no theory as to why this is so, maybe the data is intercepted by a different microcontroller.

Authorization

Some sentences require the passing of a password. Luckily, the protocol to do this is very simple -- just send the following sentence before every authorized message:
$PSRT,012,,,(--QuaRk--)*4B

Silent mode

To make the AIS silent (not transmit its own position) send the following authorized (prefix with the command above) sentence:
$PSRT,TRG,02,33*6A

To make the AIS transmit its own position send the following authorized sentence:
$PSRT,TRG,02,00*6A

Alarm mode

To make the AIS output all alarms every minute send the following authorized sentence:
$PSRT,ALM,0000*45

To make the AIS output only the active alarms send the following authorized sentence:
$PSRT,ALM,0001*44

GPS update speed

To make the AIS output GPS data every second send the following authorized sentence:
$PSRT,GER,01*54

To make the AIS output GPS data every four seconds send the following authorized sentence:
$PSRT,GER,00*55

GPS data


The SRT board has a complete GPS on-board. For some reason it only sends out two GPS sentences: RMC and GBS. See the GPSD source for more information on these sentences (as well as those below.)

To get the GPS to send out more GPS sentences send the following authorized sentence:
$PSRT,GPSDATA,,,1*60
This will cause the board to send out VTG, GGA, GSV, GLL and ZDA sentences as well as RMC and GBS. My particular board has a small bug in that it also starts sending out two copies each of the RMC and the GBS commands.

To get it to stop sending the additional GPS messages, send the following authorized command:
$PSRT,GPSDATA,,,0*61



Interrogating the board

There is a whole stack of sentences that can be used to read out system information. These are

LED status
Send: $DUAIQ,LED*29
Recv: $PSRT,LED,a*hh
a bit 1: Power On
a bit 2: TX timeout
a bit 3: Error
a bit 4: SRM status
hh: checksum

Internal data
Send: $DUAIQ,ADC*22
Recv: $PSRT,ADC,a,b,c,d,e,f,g*hh
a: Tx forward power
b: Tx reverse power
c: RSSI Rx 1
d: RSSI Rx 2
e: Internal 3V3 supply
f: Internal 6V supply
g: Supply voltage
hh: Checksum

Station Static Data (AISSD)
Send: $DUAIQ,SSD*20
Recv: $AISSD,a,b,c,d,e,f,g,h*hh
a: Callsign, 8 bytes fixed length; @ for unused bytes
b: Ship's name,20 bytes fixed length; @ for unused bytes
c: GPS antenna distance from bow, in m
d: GPS antenna distance from stern, in m
e: GPS antenna distance from port side, in m
f: GPS antenna distance from SB side, in m
g: DTE
h: Source Identifier
hh: Checksum

MMSI
Send: $DUAIQ,010*55
Recv: $PSRT,010,,,c*hh
a: ?
b: ?
c: MMSI

OEM name
Send: $DUAIQ,SRM*28
Recv: $PSRT,SRM,a,b,c*hh
a: ?
b: ?
c: OEM name used in AIS messages, 7 bytes fixed length; unused bytes are filled with @.
hh: Checksum

Vessel Static Data (VSD)
Send: $DUAIQ,VSD*25
Recv: $AIVSD,a,b,c,d,e,f,g,h*hh
a: Type of ship and cargo. For recreational use: 36 = Sailing vessel, 37 = Pleasure craft
b: Maximum present draught, always 00.0
c: Persons on board, always 0000
d: Destination, always @@@@@@@@@@@@@@@@@@@
e: Est. UTC of arrival, always 000000
f: Est. day of arrival, always 00
g: Est. month of arrival, always 00
h: Navigational status, always 00
i: Regional application flags, always 00
hh: Checksum

Software version
Send: $DUAIQ,SWF*26
Recv: $PSRT,SWF,a,b*hh
a: AIS software version
b: FPGA version
hh: Checksum

Transponder Serial Number
Send: $DUAIQ,SNO*36
Recv: $PSRT,SNO,a*hh
a: Serial number in ASCII, 10 digits. Usually all 0.

Reset Data Programming

The following command can be used to reset the AIS back to its factory settings, inclusive of the MMSI number, so that it can be reprogrammed, for instance when you want to sell your AIS transceiver.

$PSRT,RDP*6F

I have received numerous reports from people who tell me that this works fine, over a range of devices. Just make sure your AIS came with ProAIS and you should be OK.

21 comments:

  1. Works great, thanks. But only seems to effect the data output on the nmea 0183 side. NMEA 2000 data is unaffected. Any idea how to convince it to output detailed GPS data on NMEA2k?
    Reply
    Replies

    1. Ross, I too wish that I knew how to make my NAIS-300 do this!
  2. Thank you very much for the command list.. you save me.. :)
    Reply
  3. According to http://www.saabgroup.com/Global/Documents%20and%20Images/Civil%20Security/Maritime%20Transportation%20and%20Port%20Security/R4%20AIS/Manuals/7000%20108-011,G,Installation%20Manual%20R4%20AIS%20Shipborne%20Class%20A%20Transponder%20System.pdf

    $xxAIQ is MMSI query and programming NMEA0183 sentence

    It’s possible to query the following sentences:
    ACA, ALR, LRI, SSD, TXT and VSD

    AIQ,ACA - Query AIS Channel Assignment
    AIQ,SSD - Query Station Static Data
    AIQ,VSD - Query Voyage Static Data

    Page 74
    AISSD field g is DTE and h is Source identifier

    Page 75
    VSD – Voyage Static Data
    $--VSD,x.x,x.x,x.x,c--c,hhmmss.ss,xx,xx,x.x,x.x
    Field Format Name
    1 --VSD Sentence Id
    2 x.x Type of ship and cargo
    3 x.x Maximum present draught
    4 x.x Persons on-board
    5 c--c Destination
    6 hhmmss.ss Est. UTC of arrival
    7 xx Est. day of arrival
    8 xx Est. month of arrival
    9 x.x Navigational status
    10 x.x Regional application flags 
    Reply
    Replies

    1. Cool, thanks for that find. I will update the blog entry accordingly.
  4. Thank you very much for the valued knowledge.
    Reply
  5. Any idea if Raymarine/SRT have changed the Quark-password into something else? I'll need to reset the MMSI number of an AIS650 unit.
    Reply
    Replies

    1. Yes, this does not work with the new generation of SRT boards.
  6. Just wanted to say thanks for the info, this worked to reset a Navico NAIS300. I had to use Pro AIS (not Pro AIS2) to read the data. Easy as. Thanks again.
    Reply
  7. Got a used NAIS-300, plugged it in and seem to work, could see my vessel on marinetraffic.com, when I hooked up my Simnet connector to the NMEA2000 I lost the network, opened up my unit and found a short on the board at (IC10-or IC13) can transceiver MCP2551ISN it damaged R12 (10ohm resistor) and (D5 Zener diode) all were replaced and got my 5 volts back thru IC9 regulator, unit turns on but after a while red indicator light flashes once every couple of seconds plus I cannot access thru PROAIS anymore, any ideas ?
    Reply
  8. AMEC Camino (like EM-trak B100)
    This tricks dont run :-(
    Reply
  9. Thank you so much for the codes! Needed to reprogram my AIS after I bought my vessel ... finally I got the correct AIS, after 5 years.
    Reply
  10. This comment has been removed by the author.
    Reply
  11. thanks you, i am going to try reprogrammer a AIS-CTRX, true heading for a new vessel.
    Juan, Spain
    Reply
  12. 2008 Digital Yacht AIT250
    Worked a champ. I had to copy the authorization and reset string and paste. There may be a minimum time between the commands. Not sure.
    $PSRT,012,,,(--QuaRk--)*4B$PSRT,TRG,02,33*6A
    worked perfectly. I used a serial port monitor to capture the auth sequence as well.
    THANKS!
    Reply
  13. This is a great resource! I was able to reset and reprogram the MMSI on a Raymarine AIS500.

    Like others have posted, to get the reset to work you have to execute the reset command quickly after the authorization command. In the ProAIS2 software, go to the "Serial Data" tab, paste the following in the "Enter Commands" window and send:

    $PSRT,012,,,(--QuaRk--)*4B$PSRT,RDP*6F

    The new version of ProAIS2 v1.10.01 will NOT set the MMSI correctly for some reason. The only way to do it is to downgrade to an older version of the software or copy and paste the following command:

    $PSRT,012,,,(--QuaRk--)*4B$PSRT,010,,,#########*09

    where ######### is your MMSI issued by the FCC. You also will need to change the "*09" at the end to a correct NMEA checksum. There are lots of online checksum calculators out there to use.

    Good luck!
    Reply
    Replies

    1. http://nmeachecksum.eqth.net/

      Just paste this part "$PSRT,010,,,#########" and then this online calculator will reply with the same message except add the *XX to the end. Then paste the whole string above and send to the AIS. ProAIS2 v1.10.01 works fine for setting other properties (vessel type, name, call sign etc...)
  14. Hi I have a raymarine ais650 which I need to reset the mmsi number on. Unfortunately none of the above commands seem to work for me, even the one where you input the Mmsi directly with a checksum after. When I hit send in Aispro 2 to send the serial command I Don't get any errors but the mmsi stays greyed out as the old number. I can change everything else, name, gps position etc., help please
    Reply
    Replies

    1. On newer models, they changed the password (which is --QuaRk--). You will have to replace that --QuaRk-- with the updated password. I don't know what it is.

      Did a search and did NOT find the new code. But in the search, I fell over how to reset my Raymarine 220 VHF - thanks! Good luck with yours ...
  15. I can not reset my NAIS-400 B&G... have tried a lot of times but no result... i sent the message but it simply does nothing... THANKS

No comments:

Man in the Rain