Set The Serial Port Mode - Sierra Wireless Octave FX30S User Manual

Hide thumbs Also See for Octave FX30S:
Table of Contents

Advertisement

Sierra Wireless FX30S User Guide

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
Disable UART
You can configure the serial port in either RS232 or RS-485 mode. To change the serial
port mode, use the following Linux command:
Note: The rs_mode setting is not persistent, and will return to the default setting (RS232) when the
gateway is reset.
Note: In release 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.
Rev. 5 September 2020
on page 73.
rs485.py/sys/devices/platform/msm_serial_hsl.0/rs_mode <NEW
MODE>
where <NEW MODE> is either:
· 0—RS232 (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
#!/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)
32
Enable/
41110485

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx30Fx30sWp8548Wp7702

Table of Contents