What I did was create a GLOBAL method:
Sub tDelay (delay as integer)
Dim stop as Integer = ticks + delay
Do
// nothing
Loop Until ticks > stop
End Sub
(Of course, you could do this with a timer.)
Then set up a variable in your main method:
Dim deltaT as Integer = 500
Then, insert the time delay between calls to the modem. Fiddle with the
delay time value (increase by 100 ) until everything works. If you get over
2 seconds (2000 ticks) and it still doesn't work, then the chances are that
something else is wrong.
socket1.write "ATDT"
tDelay deltaT
socket1.write "ATX3DT333333" + chr(13)+chr(10)
tDelay deltaT
// (... etc.)
Good luck
PWH
*********************************************************
on 5/17/04 7:55 PM, Carlo Rubini at osb at bttb dot net dot bd wrote:
>> From: Phil Heycock <pheycock at bellsouth dot net>
>
> Since leaving out &F from the string (as suggested by Thomas) didnt
> solve the problem I'm nore than willing to try your suggestion, that
> if I understand you correctly should be something like:
>
> socket.serialport = system.serialport(0)
>
> then, in a one-second-period timer:
> socket1.write "ATX3DT333333" + chr(13)+chr(10)
>
> and finally, in another timer
> socket1.close
>
> or do you mean, after closing the serial object wait one second
> before calling it again?
>
> thanks,
>
>> When I was trying to accomplish the same thing, I found it necessary to
>> insert a 1 second delay between calls to the modem. I don't know if it is
>> still necessary in RB 5.x... but it's something that you can try if you find
>> that you can't get the modem to work for non-obvious reasons.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|