EasyManua.ls Logo

Sierra Wireless FX30S - Set the Serial Port Mode

Sierra Wireless FX30S
87 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Sierra Wireless FX30S User Guide
Rev. 7 August 2021 32 41110485
Set the Serial Port Mode
You can configure the serial port in either RS232 or RS-485 mode using Linux
commands.
Note: Before executing these commands, ensure that the UART is set correctly. If the UART is not
set correctly, you will not see serial data. To configure the UART for a particular service, see Enable/
Disable UART on page 75.
You can configure the serial port in either RS232 or RS-485 mode. To change the serial
port mode, use the following Linux command:
rs485.py/sys/devices/platform/msm_serial_hsl.0/rs_mode <NEW
MODE>
where <NEW MODE> is either:
· 0RS232 (default)
· 1—RS485
For example, to change the mode to RS-485: rs485.py/sys/devices/plat-
form/msm_serial_hsl.0/rs_mode 1
Note: The rs_mode setting is not persistent, and will return to the default setting (RS232) when the
gateway is reset.
Note: In release FX30S 3G R14.0.2.001 and newer, the rs485.py script is available by default in the
root file system in /usr/bin.
For your reference, the contents of the rs485.py script appear below.
#!/usr/bin/env python
import sys
fn = sys.argv[1]
if len(sys.argv) > 2:
value = sys.argv[2]
else:
value = None
ttyFile=open('/dev/ttyHSL0')
if value is None:
sysfsFile = open(fn, 'r')
print sysfsFile.read().strip()
else:
sysfsFile = open(fn, 'w')
sysfsFile.write(value)

Table of Contents

Related product manuals