WVDIAL
Install wvdial : sudo apt-get install wvdial
Edit /ete/wvdial.conf
[Modem0]
Modem = /dev/ttyUSB0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
FlowControl = Hardware (CRTSCTS)
[Dialer netconnect]
Username = 9381035435
Password = 9381035435
Phone = #777
Stupid Mode = 1
Inherits = Modem0
Connect to internet : sudo wvdial netconnect
Wednesday, July 27, 2011
Tuesday, January 11, 2011
Assembly from C code ...
Use the
-S
(note: capital S) switch to GCC, and it will emit the assembly code to a file with a .s
extension. For example, the following command: gcc -O2 -S -c foo.c
will leave the generated assembly code on the file foo.s
.
If you want to see the C code together with the assembly it was converted to, use a command line like this:
gcc -c -g -Wa,-a,-ad [other GCC options] foo.c > foo.lst
which will output the combined C/assembly listing to the file foo.lst
.
If you need to both get the assembly code and to compile/link the program, you can either give the -save-temps
option to GCC (which will leave all the temporary files including the .s
file in the current directory), or use the -Wa,aln=foo.s
option which instructs the assembler to output the assembly translation of the C code (together with the hex machine code and some additional info) to the file named after the =
.
Sunday, October 4, 2009
Guilty of Code Duplication ?
Here is how macros helps us to reduce code duplication
#define FUNCTION(rw) \
static int fun_##rw##_test() \
{ \
dev_##rw = x \
down_##rw(); \
/* Do something */ \
return 0; \
} \
#define FUNCTION(rw) \
static int fun_##rw##_test() \
{ \
dev_##rw = x \
down_##rw(); \
/* Do something */ \
return 0; \
} \
Sunday, September 27, 2009
Debugging
Q1.How to enable kernel low level debugging output?
A1. In kernel configuration, Kernel hacking ->
Kernel debugging -> Kernel low-level debugging functions
A1. In kernel configuration, Kernel hacking ->
Kernel debugging -> Kernel low-level debugging functions
A2. Without recompilation, pass the following
* similar * kernel params
console=uart,io,0xe1020000,115200n8
Q2. How to get C code mixed with asm ?
A1. gcc -c file.c -g -Wa,-a,-ad > file.s
A2. objdump -dS file.o > file.s
Worth reading How to locate on oops ,
best brains explaining how to trace oops .
Saturday, September 26, 2009
Smart Qustions ?
We need to be smart to solve problems, and smarter to find problems. In Open-Source world, here are few rules to be followed .
http://catb.org/~esr/faqs/smart-questions.html
Lot more to learn from this beautiful world -:)
http://catb.org/~esr/faqs/smart-questions.html
Lot more to learn from this beautiful world -:)
Monday, September 21, 2009
Augment your Entropy
We all know that Water (H2O) kept on an electric oven at 211F, does nothing other than it evaporates without any use . As long as the heat source is constant, it will continue to enjoy there.
But when a single degree of extra heat is applied and the water's temperature rises to 212F, we all know that it begins converting to steam. With the production of steam comes the ability to apply its force to actual work, such as driving huge steam engines. That single tiny bit of extra heat converts a lot of potential energy into actual energy that can be used to make very real differences downstream of its source. The same is true for us.
Spending an additional 10 uninterrupted minutes per day adding that one tiny degree of effort to improving your job skills not only helps your chances for job success but also your chances of success at life in general. You can do this by reading trade publications, studying new ideas and paradigms on how to better manage people and things or taking on-line technical classes to improve your overall job productivity. This rule applies to your family, studies, etc
Yes, we only live in the present, but the moment in which we live is built upon the foundation of all that we've done and experienced in the past. To create a better tomorrow, we must focus and work just a little bit harder now so we can reap better rewards than the mere status quo that all too often is a siren's song of future failure later.
And finally ,let us ignite ourself - http://www.212movie.com
But when a single degree of extra heat is applied and the water's temperature rises to 212F, we all know that it begins converting to steam. With the production of steam comes the ability to apply its force to actual work, such as driving huge steam engines. That single tiny bit of extra heat converts a lot of potential energy into actual energy that can be used to make very real differences downstream of its source. The same is true for us.
Spending an additional 10 uninterrupted minutes per day adding that one tiny degree of effort to improving your job skills not only helps your chances for job success but also your chances of success at life in general. You can do this by reading trade publications, studying new ideas and paradigms on how to better manage people and things or taking on-line technical classes to improve your overall job productivity. This rule applies to your family, studies, etc
Yes, we only live in the present, but the moment in which we live is built upon the foundation of all that we've done and experienced in the past. To create a better tomorrow, we must focus and work just a little bit harder now so we can reap better rewards than the mere status quo that all too often is a siren's song of future failure later.
And finally ,let us ignite ourself - http://www.212movie.com
Sunday, September 20, 2009
Automount for dummies
Being crazy about command line, found a GUI application to configure mount options : There is an amazing software called Pysdm which allows you to mount or unmount during startup. Pysdm is an GUI based and is extremely easy to use.
To install Pysdm do this :sudo apt-get install pysdm
Command to run it after install : sudo pysdm
To install Pysdm do this :sudo apt-get install pysdm
Command to run it after install : sudo pysdm
Subscribe to:
Posts (Atom)