Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 05:02
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Networking » Dialup
3mobile usb modem
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
boeingng

Joined: 03 May 2008
Posts: 6

PostPosted: Sat 17 May 2008, 01:43    Post_subject:  3mobile usb modem
Sub_title: How to connect to Puppy
 

I am new to linux but want to learn. Has anyone connected a 3mobile usb modem to Puppy (any version)? I used Puppy for my previous broadband and wireless card connections so now would like to wave goodbye to XP for my current set up.

If so could you point me in the right direction to get mine to connect?

All the best to the community.
Back to top
View user's profile Send_private_message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Sat 17 May 2008, 04:12    Post_subject:  

It would probably be sensible to confirm the device id so that we know exactly what hardware we are dealing with.
Puppy 4.00 has HardInfo on the Menu-System-HardInfo-USB Devices-Misc vendor & productID
Other puppies may have lsusb installed.

Many people have connected puppy to the via a mobile so this should be doable if we can get the hardware connected properly.

If you have it, it is probably best to use puppy 4.00, if not state which version you are using.

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send_private_message 
boeingng

Joined: 03 May 2008
Posts: 6

PostPosted: Sat 17 May 2008, 21:16    Post_subject: Modem info
Sub_title: Reply to HairyWill
 

I have not had success with Puppy 4.00, my wireless keyboard does not work. This is the info from Puppy 4.00 Menu-Syst-HardInfo-Usbdevices : No "Misc Vendor" but the following - Ehci Host Controller & Usb 2.0 Hub Controller only - no further info is displayed. So I gatether it does not see my Usb device for the remote mouse and keyboard.

Using Puppy 2.17 the following is displayed in USB DEVICES:

Huawei Mobile
Manufacturer: Huawei Technologies
Speed 12Mb/s(full)
UsbVersion1.10
Device class 00 (>ifc)
Device subclass 00
Device Ptotocol 00
Max Default endpoint size 64
Number of configs 1
Vendor ID 12d1
Product Id 1003
Revision number 0.00

Config Number1
Number of interfaces 3
Attributes a0
Max power needed 500ma
Back to top
View user's profile Send_private_message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Sun 18 May 2008, 02:30    Post_subject: huaweiE220 connection script  

I don't have a 3G modem so I am cobbling this script together from stuff I found on the net and some experience using my phone as gprs modem. This script is extremely unlikely to work first time but it might give you a basis for tweaking it to work.
links:
http://wiki.debian.org/Huawei/E220
http://ubuntuforums.org/showthread.php?t=262867&page=8
Code:
#!/bin/sh

echo "/dev/usb/ttyUSB0
460800
noauth
defaultroute
usepeerdns
persist
noipdefault
lock
connect '/usr/sbin/chat -v -f /etc/chatscripts/huawei'" > /etc/ppp/peers/3G
chmod 777 /etc/ppp/peers/3G

mkdir -p /etc/chatscripts/
echo "ABORT ERROR
ABORT RING
ABORT BUSY
ABORT \"NO CARRIER\"
ABORT VOICE
ABORT \"NO DIALTONE\"
ABORT \"NO ANSWER\"
REPORT CONNECT
\"\" \"ATZ\"
OK \"ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0\"
OK ATDT*99***1#
TIMEOUT 60
CONNECT \c" > /etc/chatscripts/huawei
chmod 777 /etc/chatscripts/huawei

#rmmod usb-storage #might need this as well
rmmod usb-serial #unload the module
modprobe usbserial vendor=0x12d1 product=0x1003 #reload it device ids

pppd call 3G
cp /etc/ppp/resolv.conf /etc/resolv.conf
tail /var/log/messages
echo "press return to kill connection"
read
killall pppd

to use this you need to copy it into a new file
click on the home icon on the desktop
right click - new - script
name it fred
now right click on fred and "open as text"
copy the script, paste in and save
now open a console and type
./fred

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send_private_message 
boeingng

Joined: 03 May 2008
Posts: 6

PostPosted: Sun 18 May 2008, 03:21    Post_subject:  

Thanks for the guidance. When I have some time I will give it a go.
Idea
Back to top
View user's profile Send_private_message 
boeingng

Joined: 03 May 2008
Posts: 6

PostPosted: Mon 19 May 2008, 04:34    Post_subject: Still trying
Sub_title: Thanks HairyWill
 

I tried your script but when I went to run it I got the message "permission denied" or similar.

I tried some scripts for wvdial (modified Vodaphone 3g from other forums)- no success, they all id'd my modem as "ttyUSB0", however this generated a message "unable to locate ttyusb0".

I am new to puppy linux console commands. I am sure I can sort this out with a little help.
Question
Back to top
View user's profile Send_private_message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Mon 19 May 2008, 04:43    Post_subject:  

@boeingng

Huawei E220/puppy v3.00 working, here;

http://www.murga-linux.com/puppy/viewtopic.php?t=22280&sid=8b2bff16b4b7b91f914e809b4d8441cf

and

http://www.murga-linux.com/puppy/viewtopic.php?t=23677&sid=19ef4f51abbf6aa94cced94ccbe3f2bf

and

http://www.murga-linux.com/puppy/viewtopic.php?t=12603

@Hairy Will

maybe you can see what was done in 3.00 & modify it/yours for v4?

Aitch Smile
Back to top
View user's profile Send_private_message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Mon 19 May 2008, 07:05    Post_subject:  

Doh,I don't think I searched this forum. Embarassed
The last link that Aitch posted looks promising, you might want to post there to see in wescht can help as he has the hardware to play with.

Having read that thread though there doesn't seem to be anything specifically different in puppy 4 that would have an effect.

The permission denied error is simply caused by the script not being executable. If you are in the same directory as the the file fred then
Code:
chmod 700 fred
should fix that.

I think the line #rmmod usb-storage will need to have the # at the beginning that comments it out removed to make sure it gets executed.

If it still doesn't work I would try blacklisting the usb_storage module and rebooting. You can do this using Menu - System - Boot manager - black list a module

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send_private_message 
boeingng

Joined: 03 May 2008
Posts: 6

PostPosted: Tue 20 May 2008, 22:32    Post_subject:  

Thanks for all the help. I now have plenty try. So far not successful, but I am sure learning a lot. My apologies for not searching the forum with a more specific string, I should have found the reference posts myself. I much appreciate the forum's help.
Back to top
View user's profile Send_private_message 
kjoe

Joined: 25 Jul 2007
Posts: 27
Location: Austria

PostPosted: Tue 24 Jun 2008, 17:22    Post_subject:  

Hi boeingng,

Based on HairyWills script and including information found on http://ubuntu.frankenberger.at/Huawei_E220.html and in some blogs (and certainly after testing several hours Smile ) I've ended up with the following script (be aware that the PIN must be deactivated):

Code:
#!/bin/sh
# modified by kjoe for puppy linux 4.0
# connects huawei E220 HSDPA usb modem to provider
# exchange the following variables in this script according to your needs:

# "UUUUU" = user  (your user name)
# "PPPPP" = password  (your password)
# "XXXX" = pin code (PIN has to be deactivated for using this script)
# "LLLLL" = last part of init string (like  web.yesss.at)
# "@@@@@" = tel number (like *99#)
#  "AAA.AAA.AAA.AAA" = nameserver 1 (like  194.24.128.100)
#  "BBB.BBB.BBB.BBB" = nameserver 2 (like  81.3.216.100)

echo "hide-password
noauth
connect \"/usr/sbin/chat -v -f /etc/ppp/chatscripts/huawei\"
debug
/dev/usb/ttyUSB0
460800
defaultroute
noipdefault
noccp
nobsdcomp
user \"UUUUU\"
password \"PPPPP\"
usepeerdns
connect-delay 10000" > /etc/ppp/peers/provider
chmod 777 /etc/ppp/peers/provider

mkdir -p /etc/ppp/chatscripts/
echo "
# This chatfile was generated automatically by connect_huawei script.
# Please do not delete any of the comments.  Pppconfig needs them.
#
# ispauth PAP
# abortstring
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
# modeminit
'' ATZ
#TIMEOUT 5
#OK AT+CPIN? READY-AT+CPIN=XXXX-OK \"\" #no need to enter the PIN as it has to be deactivited to use this script
# TIMEOUT 20
'' 'AT+cgdcont=1,\"IP\",\"LLLLL\"' OK \"ATDT@@@@@\"
CONNECT \d\c
# prelogin

# ispname
# isppassword
# postlogin

# end of pppconfig stuff
" > /etc/ppp/chatscripts/huawei
chmod 777 /etc/ppp/chatscripts/huawei

mv /etc/resolv.conf /etc/resolv_old.conf
echo "# Generated by connect_huawei script
nameserver AAA.AAA.AAA.AAA
nameserver BBB.BBB.BBB.BBB" > /etc/resolv.conf

echo "#!/bin/sh
echo \"This script will try to connect your huawei modem.\"
echo \"In order to use this script PIN has to be deactivated first. One can do this either within the windows software or by putting the card into a mobile phone and deactivate the PIN code. If PIN is activated the modem LED will not turn into blue!!\"
echo \"Please plug in your modem in case you have not done yet\"
echo \"    \"
echo \"Wait until the modem LED has turned blue,\"
echo \"then press enter\"
read

#rmmod usb-storage #might need this as well
#rmmod usbserial #unload the module
modprobe usbserial vendor=0x12d1 product=0x1003
modprobe -r uhci_hcd
sleep 2
modprobe uhci_hcd

echo \"Press enter after modem LED has turned blue again\"
read
modprobe usbserial vendor=0x12d1 product=0x1003
mknod /dev/usb/ttyUSB0 c 188 0

ifconfig eth0 down  #maybe this line can be left or has to be adapted
pppd call provider
pause 5
echo \"   \"
echo \"   \"
echo \"Now connecting (watch Modem LED).\"
echo \"In case the modem does not connect (=keeps flashing)\"
echo \"kill the connection and restart script.\"
echo \"   \"
echo \"Keep this window open to stay connected.\"
echo \"Press return if you want to kill the connection\"
read
killall pppd
rm /etc/resolv.conf
rm ./Huawei
rm /etc/ppp/chatscripts/huawei
rm /etc/ppp/peers/provider
mv -f /etc/resolv_old.conf /etc/resolv.conf" > ./Huawei
chmod 777 ./Huawei

xterm -bg green -e ./Huawei


Like HairyWill has described above to use this you need to copy it into a new file
click on the home icon on the desktop
right click - new - script
name it "connect_huawei"
now right click on connect_huawei and "open as text"
copy the script, paste in
exchange the variables in this script according to your needs
(user, password, phone number, ...) and save.

Start the script by clicking on it with the mouse
or open a console and type ./connect_huawei.
Then follow the instructions.

Some times I have to stop the process and start the script a second time until it works !!
I do not know why this is necessary.

I know, the script is far from being perfect, but at least it works for me.

Info: The really important lines to get it work were:
modprobe -r uhci_hcd
modprobe uhci_hcd
and
mknod /dev/usb/ttyUSB0 c 188 0

I hope it may be helpful

Good luck

kjoe

Edited_times_total
Back to top
View user's profile Send_private_message 
whooa

Joined: 27 May 2008
Posts: 3

PostPosted: Wed 25 Jun 2008, 13:10    Post_subject:  

Good work kjoe, your patience impresses. I gave up puppy for a while a go.
May I suggest these lines to your script, ripped from oozies hua wei script for ubuntu(I made my own based on that), usually I have to wait more than 2 seconds at modprobe, up to 10/15 seconds noramlly(DSL only 2 seconds).

sudo modprobe -r uhci_hcd
sudo modprobe uhci_hcd
echo "Waiting kernel to detect modem device"
# Wait till the kernel recognizes our E220
while [ ! -c /dev/ttyUSB1 ]; do
sleep 1
done
# Start dialing
sudo wvdial $DIALER

I might have a new walk with puppy now since you were successfull.
//Peter, sweden.

EDIT !! oouups, was a bit to quick, in puppy you have to adress usb by /dev/usb/ttyUSBx.
sorry. /p
Back to top
View user's profile Send_private_message 
kjoe

Joined: 25 Jul 2007
Posts: 27
Location: Austria

PostPosted: Wed 25 Jun 2008, 17:31    Post_subject:  

@ whooa

thanks for your suggestion. I've already tried this before but without success. It seems not to work in puppy (or work different).
But I have to admit that I am not really into Linux. So maybe I did it wrong and someone could check on that.

Maybe this someone could also figure out, why most time the script has to be run two times to get a connection. ....

kjoe
Back to top
View user's profile Send_private_message 
zackbam

Joined: 04 May 2009
Posts: 1

PostPosted: Mon 04 May 2009, 05:22    Post_subject: easy guide to connect through wour mobile  

connect your phone through usb
Code:

su
wvdialconfig
geany /etc/wvdial.config

provide the file with your appropriate username and password. For GR Cosmote the username is "user" and the password "pass".
close geany.
Code:

cp /etc/ppp/wvdial /etc/ppp/peers/
cp /etc/ppp/wvdial-pipe /etc/ppp/peers/

Now everytime you want to get connected, type on console:
Code:

wvdial

Of course you can make a script on the desktop Wink
It works for me using sony ericsson k770
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Hardware » Networking » Dialup
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0895s ][ Queries: 12 (0.0035s) ][ GZIP on ]