Using Merapi to transfer data continuously

41 views
Skip to first unread message

gberdugo

unread,
Oct 22, 2010, 3:29:41 PM10/22/10
to Merapi
Hello everybody,

I'm new to Merapi and I'm facing a problem that I can't solve...

My scenario is:

I have a Java application that reads data from serial port and then
transfers it to an Air application via Merapi.
My messages frames to AIR are about 50~60 bytes length and I transfer
them at 20ms (I can raise this interval if necessary).

In the beginning everything runs fine but after some data transfer,
the bridge simply stops working...
I get no error neither from Java nor from AIR, the communication just
stops.

After some debugging, I noticed that when the Java application sends a
message to AIR, the Merapi API stores it in some kind of buffer and
then sends to AIR, but after this message is read it remains stored in
this buffer.
So when the next message from Java arrives, I have two calls for my
handle function in AIR, one with the previous content of the buffer
and other with the new message.

To exemplify:
If I send a message containing "1234", the AIR app receives this
message and process it.
Then I send a second message containing "5678", the AIR app receives a
message containing "1234" and then receives another message containing
"5678" and so on...

Is this a normal behaviour?

Because I think my problem is some kind of overflow in this buffer.

Best Regards,

Gustavo Berdugo.

Lyndon Durham

unread,
Oct 22, 2010, 3:53:45 PM10/22/10
to merapi-...@googlegroups.com
Download the latest source  for the Merapi java and flex components from the repository. Build the libraries i.e. jar, swc etc and deploy these in your app. Remove the old ones. This should solve your problem.


--
You received this message because you are subscribed to the Google Groups "Merapi" group.
To post to this group, send email to merapi-...@googlegroups.com.
To unsubscribe from this group, send email to merapi-projec...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/merapi-project?hl=en.


naveen SR

unread,
Oct 23, 2010, 1:23:34 AM10/23/10
to merapi-...@googlegroups.com
Hey,

I had faced similar issue in our product development. The solution to this - you need to remove the event listener on the flex side after listening to the merapi event. Its actually not a buffer problem , its the garbage messages still floating around.

Do let me know if you need any further clarity on the issue.

Thanks,
Naveen

gberdugo

unread,
Oct 24, 2010, 9:47:40 AM10/24/10
to Merapi
Ok, thanks everybody for the answers

I have compiled the java source and now I'm trying to compile the flex
source, but I'm having problems
I have never used the compc application

Can someone help me doing it?
Is there a way to compile it inside flash builder ide?

Thanks again
> > merapi-projec...@googlegroups.com<merapi-project%2Bunsubscribe@go oglegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages