Testing HelloDevice IDE applet or application for HD13xx without real device : Mimicking real devices - 2
If you don't have a device that will receive commands or give some data to HD13xx like the climate controller in tutorial HD13xx, here is a way of simulating the real situation using a direct-echo RS232 adaptor.
Above picture is a direct-echo RS232 adaptor. This is just a female terminal pin connector of common RS232 serial cable. One thing outstanding is that the pin 2 and pin 3 are connected to each other and pin 7 and pin 8 are also connected to each other.
Plug the adaptor into the male RS232 connector of HelloDevice 13xx. Then, all data packets transmitted to the HelloDevice 13xx via TCP from the other side will be echoed back immediately to the other side application (or applet).
In many HD13xx examples provided in HelloDevice IDE software, this tip will be very helpful.
Also, a network protocol analyzer will be very helpful to check the incoming or outgoing network packets between HelloDevice(or other Ethernet-serial device) and applet(or application)
How to make a direct-echo RS232 adaptor
Prepare a RS232 serial cable and cut off cable leaving only the female
connector. Connect pin2-pin3 and pin7-pin8 by soldering or wiring like above
picture. If you already have a female RS232 pin connector, just connect
pin2-pin3 and pin7-pin8 like above picture.