![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Send SMS through mobile phone connected to PC from PowerShell Hi, i have one problem. I don't know, how to send a SMS with connected mobile phone to serial port. I know related AT commands how to do that from HyperTerm (AT+CMGF=1 and AT+CMGS="PHONE_NUMBER"), but i don't know how to implement it into PowerShell script. I tried something, but without results... $port= new-Object System.IO.Ports.SerialPort COM9,19200,None,8,one $port.Open() $port.Write("AT+CMGF=1") Start-Sleep -seconds 3 $port.Write("AT+CMGS=PHONE_NUMBER") Start-Sleep -seconds 3 $port.Write("Hello, This is my test message") Start-Sleep -seconds 5 $port.Close() Thanks for reply. PaoloS |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||||||||||||||
| Guest | Re: Send SMS through mobile phone connected to PC from PowerShell On Nov 17, 3:00 am, PaoloS <Pao...@xxxxxx> wrote:
command; e.g. try:
hayes commands first, e.g. ati0 or ati1 , for product code and firmware checksum respectively. And finally, even though this is most likely not the problem, try a lower speed - even 1200bps would suffice for comms of this nature. If you want to use events instead of sleeps to read data when it's waiting, check into my PowerShell Eventing project up on www.codeplex.com/pseventing ; I believe someone is doing something similar with reading a UPS status via a serial port. Hope this helps, - Oisin / x0n | ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #3 (permalink) |
| Guest | Re: Send SMS through mobile phone connected to PC from PowerShell Hi Oisin, thanks for reply, but still not works... clear $port= new-Object System.IO.Ports.SerialPort COM9,1200,None,8,one $port.Open() $port.Write("AT+CMGF=1`r`n") Start-Sleep -seconds 3 $port.Write("AT+CMGS=+1234567890`r`n") Start-Sleep -seconds 3 $port.Write("Hello, This is my test message`r`n") Start-Sleep -seconds 5 $port.Close() I tried ati0 and ati1, from terminal it works, but i don't know how to read output from command to console. Do you have any other idea, where the problem should be? I found on net syntax for "AT+CMGS" command, phone number must be in "quotes", but i don't know how to write it into the script. Maybe there is the problem, why id doesn't work. Help please. PaoloS. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mobile phone 8125 | GIORGIO | Vista hardware & devices | 0 | 06-30-2008 04:25 PM |
| mobile phone photos to computer | maz | Vista music pictures video | 1 | 03-06-2008 02:29 PM |
| RTM & Windows Mobile 5 Phone | Dan Bachrach | Vista General | 13 | 12-04-2006 11:59 PM |
| could powershell connect to mobile phone and send out sms? | JamesPang | PowerShell | 2 | 11-18-2006 02:23 AM |
| Transfering pictures from Mobile phone | Nigel S | Vista music pictures video | 5 | 11-06-2006 01:49 AM |