Guest sp Posted September 13, 2005 Report Posted September 13, 2005 Hi there, I would like to write a program for data socket with GPRS connection. My smartphone, Dopod 585, is as the client and PC is the server. To deliver string from smartphone and show it on PC is my current task. However, I can do that via USB connection but failed in GPRS. It seems to mean that both programs in client and server are correct but something wrong in GPRS connection. Maybe I need to write a program in C# to start GPRS connection. However I could not get any information about GPRS connection in the MSDN for C#. Would you please do me a favor to give a example program or tell me what function or structure could accomplish GPRS connection? Thanks for your kindly assistance. Sincerely yours, Kuan-chu [email protected]
Guest mike_nz Posted October 18, 2005 Report Posted October 18, 2005 Try this code to force the gprs to connect Public Function IsConnectionAvailable() As Boolean ' Returns True if connection is available ' Replace www.google.com with a site that is guaranteed to be online Dim objUrl As New System.Uri("http://www.google.com/") ' Setup WebRequest Dim objWebReq As System.Net.WebRequest objWebReq = System.Net.WebRequest.Create(objUrl) Dim objResp As System.Net.WebResponse Try ' Attempt to get response and return True objResp = objWebReq.GetResponse objResp.Close() objWebReq = Nothing Return True Catch ex As Exception ' Error, exit and return False objWebReq = Nothing Return False End Try End Function if this works for you can you post your tcp socket code as I'm having prolems with mine
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now