Pages: [1]   Go Down
Author Topic: Serial Proxy and Flash  (Read 277 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 = "";
porta = 5001;
lig.htmlText += "<b>"+hms+"--> Remote IP: </b>"+ip;
lig.htmlText += "<b>"+hms+"--> Porta</b>: "+porta;
invia.htmlText = "<b>"+hms+"-->Weelcome!!!</b><br>";

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

mySocket.onClose = function(){
      lig.htmlText += "<b>"+hms+"-->Server connection lost</b>"

      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() {

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
« Last Edit: August 12, 2008, 08:16:00 pm by lagarto » Logged

Pages: [1]   Go Up
Jump to: