¿Buscas alguna otra cosa?

Tunnel – Accessing the RS232 port of a vending machine via 3G and Bluetooth

Scenario details:

  • We want to be able to access a vending machine’s RS232 port remotely from the company’s central offices. A SIM card with fixed IP will be used, and hte modem must be online at all times, waiting for connections in the TCP20010 port
  • It is necessary for several users to have local access to the same RS232 port. These users will dispose of an Android telephone with Bluetooth and an app that allows them to establish an SPP Bluetooth connection with the RS232 port of the device using MTX
  • Access to the machine will be available at all times from the central offices and when there is no connection, any user will be able to access it via Bluetooth in order to take readings
  • For security reasons, the Bluetooth module needs to have a PIN (123499) and a user-friendly Bluetooth name, for example “MTXTUNNEL”

Solution: MTX-3G-Java-BAT (with Bluetooth) modem + MTX-Tunnel software

EXAMPLE of settings (file config.txt) for such scenario:

ConfigurationObservations
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: on
COMM2_autocts: on
COMM2_stopbits: 1
COMM2_parity: none

GPRS_apn: internetestatico.movistar.es
GPRS_login: MOVISTAR
GPRS_password: MOVISTAR
GPRS_timeout: 0

MTX_PIN: 0000
MTX_model: MTX-3G-Java-BAT
MTX_mode: server
MTX_portAux: gateway
MTX_ping: 30
MTX_pingIP: 8.8.8.8
MTX_urc: off

TCP_port: 20010
BLUETOOTH_enabled: on
BLUETOOTH_name: MTXTunnel
BLUETOOTH_pin: 123499
BLUETOOTH_mode: server

FIREWALL_enabled: off
TELNET_enabled: on
TELNET_login: user
TELNET_password: 1234
Serial port baud rate
Number of bits
No flow control
No flow control
1 stop bit
No parity
Velocity of the Bluetooth serial port
Number of data bits
Flow control for Bluetooth
Flow control for Bluetooth
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
We do not need URC information messages
TCP port waiting for connections
Bluetooth activated
Bluetooth friendly name
PIN for the Bluetooth module (for security)
Operative mode of the Bluetooth module
Firewall disabled
Telnet is activated
Login for Telnet
Password for Telnet

Details:

  • The COMM_ parameters refer to the vending machine’s RS232 serial port configuration. The COMM2_ parameters refer to the MTX’s internal Bluetooth module’s RS232 configuration and must have the same values as in the example
  • The Bluetooth gateway can be established whenever there is no socket established; i.e. a GPRS-Serial gateway connecting to the device