PaulK Posted August 3, 2013 Share Posted August 3, 2013 I don't seem to be able to create a ttyUSB0 for my 3g card I have tried the following and am lost as to what to do next? root@Pineapple:/# ls /dev/ttyUSB* ls: /dev/ttyUSB*: No such file or directory root@Pineapple:/# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 12d1:1c1f Huawei Technologies Co., Ltd. root@Pineapple:/# insmod usbserial vendor=0x12d1 product=0x1c1f insmod: can't insert 'usbserial': File exists Can anyone help? I'm very much still learning. Thank you Paul Quote Link to comment Share on other sites More sharing options...
PaulK Posted August 3, 2013 Author Share Posted August 3, 2013 (edited) Here is the 3g script Im using, I have adapted a script for another huawei modem I found on this forum: #!/bin/sh# ---------------------------------------------------------# 3G Connection Script for WiFi Pineapple. "Does the thing"## Version: 2012-02-17# Supports:## ZTE MF591 (T-Mobile) -dkitchen# Novatel MC760 (Virgin) -dkitchen# Novatel MC760 (Ting) -dkitchen# Sierra 598u (Ting) -brianzimm# And more.## Updates: wifipineapple.com# ---------------------------------------------------------# -----------------------------------------------------------# Configure /etc/ppp/options with hard-coded working settings# -----------------------------------------------------------echo "logfile /dev/nullnoaccompnopcompnocrtsctslockmaxfail 0" > /etc/ppp/options# --------------------------------------------------------------------------------------------------# Check for known usb modem vendor and product IDs then switch 'em from storage to serial modem mode# --------------------------------------------------------------------------------------------------echo "Searching for attached 3G Modems"logger "3G: Connection Script here, searching for modems-PK"MODEM=$(lsusb | awk '{ print $6 }')echo $MODEMcase "$MODEM" in*12d1:11c1f*) echo "Huawei E586"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=umtsuci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.apn=giddgaff.comuci set network.wan2.username=giffgaffuci set network.wan2.password=passworduci set network.wan2.defaultroute=1NoDriverLoading=1uci commit networkusb_modeswitch -v 12d1 -p 1c1f -V 12d1 -P 1c1f -M 55534243123456780000000000000011062000000100000000000000000000 -n 1 -s 20sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x12d1 product=0x1c1fsleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;*19d2:1523*) echo "ZTE MF591 (T-Mobile) detected. Attempting mode switch"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=umtsuci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.apn=epc.tmobile.comuci set network.wan2.username=internetuci set network.wan2.password=internetuci set network.wan2.defaultroute=1uci commit networkusb_modeswitch -v 19d2 -p 1523 -V 19d2 -P 1525 -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x19d2 product=0x1525sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;*1410:6002* | *1410:5031*) echo "Novatel MC760 (Virgin Mobile) detected. Attempting mode switch"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=cdmauci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.username=internetuci set network.wan2.password=internetuci set network.wan2.defaultroute=1uci set network.wan2.ppp_redial=persistuci set network.wan2.peerdns=0uci set network.wan2.dns=8.8.8.8uci set network.wan2.keepalive=1uci set network.wan2.pppd_options=debuguci set network.wan2.pppd_options=noauthuci commit networkusb_modeswitch -v 1410 -p 5031 -V 1410 -P 6002 -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x1410 product=0x6002sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;*1410:5030*) echo "Novatel MC760 (Ting) detected. Attempting mode switch"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=cdmauci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.username=internetuci set network.wan2.password=internetuci set network.wan2.defaultroute=1uci set network.wan2.ppp_redial=persistuci set network.wan2.peerdns=0uci set network.wan2.dns=8.8.8.8uci set network.wan2.keepalive=1uci set network.wan2.pppd_options=debuguci set network.wan2.pppd_options=noauthuci commit networkusb_modeswitch -v 1410 -p 5030 -V 1410 -P 6000 -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x1410 product=0x6000sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;*1199:0025*) echo "Sierra 598u (Ting) detected. Attempting mode switch"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=cdmauci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.username=internetuci set network.wan2.password=internetuci set network.wan2.defaultroute=1uci set network.wan2.ppp_redial=persistuci set network.wan2.peerdns=0uci set network.wan2.dns=8.8.8.8uci set network.wan2.keepalive=1uci set network.wan2.pppd_options=debuguci set network.wan2.pppd_options=noauthuci commit networkusb_modeswitch -v 1199 -p 0025sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x1199 product=0x0025sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;*12d1:1436*) echo "Huawei E173 detected. Attempting mode switch"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=umtsuci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.apn=apnuci set network.wan2.username=usernameuci set network.wan2.password=passworduci set network.wan2.defaultroute=1uci commit networkusb_modeswitch -v 12d1 -p 1436sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x12d1 product=0x1436sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;*12d1:140c*) echo "Huawei Modem (3-IRL) detected. Attempting mode switch"uci delete network.wan2uci set network.wan2=interfaceuci set network.wan2.ifname=ppp0uci set network.wan2.proto=3guci set network.wan2.service=umtsuci set network.wan2.device=/dev/ttyUSB0uci set network.wan2.apn=3internetuci set network.wan2.username=uci set network.wan2.password=uci set network.wan2.defaultroute=1uci commit networkusb_modeswitch -v 12d1 -p 140c -V 12d1 -P 140c -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20sleep 10; rmmod usbserialsleep 3; insmod usbserial vendor=0x12d1 product=0x140csleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stoplogger "3G: firewall stopped"iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADEiptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPTiptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT;;esac Edited August 3, 2013 by PaulK Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted August 3, 2013 Share Posted August 3, 2013 use the spoiler tags :P Quote Link to comment Share on other sites More sharing options...
PaulK Posted August 3, 2013 Author Share Posted August 3, 2013 Thanks for the nudge, now updated Quote Link to comment Share on other sites More sharing options...
PaulK Posted August 5, 2013 Author Share Posted August 5, 2013 Can anyone help with this? as above: insmod: can't insert 'usbserial': File exists Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted August 5, 2013 Share Posted August 5, 2013 In my modem, (Huawei E353) I had to toggle a few odd settings, let me bootup my pineapple and see if i can get it working, then maybe you can try and alter the config and find a similarity that maybe huawei modems need. Will post with updates Quote Link to comment Share on other sites More sharing options...
PaulK Posted August 6, 2013 Author Share Posted August 6, 2013 Looking forward to your update, thanks Quote Link to comment Share on other sites More sharing options...
PaulK Posted August 9, 2013 Author Share Posted August 9, 2013 can anyone walk me through usb_modeswitch, or point me in the right direction. Cheers Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted August 9, 2013 Share Posted August 9, 2013 Paul_K, see your other post :P Quote Link to comment Share on other sites More sharing options...
potato Posted August 9, 2013 Share Posted August 9, 2013 dmesg | grep tty Quote Link to comment Share on other sites More sharing options...
PaulK Posted August 9, 2013 Author Share Posted August 9, 2013 [ 0.000000] Kernel command line: board=HORNET-UB console=ttyATH0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd [ 0.660000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART [ 0.660000] console [ttyATH0] enabled, bootconsole disabled Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.