int __stdcall SME_SetNetworkSerialParams ( SME_HANDLE  handle,
int  baudrate,
int  parity 

Sets the Ethernet to serial translation speed (serial output baudrate).

[in]handleValid handle returned by SME_Initialize().
Return values
0Successful completion.
-1Invalid SME_Initialize handle.
-2No module selected. Call SME_SearchForModules() first.
-3Could not get the current module's serial parameters.
-4Invalid baudrate parameter.
-5Invalid parity parameter.
-6Could not set the new serial parameters.
The translation baudrate set here does not affect the rate at which any SeaI/O module sends or receives Modbus commands. It only affects the rate at which Ethernet data is translated from Modbus TCP to RTU, and back again. In order for a SeaI/O module to receive and respond to Modbus commands, the translation baudrate must match the SeaI/O's baudrate (see SM_SetCommunications()).
The Ethernet to serial bridge only supports baudrates 1200, 2400, 4800, 9600, 19200, 38400, and 115200 with parity values none, odd, or even. Any other values than these will result in an invalid parameter return value.
After a successful set of the serial parameters, this function will cause the Ethernet to serial bridge to reset for a short time while the new parameters are enabled. For bridges with statically assigned IP addresses, the reset time is only momentary. However, for DHCP assigned IP addresses, the bridge will not respond until it's IP address is re-leased from the DHCP server.
See also
Baudrate Values, Parity Values
Generated on Mon Nov 26 2018.