With WiFi indirect control of the experience of the intelligent car, it is natural to think of, but also through the GPRS remote control intelligent car, because from the principle of communication, the two actually do not have what is essentially different, are based on the socket TCP communication, its control links are as follows:
Mobile phone ===> GPRS (TCP/IP) ===> PC ===> Zigbee (serial 232/ttl) ===> intelligent car
Unlike WiFi communications, to make mobile phone connection GPRS, still need to carry out a certain program to complete, related content, I do not need to introduce here, I used to write Bowen "let smart phone and home computer interconnection (WM6 GPRS)" In detail, users can refer to.
The mobile phone's operating system is Windows Mobile 6.0, its socket communication control program and PDA procedures are similar, the relevant code is as follows:
private void Btntcpconnect_click (object sender, EventArgs e)
{
Cursor.current = Cursors.waitcursor;
if (Btntcpconnect.text = = "Connection")
{
if (GPRS). Tcpconnect (txtip.text, Int. Parse (Txtport.text))
{
Btntcpconnect.text = "Disconnected";
Pictcpflag.backcolor = Color.green;
}
}
Else
{
Btntcpconnect.text = "Connection";
Pictcpflag.backcolor = color.red;
Gprs. Tcpdisconnect ();
}
Cursor.current = Cursors.Default;
}
private void Btnforward_click (object sender, EventArgs e)
{
Gprs. Tcpsend ("0");
}
private void Btnleft_click (object sender, EventArgs e)
{
Gprs. Tcpsend ("1");
}
private void Btnright_click (object sender, EventArgs e)
{
Gprs. Tcpsend ("2");
}
private void Btnback_click (object sender, EventArgs e)
{
Gprs. Tcpsend ("3");
}
private void Btnstop_click (object sender, EventArgs e)
{
Gprs. Tcpsend ("4");
}
The results of the compilation run are as follows: