I'm trying to connect my Glass with Arduino and a Wifi Shield.
At MenuActivity.java I call (and others methods... but this is the call) :
protected void onCreate(Bundle savedInstanceState)
{
new ConnexioArduino().execute();
super.onCreate(savedInstanceState);
}
And my ConnexioArduino.java :
private boolean socketReady;
private BufferedWriter outA;
private BufferedReader inA;
private Socket mySocket;
....
....
@Override
protected Void doInBackground(Void... params) {
socketReady = true;
String Host = "192.168.43.177";
int Port = 10001;
outA = null;
inA = null;
mySocket = null;
try {
mySocket = new Socket(Host, Port);
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
mySocket.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
So it only does a connexion between Glass-Arduino Wifi Shield through Socket. But when I execute my app it stops and it gives me the following error : (see image on this link, sorry for the URL I don't have the enough reputation)