The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com



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

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-18-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
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..
  #2 (permalink)  
Old 09-20-2009
blianna blianna is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 12
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
  #3 (permalink)  
Old 09-21-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
You are welcome. I'd love to see your complete script.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0