iqbaltld Posted June 19, 2014 Report Share Posted June 19, 2014 I have created a client application in my android phone, which sends strings to port 2222. And is working properly with a server application in my pc, which is created with java. Now i want to know that how can i display the string i send from my android to port 2222 in labview..? please give me a simple socket read example. the one given in labview examples is much complicated. so here i need only to read and display the string i send.. please help me... Quote Link to comment
Rolf Kalbermatter Posted June 19, 2014 Report Share Posted June 19, 2014 I have created a client application in my android phone, which sends strings to port 2222. And is working properly with a server application in my pc, which is created with java. Now i want to know that how can i display the string i send from my android to port 2222 in labview..? please give me a simple socket read example. the one given in labview examples is much complicated. so here i need only to read and display the string i send.. please help me... Are you using TCP, UDP or some other transport protocol? If you use TCP or UDP you will look into the respective function palette in the Data Communication->Protocols palette. Quote Link to comment
iqbaltld Posted June 20, 2014 Author Report Share Posted June 20, 2014 I think there is nothing to explain more.. dear rolfk, here what i needed is to use labview for reading the string i send from my android phone, to the port (4433) in my pc. And it is properly getting with a java application. here java app act as a simple socket server and my android phone act as a simple socket client. Now i want to use labview instead of java app. Quote Link to comment
Rolf Kalbermatter Posted June 20, 2014 Report Share Posted June 20, 2014 I think there is nothing to explain more.. dear rolfk, here what i needed is to use labview for reading the string i send from my android phone, to the port (4433) in my pc. And it is properly getting with a java application. here java app act as a simple socket server and my android phone act as a simple socket client. Now i want to use labview instead of java app. Well, theoretically you could use TCP/IP, UDP or even some other low level protocol, so yes you should be more specific! "I want to go to New York" is usually not enough for someone to help you come there. It's quite helpful for that person to know if that should be by train, airplane, ship or maybe rocket and if you start in Paris/France or in Washington DC. If it is TCP/IP or UDP you can do it in LabVIEW but the principle does differ somewhat since one is a connection based protocol while the other is not. Assuming you use TCP/IP you would simply look in the Example finder for the "TCP Communictor - Passive" example, open it, configure the port to what you have and start it then run your Android app. Obviously you would have to tell your app which IP address your PC has. If it is UDP you rather want to look at "UDP Receiver" in the examples. And if it is something else than TCP or UDP you won't be able to do it in LabVIEW native but will have to interface to the OS socket library through Call Library Nodes to do it. Quote Link to comment
iqbaltld Posted June 20, 2014 Author Report Share Posted June 20, 2014 Hi rolfk, i am really sorry so that i forgot to point out whether i am using TCP or UDP. of course here i am using TCP/IP only.. and now i am trying the example you said. thank you very much Well.. i have tried the example you said. but it work only when TCP Communictor - Active is also excecuted. it do not accept data from my android phone, even i changed the port number. is there any modification needed? Quote Link to comment
Rolf Kalbermatter Posted June 20, 2014 Report Share Posted June 20, 2014 It shouldn't. But then without seeing what your working Java application does, or how your Android app does setup the communication, it is mostly poking in the mist as what might be required to make this work with LabVIEW. Quote Link to comment
iqbaltld Posted June 20, 2014 Author Report Share Posted June 20, 2014 Hi rolfk. , i got my application working with android. thank you very much for your correct guidance. it was my mistake to check well the example, really sorry and thanking you once again Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.