djmayes
05-20-2003, 04:34 PM
Help please on a simple problem that is baffling me as a amateur programmer.
I have written, using Visual Basic 6, a program that displays ones geographical position on a map from data fed through the serial COMM port from a hand held GPS navigator.
This works fine on my desktop (W98 & XP) and laptop (W95). I am now in the process of putting it on to my IPAQ 3850 (PC2002) with code amended for embedded Visual Basic 3.
All has gone well with testing the various modules - all work except one, a vital one - the inputting of data from the GPS.
The inputting of data from GPS is (or should be) very simple. A RS232 serial with the GPS sending a continuous stream of data - no handshaking etc. Just two wires, data out (from GPS) and ground.
A simple test routine in Visual Basic is as follows:-
Private Sub Form_Load
MSComm.CommPort = 1 'change for different Comm port number
MSComm.Settings = "4800,n,8,1" 'to match GPS
MSComm.PortOpen = True
Timer1.Interval 4000 'for sampling every 4sec
End Sub
Private Sub Timer1Timer
strInput = MSComm1.Input
txtInput = strInput 'display GPS data in srtInput buffer in TextBox every 4 secs
End Sub
This works fine on my desktop on Com Ports 1 & 2 and, as expected, nothing on 3 except when on the web with internal Modem working when I get an error message.
If I adapt above program into eVB ie use eVB Comm control instead of VB MSComm, download to my PDA and use the cradle serial cable to input the GPS signal (with or without nullmodem) all I get with Comm.CommPort = 1 or 2 is "Port not available - 8005" and nothing in the textbox;
with Comm.CommPort = 3 or 4 no message or data.
Other facts:- Stopping ActiveSync running on PDA has no effect
- The PDA registry shows "COMM1-Hayes compatible modem" "COMM3-Generic IR"
_ ActiveSync works ok through cradle serial cable (hence cable and physical port ok)
- There are commercial applications which do what I am trying to do - at a price!
What am I doing wrong or not doing right??
Could the PC2002 or HP's programming of the IPAQ be grabbing the port from the start, if so, how do I stop it.
Any solutions, ideas or hints would make an extremely frustrated man very happy.
Thanks in advance
Don
I have written, using Visual Basic 6, a program that displays ones geographical position on a map from data fed through the serial COMM port from a hand held GPS navigator.
This works fine on my desktop (W98 & XP) and laptop (W95). I am now in the process of putting it on to my IPAQ 3850 (PC2002) with code amended for embedded Visual Basic 3.
All has gone well with testing the various modules - all work except one, a vital one - the inputting of data from the GPS.
The inputting of data from GPS is (or should be) very simple. A RS232 serial with the GPS sending a continuous stream of data - no handshaking etc. Just two wires, data out (from GPS) and ground.
A simple test routine in Visual Basic is as follows:-
Private Sub Form_Load
MSComm.CommPort = 1 'change for different Comm port number
MSComm.Settings = "4800,n,8,1" 'to match GPS
MSComm.PortOpen = True
Timer1.Interval 4000 'for sampling every 4sec
End Sub
Private Sub Timer1Timer
strInput = MSComm1.Input
txtInput = strInput 'display GPS data in srtInput buffer in TextBox every 4 secs
End Sub
This works fine on my desktop on Com Ports 1 & 2 and, as expected, nothing on 3 except when on the web with internal Modem working when I get an error message.
If I adapt above program into eVB ie use eVB Comm control instead of VB MSComm, download to my PDA and use the cradle serial cable to input the GPS signal (with or without nullmodem) all I get with Comm.CommPort = 1 or 2 is "Port not available - 8005" and nothing in the textbox;
with Comm.CommPort = 3 or 4 no message or data.
Other facts:- Stopping ActiveSync running on PDA has no effect
- The PDA registry shows "COMM1-Hayes compatible modem" "COMM3-Generic IR"
_ ActiveSync works ok through cradle serial cable (hence cable and physical port ok)
- There are commercial applications which do what I am trying to do - at a price!
What am I doing wrong or not doing right??
Could the PC2002 or HP's programming of the IPAQ be grabbing the port from the start, if so, how do I stop it.
Any solutions, ideas or hints would make an extremely frustrated man very happy.
Thanks in advance
Don