¿Buscas alguna otra cosa?

Tunnel – Access to the reading RS232 port of a vending machine via 3G and Bluetooth Low Energy (BLE)

Scenario details:

  • We need to access the vending machine RS232 port remotely from the company’s central offices. We will use a SIM card with a fixed IP address and the modem must be always online waiting for connections in the TCP 20010 port
  • We need to give access to several maintenance people to the same RS232 port on-location. They have an Android cellphone with Bluetooth Low Energy (BLE) and an app which grants them a Bluetooth BLE connection with the RS232 port of the machine via the MTX
  • We’ll be able to access the vending machine from the central offices anytime, and when there’s no connection, any worker will be able to Access via Bluetooth to make readings of the machine
  • The friendly name Bluetooth needs to be called: MTXTUNNEL-BLE

Solution: MTX-3G-Java-IoT-N-BLE modem + MTX-Tunnel software

Configuration example (config.txt file) for said scenario:

COMM_baudrate: 9600
COMM_bitsperchar: 8
COMM_autorts: off
COMM_autocts: off
COMM_stopbits: 1
COMM_parity: none

COMM2_baudrate: 115200
COMM2_bitsperchar: 8
COMM2_autorts: off
COMM2_autocts: off
COMM2_stopbits: 1
COMM2_parity: none

GPRS_apn: internetestatico.movistar.es
GPRS_timeout: 0

MTX_PIN: 0000
MTX_model: MTX-3G-Java-IOT-STD-N-BLE
MTX_mode: server
MTX_portAux: gateway
MTX_ping: 30
MTX_urc: on

TCP_port: 20010
BLUETOOTH_enabled: on

FIREWALL_enabled: off
TELNET_enabled: on
TELNET_login: user
TELNET_password: 1234
TELNET_port: 20023

Serial port baud rate
Number of bits
No flow control
No flow control
stop bit
No parity
Velocity of the Bluetooth serial port
Number of data bits
No Bluetooth flow control
No Bluetooth flow control
1 stop bit configured
No parity bit
APN GPRS provided by the GSM operator
GPRS Login
GPRS Password
Modem is always GPRS connected
If SIM card doesn’t have PIN, leave as 0000
Modem model
We do not want GPRS gateways
Serial-Serial gateway necessary for Bluetooth
Ping to ensure 3G/GPRS connectivity
IP to execute the ping
URC messages enabled
TCP port waiting for connections
Bluetooth activated
Configuration parameters

Firewall disabled
Telnet is activated
Login for Telnet
Password for Telnet
Telnet TCP port


  • COMM_ parameters refer to the vending machine RS232 serial port configuration. COMM2_ parameters refer to the MTX internal Bluetooth module RS232 port configuration and must be the values shown in the above example
  • The serial Bluetooth BLE can be established if there’s not an already established socket (that is, a serial 3G gateway accessing the machine)