How to configure the MQTT WAN/WIFI/4G/GPS/GNSS ACE-GTW-4G
In this tutorial we will show you how to configure the ACE-GTW-4G Gateway
ACE-GTW-4G : LAN + WAN + WiFi + 4G + GPS/GNSS + MQTT + Modbus over USB to ACE PLC
Connect to the ACE-GTW-MQTT configuration web interface
Via its LAN RJ45 port connected to your network
![]() Connect the ACE-GTW-MQTT on your network (LAN port). Your PC must be on the same network as the Gateway: 192.168.8.XXX. If it’s not the case, change the IP address of your PC. Don’t use an IP address already taken by a device of your network! With your bowser, go to the ACE-GTW-MQTT web interface by enter its IP address: 192.168.8.1 Enter the username = root, and the password = root < ! > Please configure a new root password to protect the web interface. Once your are connected to the ACE-GTW-MQTT, you can change its IP address if you wish. Network > Interfaces And “Edit” the LAN interface Enter a new IP address that is not already being used by another device on your network. |
![]() You PC must be on the same logic network: 192.168.8.xxx If you want to change the default IP address of the Gateway |
Don’t forget to confirm your configuration by clicking on “UNSAVED CHANGES” |
Via its WAN RJ45 port connected to your network
![]() It is assumed that you have a DHCP server on your network that assigns IP addresses to the new connected devices. Connect the ACE-GTW-MQTT on your network (WAN port). Search what is its IP address assigned by the DHCP server. If you don’t know, you can use the free and open-source software Angry IP Scanner for see all devices connected to your network. Go to the ACE-GTW-MQTT web interface by enter its new IP address. 192.168.xxx.xxx in our example. Enter the Username = root and the Password = root < ! > Please configure a new root password to protect the web interface |
![]() Angry IP Scanner for see all IP address used on your network
|
Connect the ACE-GTW-MQTT to Internet
Via its WAN RJ45 port connected to your network
![]() Connect the Gateway on your network (WAN port). If the WAN port is already connected to your network and an IP address has been assigned by a DHCP server . In this case, your ACE-GTW-MQTT must already be able to connect to the Internet. Go to Network > Diagnostics and ping the “openwrt.org” server on the Internet. Success! If you have 5 packets received. |
![]() Well done! You are connected! |
Via its WiFi connected to your network
Watch the video on your right or follow these instructions:
In the network configuration web pages of the ACE-GTW-MQTT:
Check you new IP address on WWAN:
For check your connection to Internet:
Success! If you have 5 packets received. |
Short video: Connect your Gateway to Internet via WiFi |
Via LTE/4G and its SIM card (ACE-GTW-4G version)
This connection is only for the ACE-GTW-4G version, with a SIM card slot and antenna.
It is assumed that you have a SIM card with an Internet access available. Before insert the SIM card inside the Gateway, it is best to disable the SIM card PIN code with a smartphone. In the network configuration web pages of the ACE-GTW-MQTT:
Check you new IP address on 4G:
For check your connection to Internet:
Success! If you have 5 packets received.
< ! > Please configure a new root password to protect the web interface |
IP address from the cellular network Generally no username/password are required Most of the cases, GPRS is enough for MQTT Data |
List of Popular MQTT Brokers for Testing : How to Connect to them
See List of Popular MQTT Brokers for Testing and How to Connect to them
Connect the ACE-GTW-MQTT to the ACE PLC
Just connect the USB cable between the Gateway and the ACE PLC.
* except the ACE-7096.
MQTT Topics and Modbus tags configuration
- MQTT Topic to Pub/Sub:
- are a form of addressing that allows MQTT clients to share information. MQTT Topics are structured in a hierarchy similar to folders and files in a file system using the forward slash ( / ) as a delimiter. Topic names are: Case sensitive, use UTF-8 strings, must consist of at least one character to be valid.
- Payload Bit/Ana:
- The Payload is value (Bit or Word). The content and format is application specific.
- Payload Bit format:
- @[Value_for_state_0;Value_for_state_1]
- @[0;1]
- @[ON;OFF]
- The machine is @[stopped;running] now !
- Payload Ana format:
- @
- Water level= @ m
- Machine speed: @ m/s
- @ products in progress
- Pub?/?Sub:
- Publish for send the MQTT topic and its Payload (value) to the MQTT Broker
- You can publish the values from the ACE PLC Modbus register or from system payload (GPS,..)
- I publish a topic/value for give an information to the others MQTT Clients (Smartphone, tablet, scada,…)
- Subscribe for receive the MQTT topic and its Payload (value) from the MQTT Broker
- You can subscribe any values (bit or word) to write in PLC, from the Broker or from system payload (GPS, Broker,..)
- I subscribe a topic/value for get and manage an information
- Publish for send the MQTT topic and its Payload (value) to the MQTT Broker
Examples of MQTT configuration
MQTT Topic to Pub/Sub | Payload Bit | Payload Ana | Pub?/?Sub |
Machine785/Back/Speed | @[0;1] Not use | Back speed:@ m/s | PUB? |
Machine785/Back/NumberColours | @[0;1] Not use |
@ colours in progress | PUB? |
Machine785/Front/Speed | @[0;1] Not use |
Front speed:@ m/s | PUB? |
Factory/Paris/Production | @[0;1] Not use | Paris:@ | PUB? |
Machine785/Power | @[ON;OFF] | @ Not use | ?SUB |
Machine785/State | The machine is @[stopped;running] | @ Not use | PUB? |
List of the special Payload Bit/Ana (GPS/GNSS/4G version only)
Familly | Description | Payload bit/ana | Type of register |
GPS | GPS signal is available or not | $GPSVAL$ | BIT |
GPS | Date and time from the GPS | $GPSYEA$, $GPSMON$, $GPSDAY$, $GPSHOU$, $GPSMIN$, $GPSSEC$ | UI8 |
GPS | Lattitude | $GPSLAT$ | FLOAT |
GPS | Longitude | $GPSLON$ | FLOAT |
GPS | Speed Kmh/h | $GPSSPE$ | FLOAT |
GPS | Course | $GPSCOU$ | FLOAT |
GPS | MagneticVar | $GPSVAR$ | FLOAT |
Examples of MQTT configuration
MQTT Topic to Pub/Sub | Payload Bit | Payload Ana | Pub?/?Sub |
Site9246/GPS/Lattitude | @[0;1] Not use | Latitude=$GPSLAT$ | PUB? |
Site9246/GPS/Longitude | @[0;1] Not use |
Longitude=$GPSLON$ | PUB? |
Truck/AE-541-ZK/Speed | @[0;1] Not use |
Speed: $GPSSPE$ Km/h | PUB? |
Truck/AE-541-ZK/Speed | @[0;1] Not use | $GPSSPE$ * |
?SUB |
Site9246/GPS/Signal | $GPSVAL$[Bad;Good] | @ Not use | PUB? |
Site9246/GPS/Signal | $GPSVAL$ [0;1]* |
@ Not use | ?SUB |
* As these Payloads (GPS) are local to the Gateway, they are simply written in the ACE PLC Modbus register. They are not subscribed. The Broker receives and sends nothing.
Virtuino: Create visual interfaces with widgets like LEDs, buttons, switches, value displays, instruments, regulators etc.
How to reset the ACE-GTW-MQTT to the factory default settings?
See here
.