hi i read your mail it only for usb ,can you do it for bluetooth On Fri, Apr 20, 2012 at 4:03 PM, Giuseppe Ventura <[email protected]>wrote:
> Hi all, > i must do a little script that send AT command at ttyUSB3.. and > control his answers > for example: > > Set serial port ttyUSB3 115200 8N1 > if ttyUSB3 not exist print "MODEM NOT CONNECTED" > > send AT > if response != OK then print "ERROR number 1" and resend AT > send AT+CREG? > if response != OK then print "ERROR number 2" and resend AT+CREG? > > if is all ok echo "MODEM CONNECTED AT SERVER" > > I saw on the network many script but i have problem with use of stty / > dev/ttyUSB3 115200 because i have this error: stty: /dev/ttyUSB3: > unable to perform all requested operations > > I ve doing a little script but i not have control of his answers: > > #! /bin/sh > > cat /dev/ttyUSB3 /home/giuseppe/Scrivania/imsi.txt & > sleep 1 > # stty ispeed 115200 ospeed 115200 -echo not work! > # echo AT > /dev/ttyUSB3 not work! > chat -V -s '' 'AT+creg?' '' > /dev/ttyUSB3 < /dev/ttyUSB3 > sleep 2 > chat -V -s '' 'AT' '' > /dev/ttyUSB3 < /dev/ttyUSB3 > sleep 2 > chat -V -s '' 'AT!PADSETUP=1,2,82.91.28.127,0,9940,0,1' '' > /dev/ > ttyUSB3 < /dev/ttyUSB3 > sleep 2 > chat -V -s '' 'AT+CGDCONT=1,"IP","web.omnitel.it"' '' > /dev/ttyUSB3 > < /dev/ttyUSB3 > sleep 2 > chat -V -s '' 'AT!PADCONN=1' '' > /dev/ttyUSB3 < /dev/ttyUSB3 > sleep 10 > killall cat > exit 0 > > THANKS all for help!! > > -- > You received this message because you are subscribed to the Linux Users > Group. > To post a message, send email to [email protected] > To unsubscribe, send email to [email protected] > For more options, visit our group at > http://groups.google.com/group/linuxusersgroup > References can be found at: http://goo.gl/anqri > Please remember to abide by our list rules (http://tinyurl.com/LUG-Rulesor > http://cdn.fsdev.net/List-Rules.pdf) > -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup References can be found at: http://goo.gl/anqri Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules or http://cdn.fsdev.net/List-Rules.pdf)
