Re: problem with sending AT command in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Nov 15, 2011, at 8:25, Richard Quadling <rquadling@xxxxxxxxx> wrote:

> On 15 November 2011 11:50, a dehqan <dehqan65@xxxxxxxxx> wrote:
>> \n is for Linux
>> \r is for Windows
>> 
>> On 11/14/11, Richard Quadling <rquadling@xxxxxxxxx> wrote:
>>> On 12 November 2011 20:02, a dehqan <dehqan65@xxxxxxxxx> wrote:
>>>> dio_write($handle, 'AT') & dio_write($handle, "AT") make firefox times out
>>>> on Waiting for localhost ... .
>>>> But dio_write($handle, "AT\n") makes it prints AT exactly the same command
>>>> or  Atttt > Atttt , ..
>>>> 
>>>> On Sat, Nov 12, 2011 at 10:02 PM, Negin Nickparsa
>>>> <nickparsa@xxxxxxxxx>wrote:
>>>> 
>>>>> are you sure about ATD03518726535\n?
>>>>> 
>>>>>  can you try if ( dio_write($handle, 'AT') )?
>>>>> 
>>>> 
>>> 
>>> Don't use \n, use \r.
>>> 
>>> http://en.wikipedia.org/wiki/AT_commands#Example_session
>>> 
>>> 
>>> 
>>> --
>>> Richard Quadling
>>> Twitter : EE : Zend : PHPDoc : Fantasy Shopper
>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
>>> fan.sh/6/370
>>> 
>> 
> 
> No, \r is the requirement of the modem. Nothing to do with the OS.
> 
> Windows uses \r\n as its line terminators, but when you talk to a
> modem, you use \r.
> 
> 
> 
> -- 
> Richard Quadling
> Twitter : EE : Zend : PHPDoc : Fantasy Shopper
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
> fan.sh/6/370
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


I've had better luck with PHP_EOL instead of \r or \n.
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux