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.
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.
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
- 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.
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
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.
Fig.: Schematic of data transmission
M5Stack configuration
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 |
|---|---|
System Name |
M5Stack |
WiFi Client |
On |
WiFi Client SSID |
MyBoat |
WiFi Client Password |
MySecret |
:Ref:`Config - Converter |
|
NMEA2000 Out |
On |
TCP Port |
10110 |
NMEA0183 Out |
On |
NMEA0183 In |
On |
To NMEA2000 |
On |
SeaSmart Out |
On |
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 |
|---|---|
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.
Fig. CAN bus connection with power supply from the bus (M5Stack with Tail485)
OBP40 configuration
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 |
|---|---|
System Name |
OBP40V1 |
WiFi Client |
On |
WiFi Client SSID |
MyBoat |
WiFi Client Password |
MySecret |
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 |
|---|---|
WiFi Client Connected |
True |
WiFi Client IP |
192.168.1.100 |
#Clients |
0 |
NMEA2000 State |
[32] Offline |
Yachta configuration
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
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.
Image: AvNav homepage for Android
Under AvNav, click the icon with the 3 lines in the top right corner of the homepage.
You will then be taken to the server status page. There, you can establish additional connections to the AvNavServer using the plus symbol.
For bidirectional communication via USB, select TCPReader.
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.
Fig.: TCPReader connection settings
After all data has been transferred, the new connection can be seen in the server status as a TCPReader connection.
Abb.: Server-Status