Print

ACE-MQTT-4G Gateway: System Functions

 

In the Gateway > MQTT Configuration menu, you can define certain MQTT topics for the system functions.

To date, there are 3 predefined functions

  • MQTT_Config_Update : To remotely update the MQTT configuration and SSL/TLS certificate of the ACE-GTW-4G
  • ACE_PLC_Update : To remotly update the ACE program generated by the vBuilder software
  • Firmware_Update : To remotely update the firmware of the ACE-GTW-4G itself

MQTT_Config_Update

Remote update of the MQTT configuration (mqtt file) and Certificate (ca.crt file)

  • MQTT_Topic_to_?Sub_for_Parameter:
    • The one you want. Example: update/4ggateway/mqtt-update
  • Predefined_Name_of_the_Function:
    • MQTT_Config_Update
  • MQTT Payload to send from another MQTT Client for start udpate:
    • HTTP link to the file directory (not to the file name)
      • Example: https://www.support.aceautomation.eu/gtw-mqtt-4g/mqtt-files
    • Space ( )
    • Password with single quotes (‘)
      • Example: '6UnJS%#n!3u632^cEs2mgvq'
    • Full example:
      • https://www.support.aceautomation.eu/gtw-mqtt-4g/mqtt-files '6UnJS%#n!3u632^cEs2mgvq'
  • MQTT file
    • The mqtt file must be in the remote HTTP directory
    • The format must be the same as in Gateway > MQTT Config File menu
    • The mqtt file must be zipped with a password. You can use 7-Zip software (Archive format: zip and enter a password)
    • The result must be mqtt.zip file with inside mqtt file
    • Its name must be always “mqtt
  • Certificate file
    • The ca.crt file must be in the remote HTTP directory
    • The ca.crt must include inside, the text “—–BEGIN CERTIFICATE—–” with the key and “—–END CERTIFICATE—–“
    • The ca.crt file must be zipped with the same password than the mqtt file. You can use 7-Zip software (Archive format: zip and enter a password)
    • The result must be ca.crt.zip file with inside ca.crt file
    • Its name must be always “ca.crt

ACE_PLC_Update

Remote update of the ACE PLC program (aceprogram.vCompiled file)

  • MQTT_Topic_to_?Sub_for_Parameter:
    • The one you want. Example: update/4ggateway/ace-update
  • Predefined_Name_of_the_Function:
    • ACE_PLC_Update
  • MQTT Payload to send from another MQTT Client for start udpate:
    • HTTP link to the file directory (not to the file name)
      • Example: https://www.support.aceautomation.eu/gtw-mqtt-4g/ace-files
    • Space ( )
    • Password with single quotes (‘)
      • Example: '6UnJS%#n!3u632^cEs2mgvq'
    • Full example:
      • https://www.support.aceautomation.eu/gtw-mqtt-4g/ace-files '6UnJS%#n!3u632^cEs2mgvq'
  • ACE program file
    • The ACE program file must be in the remote HTTP directory
    • The format must be:
      • .vCompiled. See in vBuilder, Tools > Program To File menu
      • Its name must be always aceprogram.vCompiled
    • The “aceprogram.vCompiled” file must be zipped with a password. You can use 7-Zip software (Archive format: zip and enter a password)
    • The result must be always aceprogram.zip file with inside aceprogram.vCompiled file

Firmware_Update

Remote update of the ACE-GTW-4G firmware (firmware.bin and sha256sums files)

  • MQTT_Topic_to_?Sub_for_Parameter:
    • The one you want. Example: update/4ggateway/firmware-update
  • Predefined_Name_of_the_Function:
    • Firmware_Update
  • MQTT Payload to send from another MQTT Client for start udpate:
    • HTTP link to the file directory (not to the file name)
      • Example: https://www.support.aceautomation.eu/gtw-mqtt-4g/firmware-files
  • Firmware file
    • The firmware and sha256sums files must be in the remote HTTP directory
    • Their names must be always firmware.bin and sha256sums
    • firmware.bin must be compatible with the ACE-GTW-4G Gateway (test it before remote update !)
    • sha256sums must contain this text:
      • serial-sha-256-key */tmp/firmware.bin
      • Example: d61eeb18eedbfe8ebe56991f3424a9c52c33b0bc0dd0f8e1e05556c3fc541ee1 */tmp/firmware.bin
      • With a carriage return (CR) at the end of the line ([Enter])
      • This file is provide by use with the firmware – Check inside before test it.
    • The result must be firmware.bin and sha256sums files inside the remote HTTP directory

 

Help in solving problems encountered

  • If you have space(s) in your http link, add quote and/or replace space by %20
    • 'https://www.support.aceautomation.eu/gtw-mqtt-4g/ace%20files' '6UnJS%#n!3u632^cEs2mgvq'
    • The quote should be like the example above, not like ‘ or ” (cut/paste often changes the type of quote)
  • Be carreful to add the full link with http://www… or https://www…
  • The names of the files are imposed
    • For the .zip file
    • and the files inside the zip file
  • Check the synthaxe of your Topic name when you send the Payload from your MQTT Client
    • Common tag prefix and suffix are not add for this system functions
  • Files must be installed on a HTTP or HTTPS server
  • Always use a password for the zip files