We are since many years building a data collection instrument which communicates via RS232 to our proprietary PC software. Recently customers have asked for an Android app to complement the PC program in order to easily access the instrument via a cellphone. So we are developing such and we are using the DIGI Connect Wi-SP converter to get from RS232 to TCP/IP networking, which is what is easiest to handle in Android.
In the lab this works fine; we are using the raw data port on the device and connect a TCP socket to it to talk to the instrument. Then we can send commands and receive data from the instrument. Our protocol is purely binary so we need the port to just transfer the exact data into and out from the instrument, thus the use of the raw data port.
But our problem is in how to automate the serial line configuration from our app (and from our PC program on Windows). We need to set the baud rate, handshake, data and stop bits and parity somehow.
During development we are using both the serial command interface directly to the device and the built-in web server to configure this on the prototype devices, but this is no good for the live applications. They must be able to set the comm data via TCP/IP commands directly to the device.
But I have not found any such commands described in any of the docs I could get my hands on...
What I have seen is the command interface via the serial line (after booting the device with the dip switch set for command). But this is no good because the physical serial port is hooked to the instrument and not to the application...
So is there any way to use one of the other TCP ports in order to set the comm parameters? If so, which port and what are the commands to use???