Serial Proxy and Flash

I, i need your help on this.

I have flash and arduido with serial proxy, but,

I send a command to arduido like ( ID + chr(13)), and i have to receive ( ID TH-F7 )

But the flash only receive the data send by arduido, when i sent another command to arduido.

I connect the hiper-terminal using TCP/IP (Winsock) with the IP and port number and disconnect the flash, and all working fine…
with hiper-terminal i send and receive all commands with no problem.

The code in flash,
system.useCodepage = true;

hms = “”;
ip = “192.168.2.2”;
porta = 5001;
lig.htmlText += “”+hms+"–> Remote IP: “+ip;
lig.htmlText += “”+hms+”–> Porta: “+porta;
invia.htmlText = “”+hms+”–>Weelcome!!!
";

mySocket = new XMLSocket();
mySocket.connect(ip, porta);
mySocket.onConnect = function(success){
if (success)lig.htmlText += “”+hms+"–>Server connection established!";
else lig.htmlText += “”+hms+"–>Server connection failed!"; };

mySocket.onClose = function(){
lig.htmlText += “”+hms+"–>Server connection lost"
};

XMLSocket.prototype.onData = function(msg) {
recebe.htmlText += msg;
};

//— Handle button click --------------------------------------
function sendMsg(){

mySocket.send(inputMsg.text+ chr(13) );
invia.htmlText += hmsm+" "+inputMsg.text;

}

this.onData = function (data) {
trace ("incomingg " + data);
trace ("incoming " + data.text);
inputer.text = inputer.text + data;
};

envia.onRelease = function() {
sendMsg();
}

id.onRelease = function() {
mySocket.send(“ID” + chr(13));
invia.htmlText += “Identificação”;

}

I have all so tried with others serial proxys and the problem is the same.

The problem is in the flash, but were???

What i need is when i receive a chr(13) in the proxy, the proxy send me the data to flash.
I have all so read all docs and forums but dont find the error…

Tanks for the help!!!

Lagarto Oliveira from Portugal

??

Hi,

I think I just posted onto your blog. Are you going out over the net to connect back to your Arduino via flash?

If so what proxy are you using?

Adam

Not sure about the kind of serial proxy you are using, but often flash doesn’t recieve things unless you finish your line, so try using Serial.println instead of Serial.print

i am using serproxy.

I connect the hyper-terminal to serproxy and receive all the information, and can send!

all lines received have chr(13) and work fine in the hyper-terminal, but only in the flash i cant receive....

thanks

I'm not sure, but remember that Flash need "Null terminate byte" (0x00) after to complete message on received

yes! flash need that, but where is the error in the flash???

If i connect hiper terminal to serial proxy, works fine

If i connet the flash to serial proxy, dont work.

The question, or the big question, is

Where is the problem???

Thanks a lot for all informations

I'd recommend you try SerialServer (by Dan O'Sullivan) original http://itp.nyu.edu/~dbo3/SerialServer/SerialServer.html

I'd re-pack the file for Arduino addon (Win32 only) http://www.avride.com/pop/store/SerialServerSetup.exe

after install, run program and config COM and port you are using.. and check "debug" box on program and see all data passing in and out.. It's more easier than serproxy.. serproxy need to pre-config on file and select the right port number to Flash.. e.g. COM1 using 5331, COM2 using 5332 ... on SerialServer default port is 9001 and can changed on software