Example configuration

OBP40 Yachta M5Stack AvNav

The following example demonstrates how to establish data transmission from an OBP40 to the Yachta wind sensor and an M5Stack ATOM CAN with NMEA2000-Gateway and how to use the data in the AvNav navigation app on a tablet. The M5Stack ATOM CAN serves as the central data repository where all data converges. Data transmission occurs via Wi-Fi network connections provided by an LTE router. The advantage of an LTE router is that it can provide all devices on board with a Wi-Fi internet connection, allowing devices within the Wi-Fi network to communicate with each other. The LTE router isolates the Wi-Fi network from the internet, preventing external access to your internal network. This allows devices such as mobile phones, tablets, and laptops on board to connect to the internet, and all devices have access to the sensor data via a web browser. The AvNav navigation software is installed on an Android tablet and used for navigation.

Tip

In principle, the M5Stack access point could also be used as a central WiFi router. However, its performance is significantly lower than that of an LTE router. We strongly recommend using a dedicated LTE or WiFi router. This will prevent communication problems between devices.

../_images/Use_Case_4.png

Fig.: Example configuration OBP40, Yachta, M5Stack, AvNav

The configuration process consists of the following steps:

  • Setting up an LTE router

  • Connecting M5Stack with NMEA2000 network and Yachta wind sensor

  • Connecting OBP40 to M5Stack

  • Connecting AvNav to the M5Stack

Setting up an LTE router

You can use either mobile or stationary devices as LTE routers. Mobile devices have the advantage of operating independently on a battery for extended periods and can also be used on land during excursions. Stationary devices are suitable when maximum reception is required, especially when traveling near the coast and needing to bridge long distances to the nearest mobile network base station. In such cases, it’s advisable to install mobile antennas at the top of the mast and connect them to the stationary router via cable.

Tip

When buying an LTE router, make sure it can operate in dual-band mode on both the 2.4 GHz and 5 GHz Wi-Fi frequency bands simultaneously and supports the 4G/5G mobile network standard. This way, you benefit from a high-performance internet and Wi-Fi connection in the 5 GHz band and avoid the often congested 2.4 GHz frequency bands. Such routers can seamlessly exchange data between the two frequency bands. An old mobile phone in hotspot mode performs similarly to an LTE router and can be a cost-effective alternative.

../_images/LTE-Router_TP-Link_M7450.png

Abb.: Mobiler 4G-LTE-Dualband-Router TP-Link M7450

  • Performance data
    • 4G/LTE mobile communication standard 50 Mbps

    • WiFi Dualband 2.4 GHz oder 5 GHz 300 MBit/s 1

    • 3000 MAh LiPo-Battery

    • 15 Hours of stand-alone runtime

    • Up to 32 WiFi devices can be connected.

    • 32 GB SD card storage

    • USB, SMB and FTP share for movies and music from SD card

    • Dokumentation

1

Simultaneous dual operation is not possible

Warning

The TP-Link M7450 LTE router cannot operate on both frequency bands simultaneously. Therefore, you must permanently set the TP-Link M7450 to the 2.4 GHz frequency band. The OBP40 and the M5Stack ATOM CAN only operate in the 2.4 GHz range.

../_images/LTE-Router_RUT360.png

Fig.: Stationary 4G LTE dual-band router RTU360

  • Performance data
    • 4G/LTE mobile communication standard 50 Mbps/scale

    • WiFi Dual Band 2.4 GHz and 5 GHz 300 Mbps

    • 2X LAN CAT6 100 MBit/s

    • External antennas for LTE and WiFi

    • 12V power supply input

    • 230V AC power supply

    • Online-Dokumentation

    • Quick-Installation Guide

The LTE router is set up according to the user manual. You will need a mobile data plan for an internet connection. Most mobile providers offer affordable data plans. Data plans with a fixed data allowance for a specified period are recommended. Choose a plan that matches your data usage. You can use this data allowance without restrictions in all EU countries, just as you would in your home country.

For this configuration example, it is assumed that the devices are assigned the following IP addresses by the router:

  • MyBoat - WiFi-SSID

  • MySecret - WiFi Password

  • 192.168.1.1 - LTE-Router

  • 192.168.1.100 - OBP40

  • 192.168.1.101 - M5Stack

  • 192.168.1.102 - Windsensor Yachta

  • 192.168.1.103 - Android tablet with AvNav

Hint

In your specific case, the IP addresses may differ. In that case, use the IP addresses assigned to the devices by the router.

Data transmission

The following diagram shows the data transfer and which devices are servers or clients during data transfer.

../_images/Data_Transmission.png

Fig.: Schematic of data transmission

M5Stack configuration

../_images/M5Stack_CAN.png

Abb.: M5Stack ATOM CAN mit ATOM Light

Before the M5Stack ATOM CAN can be used, it must be flashed with the NMEA2000 gateway firmware. The M5Stack is a combination of ATOM CAN and an ATOM controller unit. An ATOM Light or an ATOM-S3 Light can be used as the ATOM controller. Depending on the controller unit used, follow the instructions for flashing the NMEA2000 gateway firmware on the Projekt-Homepage of the NMEA2000 gateway.

The M5Stack ATOM CAN is assigned the system name M5Stack and connected to the LTE router’s Wi-Fi network. The TCP server is configured to transmit data to the OBP40 and the tablet. The TCP client connection is used for communication with the Yachta wind sensor. The M5Stack is connected to the boat’s NMEA2000 network via cable through the CAN unit. Sensor data stored in the M5Stack, such as wind sensor data, is also transmitted to the NMEA2000 bus.

Make the following adjustments:

Attitude

M5Stack

Config - System

System Name

M5Stack

Config - WiFi Client

WiFi Client

On

WiFi Client SSID

MyBoat

WiFi Client Password

MySecret

:Ref:`Config - Converter

NMEA2000 Out

On

Config - TCP Server

TCP Port

10110

NMEA0183 Out

On

NMEA0183 In

On

To NMEA2000

On

SeaSmart Out

On

Config - TCP Client

Enable

On

Remote Port

6666

Remote Address

192.168.1.102

NMEA0183 Out

Off

To NMEA2000

On

SeaSmart Out

Off

After configuration, you should see the following information in the status. The M5Stack is registered as a WiFi client with the LTE router and has been assigned the IP address 192.168.1.101. The M5Stack is connected to the Yachta wind sensor as a TCP client. Wind data is received as NMEA0183 telegrams via this connection. The number of devices connected to the M5Stack as TCP clients is displayed under “Clients.” If the OBP40 and the tablet are connected to the M5Stack, two devices should be displayed. The NMEA2000 status is displayed as “Online” when data is being exchanged via the NMEA2000 bus. The NMEA2000 data is transmitted to the OBP40 via the WiFi connection using SeaSmart. The number of exchanged NMEA2000 telegrams can be seen under “NMEA2000 In/Out.” When an OBP40 or a tablet is connected to the M5Stack via TCP, the number of exchanged NMEA0183 telegrams can be seen under TCP In/Out.

Status messages

M5Stack

Status

WiFi Client Connected

True

WiFi Client IP

192.168.1.101

#Clients

2

NMEA2000 State

[0] Online

NMEA2000 In

Number of telegrams

NMEA2000 Out

Number of telegrams

TCP In

Number of telegrams

TCP Out

Number of telegrams

The M5Stack connects to the NMEA2000 network via an M0 connector. The Tail485 can be plugged into the M5Stack. It contains a voltage converter that conditions the 12V supply voltage so that it can power the M5Stack. The voltage can be taken directly from the NMEA2000 bus. Additionally, it has an NMEA0183 interface for data exchange.

../_images/CAN_Connection_Tail.png

Fig. CAN bus connection with power supply from the bus (M5Stack with Tail485)

OBP40 configuration

../_images/OBP40_Side_View_Buttons_2_t.png

The OBP40 display unit is assigned the system name OBP40V1 and connected to the LTE router’s Wi-Fi network. The TCP client connection is used for communication with the M5Stack. The OBP40 receives all sensor data via the M5Stack. Data from the Yachta wind sensor is provided via the M5Stack.

The following settings need to be configured:

Attitude

OBP40

Config - System

System Name

OBP40V1

Config - WiFi Client

WiFi Client

On

WiFi Client SSID

MyBoat

WiFi Client Password

MySecret

Config - TCP Client

Enable

On

Remote Port

10110

Remote Address

192.168.1.101

NMEA0183 Out

On

To NMEA2000

Off

SeaSmart Out

On

After configuration, you should see the following information in the status. The OBP40 is registered as a Wi-Fi client with the LTE router and has been assigned the IP address 192.168.1.100. The OBP40 is connected to the M5Stack as a TCP client. NMEA0183 and NMEA2000 data can be exchanged via this connection. The NMEA2000 status is displayed as offline because there is no direct wired connection to the NMEA2000 network. The NMEA2000 data is transmitted via the Wi-Fi connection using SeaSmart.

Status messages

OBP40

Status

WiFi Client Connected

True

WiFi Client IP

192.168.1.100

#Clients

0

NMEA2000 State

[32] Offline

Yachta configuration

../_images/Yachta_Wind_Sensor.png

The Yachta wind sensor is configured to connect to the LTE router’s Wi-Fi network. The wind sensor provides wind data to the M5Stack via port 6666. Only data from the Yachta wind sensor is transmitted to the M5Stack.

The following settings are configured for the Yachta wind sensor:

Attitude

Yacht

Network Settings

WLAN Client SSID

MyBoat

WLAN Client IP

MySecret

Connection Timeout

30S

WLAN Sever SSID

Yacht

WLAN Server Password

Xxxxxxxxx

AP Channel

1

Server Mode

HTTP (JSON/NMEA)

MDNS Service

On

Device Settings

Wind Sensor Type

Yacht 2.0

Tip

The Yachta wind sensor can be put into demo mode. This allows its functionality to be tested outside the boat. The wind sensor then provides simulated wind data. The simulation mode can be activated via Server Mode using the setting Demo Mode.

After configuration, the following status messages should be visible under Device Info in the Yachta wind sensor:

Status messages

Yacht

Network Parameter

WLAN Client SSID

MyBoat

WLAN Client IP

192.168.1.102

Connection Quality

>50%

Tablet configuration

../_images/Tablet_AVnav_Charts.png

The Android tablet is added to the LTE router’s Wi-Fi network, and then the AvNav app is installed from the Play Store. Refer to the tablet’s manual for configuration details. Data from the tablet’s GPS receiver can also be used in the NMEA0183 and NMEA2000 networks.

Attitude

Android-Tablett

WiFi Settings

WiFi

On

WiFi Client SSID

MyBoat

WiFi Client Password

MySecret

App-Installation

AvNav

The following describes how to use bus data via a tablet in AvNav. Data transmission occurs via Wi-Fi. The tablet exchanges data with the M5Stack via a TCP connection. The tablet is connected to the M5Stack ATOM CAN as a TCP client. In AvNav, the connection is configured as a TCPReader.

../_images/Android_Start_Page.jpg

Image: AvNav homepage for Android

Under AvNav, click the icon with the 3 lines in the top right corner of the homepage.

../_images/AVnav_Server_Status_Icon.png

You will then be taken to the server status page. There, you can establish additional connections to the AvNavServer using the plus symbol.

../_images/AVnav_Add_Icon.png

For bidirectional communication via USB, select TCPReader.

../_images/Android_Select_Handler.jpg

Fig.: Connection types

Under IP Address, enter the IP address of the M5Stack and 10110 as the Port. To be able to not only send but also receive data, activate SendOut.

../_images/Android_Select_Handler_TCPReader.jpg

Fig.: TCPReader connection settings

After all data has been transferred, the new connection can be seen in the server status as a TCPReader connection.

../_images/Android_Server_Status_2.jpg

Abb.: Server-Status