HOWTO: Get online using a 3G modem on the PS3 with YDL 6.2

General discussion Forum. All YDL related question which are not Install or Beginner questions.

HOWTO: Get online using a 3G modem on the PS3 with YDL 6.2

Postby pwall » 25 Feb 2010, 18:21

Hi All

Here are the steps I used to get a 3G broadband modem up and running with YDL 6.2 on a PS3 and Powermac G5. I have a Huawei e270 modem and my ISP is O2. For other 3G modems and ISP’s you will need to google a few settings which I will note as we go along.

To make things easier I disabled the PIN code on the modem. You can do this by temporarily putting the SIM card into your phone and disabling it or you can use the software that installs from the modem on a Windows PC.

I decided to use wvdial as the connection software but as wvdial is not included in the YDL repositories we will need to build it.

Firstly setup your build environment as described here: viewtopic.php?f=4&t=4800

Now logout of your desktop environment and login again to ensure that your build environment settings will take effect.

Next we need to download wvdial and the wvstreams library tarballs.
Code: Select all
wget http://wvstreams.googlecode.com/files/wvstreams-4.6.1.tar.gz http://wvstreams.googlecode.com/files/wvdial-1.61.tar.gz


Now extract the tarballs. I extracted them to a directory called src in my home folder. I built them under my own username before installing them as root.
Code: Select all
tar –xvzf wvdial-1.61.tar.gz
tar –xvzf wvstreams-4.6.1.tar.gz


We need to build and install wvstreams before we can build wvdial.
Code: Select all
cd wvstreams-4.6.1
./configure
make


Now we need to su to root to install wvstreams
Code: Select all
su
make install
/sbin/ldconfig
exit
cd ..


Now we can build wvdial
Code: Select all
cd wvdial-1.61
./configure
make
su
make install
/sbin/ldconfig


At this point you can now connect your 3G modem. The modem is not automatically recognised so you will need to issue the following command for a Huawei e270 or e220 modem as root user.
Code: Select all
/sbin/modprobe usbserial vendor=0x12d1 product=0x1003


If you have a different modem you will need to find out the vendor and product ID’s and substitute them.

Now enter the following command:
Code: Select all
ls /dev/ttyU*


If the modprobe was successful you should see one or more of the following ports.

/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2

If modprobe failed to find a valid modem you will probably see

ls: /dev/ttyU*: No such file or directory

If modprobe hasn’t worked it is most likely because the modem hasn’t been recognised. If this happens double check your vendor and product ID’s and also that your modem is supported by the kernel version you are using (I used the stock YDL 6.2 kernel)

Now we can configure wvdial. Enter the following command as root.
Code: Select all
wvdialconf


You should see the following output.

Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

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

Found a modem on /dev/ttyUSB0.
/etc/wvdial.conf<Warn>: Can't open '/etc/wvdial.conf' for reading: No such file or directory
/etc/wvdial.conf<Warn>: ...starting with blank configuration.
Modem configuration written to /etc/wvdial.conf.
ttyUSB0<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyUSB1<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

Now edit wvdial as root to configure it for your ISP.
Code: Select all
nano /etc/wvdial.conf


This is my wvdial.conf and with some minor changes it should work with most ISP’s.

[Dialer Defaults]
Modem = /dev/ttyUSB0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
Init5 = AT+CGDCONT=1,"IP","open.internet"
Phone = *99#
ISDN = 0
Username = gprs
Password = gprs
Baud = 460800

The lines from my wvdial.conf that you may have to change for your ISP are:
Init5
Phone
Username
Password

Now we can see if wvdial works:
Code: Select all
wvdial


If all is well you should see the following output.

--> WvDial: Internet dialer version 1.61
--> 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","open.internet"
AT+CGDCONT=1,"IP","open.internet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Tue Feb 23 23:19:38 2010
--> Pid of pppd: 14687
--> Using interface ppp0
--> pppd: [10][03]j�[10][03]jP
--> pppd: [10][03]j�[10][03]jP
--> pppd: [10][03]j�[10][03]jP
--> pppd: [10][03]j�[10][03]jP
--> pppd: [10][03]j�[10][03]jP
--> local IP address 212.191.243.34
--> pppd: [10][03]j�[10][03]jP
--> remote IP address 10.54.54.54
--> pppd: [10][03]j�[10][03]jP
--> primary DNS address 62.40.32.33
--> pppd: [10][03]j�[10][03]jP
--> secondary DNS address 8.8.8.8
--> pppd: [10][03]j�[10][03]jP

As you can see it has assigned a local IP, Remote IP and DNS servers.

To Disconnect Type Ctrl+C and you should see the following:

^CCaught signal 2: Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: [10][03]j�[10][03]jP
--> Connect time 2.2 minutes.
--> pppd: [10][03]j�[10][03]jP
--> pppd: [10][03]j�[10][03]jP
--> pppd: [10][03]j�[10][03]jP
--> Disconnecting at Tue Feb 23 23:21:50 2010

I found that I needed to set my DNS servers manually in resolv.conf. I took them from the wvdial output above.
Code: Select all
nano /etc/resolv.conf


and set the name servers as follows:
Note, you will need to use your ISP DNS servers or an opendns server.

Code: Select all
nameserver=62.40.32.33
nameserver=8.8.8.8


One last step is required. To avoid having to issue the modprobe command manually each time you reboot I would suggested editing rc.local and entering the command there instead.
Code: Select all
nano /etc/rc.local


On a stock YDL system it will contain the lines

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

I added the following line at the end:
Code: Select all
/sbin/modprobe usbserial vendor=0x12d1 product=0x1003


I would recommend that you connect the modem to the PS3/Powermac/Powerbook etc before you turn it on and it should then be as simple as:

1. Open a terminal window

2. su to root
Code: Select all
su


3. enter the command
Code: Select all
wvdial


4. Voila - you're online :-)
Hopefully this is of some use if you would like 3G with YDL!

If I can help out anyone please let me know :-)

All the best


Pat
pwall
ydl beginner
ydl beginner
 
Posts: 28
Joined: 31 Jul 2009, 13:49

Return to General

Who is online

Users browsing this forum: No registered users and 28 guests

cron