Debinaize It

October 6, 2008

System Admin: EDGE/GPRS via Bluetooth in Linux Simplified

Filed under: Scripts, system admin, Tips and Tricks, Ubuntu — zaher14 @ 12:28 pm
This is an update to one of my earlier posts. I was trying to find a more portable way with wvdial and came up with this.

Start with the same command,

$hcitool scan

We get some info

<code>Scanning ...<br /> 00:1D:FD:36:9E:DB 3110c Emerald<br /></code><br />

Here “00:1D:FD:36:9E:DB” is the blue-tooth address of my phone.

Time to put this address into good use. We’re going to bind this blue-tooth address with a specific device identifier.

$sudo rfcomm bind 0 00:1D:FD:36:9E:DB 1

Let me put some light into this command, the second argument in this command (in this case 0) is the device identifier, the third is the blue-tooth address (distinct for each device) and the fourth is the channel number which is typically 1.

After executing this command this mobile phone is directly accessible through /dev/rfcomm0

As said earlier, we are going to use wvdial this time. But we need to do another trick.

$sudo ln -s /dev/rfcomm0 /dev/ttyS4

Now we just run

$sudo wvdialconf

You should see some output in the terminal

Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyS4<*1>: ATQ0 V1 E1 -- OK
ttyS4<*1>: ATQ0 V1 E1 Z -- OK
ttyS4<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS4<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS4<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS4<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyS4<*1>: Modem Identifier: ATI -- Nokia
ttyS4<*1>: Speed 4800: AT -- OK
ttyS4<*1>: Speed 9600: AT -- OK
ttyS4<*1>: Speed 19200: AT -- OK
ttyS4<*1>: Speed 38400: AT -- OK
ttyS4<*1>: Speed 57600: AT -- OK
ttyS4<*1>: Speed 115200: AT -- OK
ttyS4<*1>: Speed 230400: AT -- OK
ttyS4<*1>: Speed 460800: AT -- OK
ttyS4<*1>: Max speed is 460800; that should be safe.
ttyS4<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttyS4.
Modem configuration written to /etc/wvdial.conf.
ttyS4: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

Open up /etc/wvdial.conf with your favourite text editor and add this line

Init3 = AT+CGDCONT=1,"IP","gpinternet"

Set phone number to *99***1# and Username and Password to anything you like.

At last run

$sudo wvdial

If you did everything right, you would see samilar output to this

--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","gpinternet"
AT+CGDCONT=1,"IP","gpinternet"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> PPP negotiation detected.
--> Starting pppd at Mon Oct 6 12:22:38 2008
--> Pid of pppd: 17504
--> Using interface ppp0
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> local IP address 10.130.11.226
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> remote IP address 10.6.6.6
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> primary DNS address 202.56.4.120
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]
--> secondary DNS address 202.56.4.121
--> pppd: ا[06][08][08]�[06][08][08]�[06][08]

Fire up your browser and enjoy the net.

[Update: Some have reported that the DNS don't get updated automatically, in that case you might need to update /etc/resolv.conf file manually.]

July 19, 2008

A Simple trick to run your Linux apps in Mac OSX Seamlessly

Filed under: MacOSX, system admin, Tips and Tricks, Ubuntu — Tags: , , , — zaher14 @ 4:04 am

I have been using Vmware Fusion to run Ubuntu 8.04 and Windows XP for a while. I really like the idea of Unity while using Windows in Vmware as it seamlessly integrates Windows and Mac OSX apps.

I was a little sad to find out there is no such feature for Linux. Guess what, I was wrong. While I was fiddling with different ssh options, I came across a feature called X11 forwarding. With the use of X11 forwarding, its easy to accomplish the same effect. All you need is just add ‘-X’ option while you ssh and make sure you have a working X11 environment installed in your Leopard.

$ssh -X zaher@172.16.90.128

Its as simple as that. After login, just run any graphical program you want like a native application. You can also disable X11 in your VM since it has the added benefit of using low memory than usual as no X11 us running in your Virtual Machine.

Here is a screenshot of Firefox, Gimp and OpenOffice.Org running from my Ubuntu Hardy Heron in Leopard.

Tips: Run Linux apps in Mac OSX Seamlessly

Filed under: MacOSX, system admin, Tips and Tricks, Ubuntu — zaher14 @ 4:04 am
I have been using Vmware Fusion to run Ubuntu 8.04 and Windows XP for a while. I really like the idea of Unity while using Windows in Vmware as it seamlessly integrates Windows and Mac OSX apps.

I was a little sad to find out there is no such feature for Linux. Guess what, I was wrong. While I was fiddling with different ssh options, I came across a feature called X11 forwarding. With the use of X11 forwarding, its easy to accomplish the same effect. All you need is just add ‘-X’ option while you ssh and make sure you have a working X11 environment installed in your Leopard.

$ssh -X zaher@172.16.90.128

Its as simple as that. After login, just run any graphical program you want like a native application. You can also disable X11 in your VM since it has the added benefit of using low memory than usual as no X11 us running in your Virtual Machine.

Here is a screenshot of Firefox, Gimp and OpenOffice.Org running from my Ubuntu Hardy Heron in Leopard.

September 7, 2006

Installed ATI fglrx driver succesfully in Debian ‘etch’

Filed under: system admin — Tags: — zaher14 @ 6:48 am

Everybody knows that installing ati’s closed source driver fglrx in
unix is a bit hairy. I know several people who have smoked their box
in the process (that also includes me!). (debian unstable now includes
the fglrx driver, but i find it better 2 install the latest driver from
the card manufaturer)

Well after a lot of fiddling (or should i say a few crashes!) I was
able to install it withput any problem.

Here is the procedure I followed:

1, downloaded the latest version from ati’s website. (8.27.10-1)

2. #sh /tmp/ati-driver-installer-8.27.10-x86.run –buildpkg Debian/etch

3. #dpkg -i fglrx-driver_8.27.10-1_i386.deb
fglrx-control_8.27.10-1_i386.deb fglrx-kernel-src_8.27.10-1_i386.deb

4. #apt-get install module-assistant

5. #module-assistant prepare

6. #module-assistant update

7. #module-assistant build fglrx

8. #module-assistant install fglrx

9. #depmod -a

10. #aticonfig –initial

11. #aticonfig –overlay-type=Xv

12. #mkdir -p /usr/X11R6/lib/modules/dri

13. #ln -s /usr/lib/dri/fglrx_dri.so /usr/X11R6/lib/modules/dri

the driver installation was complete by now.
I checked if the driver installation was successfull by doing a reboot
and #fglrxinfo in the terminal.
I also ran #fgl_glxgears; i saw three gears spinning.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.