I'm running the client server example programs from Derek Molloy's fine
book (chapter 10). I've put the server on the beaglebone and the client on
a separate Linux PC.
Server code:
int main(int argc, char *argv[]){
cout << "Starting EBB Server Example" << endl;
SocketServer server(54321);
cout << "Listening for a connection..." << endl;
server.listen();
string rec = server.receive(1024);
cout << "Received from the client [" << rec << "]" << endl;
string message("The Server says thanks!");
cout << "Sending back [" << message << "]" << endl;
server.send(message);
cout << "End of EBB Server Example" << endl;
}
Client Code:
int main(int argc, char *argv[]){
if(argc!=2){
cout << "Incorrect usage: " << endl;
cout << " client server_name" << endl;
return 2;
}
cout << "Starting EBB Client Example" << endl;
SocketClient sc(argv[1], 54321);
sc.connectToServer();
string message("Hello from the Client");
cout << "Sending [" << message << "]" << endl;
sc.send(message);
string rec = sc.receive(1024);
cout << "Received [" << rec << "]" << endl;
cout << "End of EBB Client Example" << endl;
}
The examples work great when I plug the BBB directly using the Ethernet
port. The client talks to the Ethernet port at 192.168.1.36.
I've also setup wireless to work on the BBB using an Edimax dongle. It
shows up at 192.168.1.38. If I run the client pointing to the wireless
address it doesn't work.
If I plug the Ethernet cable back into the BBB with the wireless dongle
also attached... the wireless address 192.168.1.38 now starts working with
the client. The wireless otherwise seems fine. I can ping & wget using just
the dongle attached (no Ethernet plugged in).
Any suggestions? Not sure how I would even debug this?
Thanks,
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.