Project Objective: Develop an open source AIS Alarm that alerts sailors that a new marine vessel with AIS is within range


In this post the dAISy receiver will be connected and the first AIS messages received.

dAISy Connected and First AIS Messages Received

The green LED on dAISy indicates an AIS message!


The dAISy receiver is easily accessible.  A header is provided with RX, TX, GND, 5V, 3V3, and even RST and TST for the very brave.  Here TX on dAISy has been connected to RX on the FR2111 prototype breadboard.  The antenna is connected on the left bottom connection of dAISy and power is coming in on the right.  Things worked too after I remembered to connect GND between dAISy and the prototype.  Doh!


There is debug capability for dAISy available over the USB connection.  By default the serial connection of dAISy on the header described above is inactive.  The photo below shows a configuration window open in a terminal session and serial made active at 38400 baud.  Don't forget to save the settings!  All of this is explained in the dAISy manual.

dAISy Debug Window

And for those who want to see what AIS NMEA messages looks like, here they are streaming into the debug window:

NMEA Messages Streaming

Now it is time to see if the messages are being received properly by the prototype.  Main() in the code was modified to check UART for incoming characters and store them into a temporary buffer called incoming.  When the special character '\n' is detected then the message is complete and the message is placed into TX buffer of UART character by character.

int main(void) {
    WDT_A_hold(WDT_A_BASE);                    // stop the watch dog
    PMM_unlockLPM5();                          // activate port settings after power on
    __bis_SR_register(GIE);                    // globally enable interrupts
        // Manage incoming NMEA sentences
        static int i = 0;                      // tracks charachters read from UART
        while (RXFlag == 1){                   // read incoming chars
            if (i < MSG_LEN-1){                // do not overrun temporary buffer        *** How to handle error?
                incoming[i] = (char) RXData;   // store in temporary buffer
                RXFlag = 0;                    // reset flag
            incoming[++i] = 0;                 // store end of string at next location
            if (incoming[i-1] == '\n'){        // newline indicates end of NMEA sentence
                size_t length = strlen(incoming);
                int j = 0;
                for(j = 0; j < length; j++){
                    TXData = incoming[j];
                    EUSCI_A_UART_transmitData(EUSCI_A0_BASE, TXData);
                        // Wait until complete
                incoming[0] = 0;               // reset temporary buffer
                i = 0;                         // reset counter


The logic analyzer was set up to read both incoming and outgoing activity on the prototype.  The entire incoming and outgoing NMEA messages from the prototype cannot be fit into one window in the logic analyzer and still be read.  But the following screen shot shows the two sentences compressed and further checking shows a perfect match.

Logic Analyzer Message Test

This is real progress.  Now to set up the ring buffer and see if memory is looking sufficient to store the desired 16 messages.


Past Posts from this Project:

AIS Alarm

AIS Alarm - The Process

AIS Alarm - Prototype Hardware

AIS Alarm - Timers and GPIO

AIS Alarm - Prototype Code Outline

AIS Alarm - UART


References and Links:

WEGMATT LLC - dAISy AIS Receiver - low cost AIS receiver

Texas Instruments MSP430FR2xx FRAM Microcontrollers - Post No. 4

TI MSP430FR2111