Knowledge Base
NGX Operating Mode
The process for Software to follow should be same as for NGT. Note you should not rely on the USB “friendly name” to identify the COM port of the NGX (or NGT)
The Algorithm for discovering an NGT still holds. We have however modified it slightly to include reference to NGX:
- Open the ‘suspected’ Gateway COM port (or the next COM port to try when scanning all available COM ports) at the default baud rate 115200.
- Send the GetOperatingMode BST-BEM command.
- If there is no response within 500ms, reopen the COM port at 230400 baud and send the GetOperatingMode BST-BEM command again.
You could possibly lower that timeout below 500 milliseconds if necessary, but I wouldn’t go below 300 milliseconds. - If a response is received, communication is achieved: COM port and baud rate are now a match.
The response message will also detail what the ARL Model ID is:
#define ARLMODEL_NGT1 14 /**< ARL NMEA 2000 PC Interface 1 */
#define ARLMODEL_NGTNBL1 27 /**< Nobeltec/ARL OEM variant of NGT-1 */
#define ARLMODEL_NGX1 59 /**< ARL NMEA 2000 X-over Gateway 1 */
#define ARLMODEL_WGX1 61 /**< ARL NMEA 2000 X-over Wi-Fi Gateway 1 */ - If no response is received at both 115200 and 230400 baud, open the next possible COM port at 115200 and repeat from step 2.
- If all COM ports have been exhausted, either stop and indicate no port found or start over.Once communications with the Gateway have been achieved the mode should be changed by the software if required using the SetOperatingMode BST-BEM command. If the Gateway is not already in “Transfer Receive All” mode, to set it in “Transfer Receive All” mode so all PGNs can be received/transferred to the application. Naturally, having already asked for the Gateway’s operating mode helps with this step.
Once communications with the Gateway have been achieved the mode should be changed by the software if required using the SetOperatingMode BST-BEM command. If the Gateway is not already in “Transfer Receive All” mode, to set it in “Transfer Receive All” mode so all PGNs can be received/transferred to the application. Naturally, having already asked for the Gateway’s operating mode helps with this step.