I've to comunicate with a GSM modem connected in a USB port...how I can sent AT comend to it? Is it seen by OS like a tty?
Lollo
I've to comunicate with a GSM modem connected in a USB port...how I can sent AT comend to it? Is it seen by OS like a tty?
Lollo
Assuming the USB driver in your Linux distro is working correctly, it should be detected as a serial port, which is [usually] a ttySn where n is a number.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Ok I try ... ehm...how i can identify it between the n-thousands of tty in /dev? can I try to comunicate with modem by a terminal, if yes, how ?
Excuse for my elementary questions, but I'm from windows and I've to learn how to do the same thinks (or better) in Linux...I want develop my applications in Linux, no more in window$ :-)
Lollo
You can probably use "lsusb" to list the device itself. Then you should be able to identify it in "dmesg" - if not, unplug it and plug it back in, and do "dmesg|tail" - hopefully the device driver is showing what device it creates.
Minicom is one of the terminal programs for Linux, so you should be able to use that:
http://en.wikipedia.org/wiki/Minicom
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
with lsusb I identify the device:
Bus 001 Device 005: ID 0f94:0005
but how I can use this info? :-(
I've done!!! and is all OK....you are a great friend! you save me another time from an headache.
thanks,thanks,thanks,thanks
I would open the terminal programmatically to show log file with this code:
string cmd;
cmd="tail -f " + (string)DbgFileName;
system(cmd.c_str());
but when I run the application i receive sthe message:
Stopped due to shared library event
[Thread debugging using libthread_db enabled]
[New Thread -1231440192 (LWP 26131)]
Stopped due to shared library event
what is wrong?
Thx
Lollo
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
I'm debugging and i have -g3 in the compiler options.
The code is correct for you to launch the command?
Lollo
Looks fine to me. What happens if you do that in a small C++ program on it's own?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
If I put this piece of code in a small program it work fine!!!
Is there a particular reason you can't just start the tail -f yourself? It seems like a lot of work for something that you can do quite trivially without code.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
No, I would like to do that in automatic and understand how to...but it's not mandatory
Have you tried setting a breakpoint at the beginning of the function, and stepping along those lines of code?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
yes...I found that when execute the "system(cmd.c_str())" the debugger lost the control