Hello,
I am trying to send commands to an RS232 device from iTach, a WiFi Model: ip2sl. I have connected with their test application, iTest, that allows for sending text to the ip2sl with commands like; *Z6ON, *Z6OFF and *Z6STATUS?. These commands will turn on/off an audio device that is connected to the ip2sl/RS232 interface.
I have downloaded and modified the b4x-network-asyncstreams-b4xserializator example. I have setup the astream.Initialize for non prefix and can see commands coming from the audio system, when commands are sent for the keypads connected to the audio system. So I have a connection on my iphone to the RS232 connected to the audio system.
My issue is with sending the commands to the ip2sl. I am not sure that I have this correctly coded for sending "text" or a string to the ip2sl.
I thought that the code below would do this:
Dim conv As ByteConverter
Dim data() As Byte = conv.StringToBytes(edtName.Text, "UTF8")
edtName.Text contains the text; *Z6STATUS?\r
I never see any responses from the ip2sl/RS232 device in my B4i app, so something is not being sent correctly. I have also tried different text and code for also including a carriage return after the commend, which is required.
Is this the correct code to send a string/text to the ip2sl/RS232 interface?
Your help with this is greatly appreciated.
Thanks, Mark