• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps TCPIP Server connected failed

Tanaporn

Lurker
I have wrote the app for transmitted the data between IC-controller and laplet(Lenovo) and android studio.
But during app receiving the data from IC-controller by using the TCPIP, the server socket it has a problem and it cannot receive some file from the IC-controller (example IC already sent 14 files but app was receive only 5 files) It seem to lost some file while sending. How I can do??
 

Attachments

In general, how many minutes should it take to receive these 14 files? And how many minutes did it take to receive these 5 files?
 
In general, how many minutes should it take to receive these 14 files? And how many minutes did it take to receive these 5 files?

It just only example. sometime it have to use around 5-10 min to send message and also not receive any data while IC is already sent data to android.
Do you have any sample code for write to receive data by using TCPIP or please check my code where should I have to fixed?
 
In your application scenario, is the IC-Controller TCP/IP Server side? Does the Android app run on a tablet?
Why not to step-debug your app code?
 
In your application scenario, is the IC-Controller TCP/IP Server side? Does the Android app run on a tablet?
Why not to step-debug your app code?

Yes, I have run this app file on lenovo tablet and I have transmitted data between tablet and controller(raspi).

I already debug but it not stop. Then I want you to help me to check or guide me that Is it has any line wrong or does I loss any command??

thank you.
 
I have got this in console while sending data
W/System.err: java.net.BindException: bind failed: EADDRINUSE (Address already in use)
W/System.err: at libcore.io.IoBridge.bind(IoBridge.java:109)
W/System.err: at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:162)
'W/System.err: at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:427)
W/System.err: at java.net.ServerSocket.bind(ServerSocket.java:377)
W/System.err: at java.net.ServerSocket.<init>(ServerSocket.java:237)
W/System.err: at com.example.httpserver7.httprxtx.<init>(httprxtx.java:79)
W/System.err: at com.example.httpserver7.httprxtx.startServer(httprxtx.java:380)
W/System.err: at com.example.httpserver7.httprxtx.run(httprxtx.java:169)
W/System.err: Caused by: android.system.ErrnoException: bind failed: EADDRINUSE (Address already in use)
W/System.err: at libcore.io.Linux.bind(Native Method)
W/System.err: at libcore.io.ForwardingOs.bind(ForwardingOs.java:75)
W/System.err: at libcore.io.ForwardingOs.bind(ForwardingOs.java:75)
W/System.err: at libcore.io.IoBridge.bind(IoBridge.java:105)
W/System.err: ... 7 more'


Is it okay? if not how to fix "W/System.err: java.net.BindException: bind failed: EADDRINUSE (Address already in use)" ???
 
Back
Top Bottom