Hi!
I have a device that is controlled by UART. I want to use RN-171 for wireless control of this device. I want to connect to RN-171 by telnet and send UART command for the device and receive a reply from it. Is that possible? I tried to find an example, but found only a few commands (no examples in the manual). Help me please.
One of the intended purposes of the WiFly is to control a device via the serial connection. To see how the WiFly will behave, use a 3.3 V TTL-serial adapter, either USB or RS232, to connect RX, TX and ground to a computer. The device can be simulated by using a terminal program on that computer. Once a telnet connection is made on a remote computer, everything you type into the terminal program will be sent to the remote computer and vice versa. The “remote” computer and the computer running the serial connection can be the same.
According to manual, tx/rx connection is not enough. It needs some commands in WiFly telnet console to be set. Like “set comm open ”.
In general, I need:
1)Connect to WiFly by telnet(over wireless) from Ruby(PHP)
2)Set commands, that opens local UART connection with my device.(rx/tx always connected to my device )
3)Set “a” character to UART
4)Get answer and save it in Ruby data base.
I am dont know how to realise paragraph 2.
It is less complicated than you think. Do the experiment and set up a computer with both serial and telnet connections to the wifly, as I suggested. Of course you have to use the set uart command to get the correct baud rate, etc.
Hmm … Could I work with other functions of WiFly(like sensors, etc) if tx/rx is connected?
Thank you. Today I will try.