The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reading variable from file variable values sagii Shell Programming and Scripting 5 06-27-2009 01:06 PM
Insert a line including Variable & Carriage Return / sed command as Variable lowmaster Shell Programming and Scripting 2 05-19-2009 11:26 PM
Sed variable substitution when variable constructed of a directory path alrinno Shell Programming and Scripting 2 07-11-2008 02:24 PM
Enviornment Variable in B shell (I call it nested variable) princelinux Shell Programming and Scripting 4 07-02-2008 01:35 AM
Comando para montar automaticamente un Dlt Kespinoza97 HP-UX 1 12-07-2005 10:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-17-2009
daaran daaran is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 3
salida de comando a variable

Buenas, estoy intentando hacer lo siguiente:
Enviar un comando at a un telefono movil y recibir la respuesta para tratarla.
Algo estaré haciendo mal que usando open, write y read, solo consigo enviarle el comando pero no capturar la respuesta, solo aparece en pantalla por el terminal.

Asi que he optado por lo siguiente:
//direccionar lo que aparece en pantalla a un .txt
system("cu -l /dev/ttyACM0 -s 9600 > log.txt");

y luego con el programa ir escribiendo los comandos y leyendo el txt para ver la respuesta del movil. (que me imagino que asi será mucho mas lento)


Mi pregunta es si puedo enviar la salida a una variable de un programa en vez de al txt. he probado con pipes pero no se enlazarlas directamente el puerto.

Muchas gracias
  #2 (permalink)  
Old 10-17-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,839
Hello.

Per our forum rules, all posts must be in English.

We do provide translation services for posts from English to a number of languages as a benefit to users. However, posts must be in English.

Please repost in English.

Thank you for your cooperation.

The UNIX and Linux Forums.
Closed Thread

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 04:58 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