Hi. With regard to the same matter, I would like to know what sort of code
should be used AFTER the SendString method in order to read the modem's
response into a string, when you just don't know how a line is terminated (thus
cannot use RecvTerminator). The best way I have achieved this so far is by
using RecvPacket in a Repeat-Until loop and defining a large number of packets
to read - if there is no more to read then RecvPacket times out and breaks the
loop - that's how you know it's read everything. But even with this method,
sometimes I don't get to read everything! So the question is...what method do I
use and in what way, in order to read everything from the buffer, when I don't
know what the response might be or how lines are terminated?
Thanks
> From: [EMAIL PROTECTED]
> To: [email protected]
> Date: Fri, 1 Feb 2008 10:17:02 +0100
> Subject: Re: [Synalist] SMS messaging with synaser
>
> > if you have used the synaser unit to talk to a gsm modem using AT
> > commands you may have noticed that the existing functions and
> > procedures only handle those AT commands to which the modem responds
> > with 'OK' or 'ERROR'. This works fine most of the time, however if you
> > want to send SMS messages there is a problem since the response you
> > get from the 'AT+CMGS="...phone number..."' command is '> ', at which
> > point the modem expects you to type the message content and submit
> > CTRL^Z. The '> ' response is not expected by synaser and eventually
> > the AT command times out. I did a little digging on the code and I
> > think I know where I should try to make changes, but I was wondering
> > if anyone else has solved this before me. If you have, please let me
> > know.
>
> Why mu must use Atcommand method? You can implement any communication
> by standard send* and recv* calls. See how trivially is ATCommand
> implemented and implement your code on similar way.
>
>
> --
> Lukas Gebauer.
>
> E-mail: [EMAIL PROTECTED]
> http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> synalist-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/synalist-public
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public