![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| /dev/ttyS2 device or resource busy | blianna | UNIX and Linux Applications | 1 | 08-21-2009 06:50 AM |
| cygwin /dev/ttyS2: Device or resource busy | blianna | UNIX Desktop for Dummies Questions & Answers | 0 | 08-21-2009 06:35 AM |
| Device or resource busy?? | orahi001 | UNIX for Dummies Questions & Answers | 2 | 04-07-2009 09:22 AM |
| rmdev - device is busy | Livio | AIX | 2 | 05-17-2006 04:58 AM |
| umount, device busy, but.. | sTorm | UNIX for Dummies Questions & Answers | 10 | 08-20-2002 07:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hm. For one thing, you're not reading anything, how can you even tell if the device answers? It might be waiting for data to get read from it before it'll do anything else. For another thing, maybe it needs carriage returns, which UNIX usually doesn't provide or use. You can force echo to produce them of course... Code:
# Open ttyS2 for reading and writing as FD 5 exec 5<>/dev/ttyS2 # Leave this running in the background cat <&5 & # Write a command to FD 5 echo -en "AT\r\n" >&5 sleep 3 echo -en "AT+CMGF=1\r\n" >&5 sleep 3 echo -en "AT+CMGS=\"333xxxxxxx\"\r\n" >&5 sleep 3 # Is this supposed to have a carriage return + linefeed? Not sure. echo -en "ciao\x1a\r\n" >&5 It'd be good to know if the serial device is producing any response at all, working or not... Does it print anything when you type in the AT command in PuTTY? I'd start with that, just get that working, and add other bits once I know I have that. Last edited by Corona688; 09-18-2009 at 07:05 PM.. |
|
||||
|
Sorry...the last line was:
echo -en "\x1A">/dev/ttyS2 ---------- Post updated at 12:11 PM ---------- Previous update was at 12:02 PM ---------- It workssssssssssss!!!!!!! Thank you so muchhh!!!!!!!!!!! thanks thanks thanks thanks thanks thanks thanks thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|