Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

3 votes
1 answers
2306 views
udev rules assign same port name for a modem with 4 ttyUSB ports
I have a dlink DW-157 3g dongle. I am trying to assign the same port to the dongle everytime it boots up by modifying the udev rules file. Since the dongle on boot boots up as a storage media, I have to enter the command below to eject and mount for modem mode and then other command below it to make...
I have a dlink DW-157 3g dongle. I am trying to assign the same port to the dongle everytime it boots up by modifying the udev rules file. Since the dongle on boot boots up as a storage media, I have to enter the command below to eject and mount for modem mode and then other command below it to make use of the ttyUSB ports of the modem for running a dial up modem. sudo eject /dev/sr0 sudo /bin/sh -c "echo 2001 7d0e > /sys/bus/usb-serial/drivers/option1/new_id After entering these, sudo dmesg| grep ttyUSB appears as: [ 17.581264] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1 [ 17.584470] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2 [ 17.593854] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB3 [ 17.594869] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB4 The actual port on which I can use the modem for dial up is ttyUSB1. So, I'm trying to assign ttyUSB1 to d_uart in my udev rules file: ACTION=="add", ATTRS{idVendor}=="2001", ATTRS{idProduct}=="7d0e", SYMLINK+="d_uart" But what happens is d_uart gets assigned to ttyUSB4. What do I do to assign it to the first port always (ttyUSB1 in this case) ? Also, the output of the command for ttyUSB1,ttyUSB2,ttyUSB3 and ttyUSB4 for the comnand below: udevadm info -a -n /dev/ttyUSB4 | grep '{serial}' | head -n1 is the same. ATTRS{serial}=="3f980000.usb" Also, output of command ls -l /dev/d_uart lrwxrwxrwx 1 root root 7 Oct 3 13:27 /dev/d_uart -> ttyUSB4 lsusb output: Bus 001 Device 006: ID 2001:7d0e D-Link Corp. Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root h Output of udevadm info -n /dev/ttyUSB2: P: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.3/ttyUSB2/tty/ttyUSB2 N: ttyUSB2 S: d_uart S: serial/by-id/usb-D-Link_Inc_D-Link_DWM-157-if03-port0 S: serial/by-path/platform-3f980000.usb-usb-0:1.4:1.3-port0 E: DEVLINKS=/dev/d_uart /dev/serial/by-id/usb-D-Link_Inc_D-Link_DWM-157-if03-port0 /dev/serial/by-path/platform-3f980000.usb-usb-0:1.4:1.3-port0 E: DEVNAME=/dev/ttyUSB2 E: DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.3/ttyUSB2/tty/ttyUSB2 E: ID_BUS=usb E: ID_MODEL=D-Link_DWM-157 E: ID_MODEL_ENC=D-Link\x20DWM-157 E: ID_MODEL_ID=7d0e E: ID_PATH=platform-3f980000.usb-usb-0:1.4:1.3 E: ID_PATH_TAG=platform-3f980000_usb-usb-0_1_4_1_3 E: ID_REVISION=0300 E: ID_SERIAL=D-Link_Inc_D-Link_DWM-157 E: ID_TYPE=generic E: ID_USB_CLASS_FROM_DATABASE=Miscellaneous Device E: ID_USB_DRIVER=option E: ID_USB_INTERFACES=:020e00:0a0002:ff0201:ff0000:080650: E: ID_USB_INTERFACE_NUM=03 E: ID_USB_PROTOCOL_FROM_DATABASE=Interface Association E: ID_VENDOR=D-Link_Inc E: ID_VENDOR_ENC=D-Link\x2cInc\x20\x20 E: ID_VENDOR_FROM_DATABASE=D-Link Corp. E: ID_VENDOR_ID=2001 E: MAJOR=188 E: MINOR=2 E: SUBSYSTEM=tty E: TAGS=:systemd: E: USEC_INITIALIZED=978899
bobdxcool (31 rep)
Oct 3, 2016, 08:02 AM • Last activity: Jun 25, 2025, 03:00 PM
2 votes
1 answers
3044 views
Troubles establishing connection with wvdial - Invalid dial command error
I am trying to run internet via HUAWEI E3372 on Debian. It worked on Windows but did not work on Debian.The error is this: ATDT*99# ERROR --> Invalid dial command. wvdial: utils/wvtask.cc:303: static int WvTaskMan::yield(int): Assertion *current_task->stack_magic == WVTASK_MAGIC' failed. Aborted Her...
I am trying to run internet via HUAWEI E3372 on Debian. It worked on Windows but did not work on Debian.The error is this: ATDT*99# ERROR --> Invalid dial command. wvdial: utils/wvtask.cc:303: static int WvTaskMan::yield(int): Assertion *current_task->stack_magic == WVTASK_MAGIC' failed. Aborted Here you are the issue info: *wvdial.conf* root@debian:/home/b# cat /etc/wvdial.conf [Dialer orange] Modem = /dev/ttyUSB1 Phone = *99# Username =; Password =; Init1 = ATZ Init2 = AT+CGDCONT=1,"IP","internet","",0,0 Auto DNS = on root@debian:/home/b# *dmesg | grep tty* root@debian:/home/b# dmesg | grep tty [ 0.000000] console [tty0] enabled [ 4.288912] usb 2-8: GSM modem (1-port) converter now attached to ttyUSB0 [ 4.288990] usb 2-8: GSM modem (1-port) converter now attached to ttyUSB1 root@debian:/home/b# *wvdial orange* root@debian:/home/b# wvdial orange --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: AT+CGDCONT=1,"IP","internet","",0,0 AT+CGDCONT=1,"IP","internet","",0,0 OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# ERROR --> Invalid dial command. wvdial: utils/wvtask.cc:303: static int WvTaskMan::yield(int): Assertion `*current_task->stack_magic == WVTASK_MAGIC' failed. Aborted root@debian:/home/b# *lsusb* root@debian:/home/b# lsusb Bus 002 Device 002: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 002: ID 0bf8:1004 Fujitsu Siemens Computers Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub root@debian:/home/b# ## UPDATE ## The configuration worked and internet got present actually. It was empty resolve.conf simlink so I copied /etc/ppp/resolve.conf one and it worked. Anyway **the error still remains** and I would like to get rid of it. Also note that I am doing all with Network Manager service disabled.
trzczy (680 rep)
Jun 9, 2018, 09:35 PM • Last activity: Apr 11, 2025, 08:06 AM
2 votes
0 answers
1207 views
Ping to any ip does not work on ppp0 from USB 3G modem Huawei using wvdial
I have a Debian OS on a Banana pi and I use a Huawei 3G modem to connect to the internet from it using the wvdial tool. I also have the usb-modeswitch installed and I think the modem is working as a modem correctly. The existing setup was working correctly for a few months until I decided to turn of...
I have a Debian OS on a Banana pi and I use a Huawei 3G modem to connect to the internet from it using the wvdial tool. I also have the usb-modeswitch installed and I think the modem is working as a modem correctly. The existing setup was working correctly for a few months until I decided to turn off the banana pi and left it for about 3 months and now when I try to connect to the internet using the same settings it is not working. I am able to connect to the internet carrier but cant use the internet. When I type **ping 8.8.8.8** or **ping -I ppp0 8.8.8.8** it does not respond anything and returns: --- 8.8.8.8 ping statistics --- 194 packets transmitted, 0 received, 100% packet loss, time 193000ms my **wvdial.conf** looks like this: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","internet.unite.md" Modem Type = Analog Modem Studpi Mode = 1 Baud = 9600 New PPPD = yes Modem = /dev/ttyUSB0 ISDN = 0 Phone = *99# Username = tmn Password = tmn when I run **sudo wvdial** I get: --> WvDial: Internet dialer version 1.61 --> 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","internet.unite.md" AT+CGDCONT=1,"IP","internet.unite.md" OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# CONNECT --> Carrier detected. Waiting for prompt. --> Don't know what to do! Starting pppd and hoping for the best. --> Starting pppd at Mon Jan 1 15:55:48 2018 --> Pid of pppd: 4608 --> Using interface ppp0 --> pppd: x▒ --> pppd: x▒ --> pppd: x▒ --> pppd: x▒ --> pppd: x▒ --> local IP address 100.68.71.79 --> pppd: x▒ --> remote IP address 10.64.64.64 --> pppd: x▒ --> primary DNS address 172.26.134.20 --> pppd: x▒ --> secondary DNS address 172.26.135.24 --> pppd: x▒ so it looks like it is connecting correctly to the ip 100.68.71.79 And when I do a **ping 100.68.71.79** it works correctly. But on any other addresses the ping is not working. I have checked the modem with the same sim on my windows and it was able to connect and surf the internet. Here is output of **sudo ifconfig** ppp0 Link encap:Point-to-Point Protocol inet addr:100.68.71.79 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1440 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:1245 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:186 (186.0 B) TX bytes:64913 (63.3 KiB) Output of **sudo iptables -L** Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Output of **sudo route** Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 100.68.71.79 0.0.0.0 UG 0 0 0 ppp0 10.64.64.64 * 255.255.255.255 UH 0 0 0 ppp0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 here is the **pppd** info from /var/log/syslog Jan 1 16:00:22 localhost kernel: [10908.423138] option 1-1.2:1.0: GSM modem (1-port) converter detected Jan 1 16:00:22 localhost kernel: [10908.424115] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0 Jan 1 16:00:22 localhost kernel: [10908.424991] usb-storage 1-1.2:1.1: USB Mass Storage device detected Jan 1 16:00:22 localhost kernel: [10908.425947] option 1-1.2:1.1: GSM modem (1-port) converter detected Jan 1 16:00:22 localhost kernel: [10908.426722] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1 Jan 1 16:00:22 localhost kernel: [10908.427401] usb-storage 1-1.2:1.2: USB Mass Storage device detected Jan 1 16:00:22 localhost kernel: [10908.428406] option 1-1.2:1.2: GSM modem (1-port) converter detected Jan 1 16:00:22 localhost kernel: [10908.429176] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2 Jan 1 16:01:02 localhost pppd: pppd 2.4.5 started by root, uid 0 Jan 1 16:01:02 localhost pppd: Using interface ppp0 Jan 1 16:01:02 localhost pppd: Connect: ppp0 /dev/ttyUSB0 Jan 1 16:01:02 localhost pppd: CHAP authentication succeeded Jan 1 16:01:02 localhost pppd: CHAP authentication succeeded Jan 1 16:01:07 localhost pppd: Could not determine remote IP address: defaulting to 10.64.64.64 Jan 1 16:01:07 localhost pppd: local IP address 100.68.71.79 Jan 1 16:01:07 localhost pppd: remote IP address 10.64.64.64 Jan 1 16:01:07 localhost pppd: primary DNS address 172.26.134.20 Jan 1 16:01:07 localhost pppd: secondary DNS address 172.26.135.24
unixdebian11 (63 rep)
Nov 3, 2018, 06:49 AM • Last activity: Dec 1, 2022, 09:46 PM
3 votes
3 answers
13453 views
getting "bad init string" when dialing with wvdial
I'm trying to dial-up with my Huawei modem EM680 using wvdial. My modem is found properly on `/dev/ttyUSB1` but when I execute wvdial I get this: # wvdial --> WvDial: Internet dialer version 1.61 --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending:...
I'm trying to dial-up with my Huawei modem EM680 using wvdial. My modem is found properly on /dev/ttyUSB1 but when I execute wvdial I get this: # wvdial --> WvDial: Internet dialer version 1.61 --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ0 V1 E1 +FCLASS=0 OK --> Sending: AT+CGDCONT=1,"IP","m2mstatic.apn" AT+CGDCONT=1,"IP","m2mstatic.apn" ERROR --> Bad init string. --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ0 V1 E1 +FCLASS=0 OK --> Sending: AT+CGDCONT=1,"IP","m2mstatic.apn" AT+CGDCONT=1,"IP","m2mstatic.apn" ERROR --> Bad init string. --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ0 V1 E1 +FCLASS=0 OK --> Sending: AT+CGDCONT=1,"IP","m2mstatic.apn" AT+CGDCONT=1,"IP","m2mstatic.apn" ERROR --> Bad init string. # Why does it say bad init string.? My /etc/wvdial.conf looks like this: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","m2mstatic.apn" Stupid Mode = yes Modem Type = Analog Modem ISDN = 0 New PPPD = yes Phone = *99# Modem = /dev/ttyUSB1 Username = ; Password = ; Baud = 9600
stdcerr (2099 rep)
Jan 4, 2014, 09:02 PM • Last activity: Jun 20, 2022, 10:28 AM
1 votes
1 answers
8087 views
Linux ppp0 and default route and how to reach public internet
my project needs mobile internet. I am trying to achieve this by using a LTE stick modem with a M2M sim (public IP, no NAT) This works well on ubuntu (5.3.0-29-generic), but I cannot get it working on Raspbian Buster (4.19.97+) Feb 11 22:31:48 raspberrypi systemd[1]: Reloading. Feb 11 22:31:51 raspb...
my project needs mobile internet. I am trying to achieve this by using a LTE stick modem with a M2M sim (public IP, no NAT) This works well on ubuntu (5.3.0-29-generic), but I cannot get it working on Raspbian Buster (4.19.97+) Feb 11 22:31:48 raspberrypi systemd: Reloading. Feb 11 22:31:51 raspberrypi systemd: getty@tty1.service: Current command vanished from the unit file, execution of the command list won't be resumed. Feb 11 22:31:51 raspberrypi systemd: serial-getty@ttyAMA0.service: Current command vanished from the unit file, execution of the command list won't be resumed. Feb 11 22:32:00 raspberrypi systemd: Reloading. Feb 11 22:32:41 raspberrypi pppd: pppd 2.4.7 started by root, uid 0 Feb 11 22:32:41 raspberrypi pppd: Using interface ppp0 Feb 11 22:32:41 raspberrypi pppd: Connect: ppp0 /dev/ttyUSB1 Feb 11 22:32:41 raspberrypi NetworkManager: [1581460361.7138] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/5) Feb 11 22:32:42 raspberrypi pppd: CHAP authentication succeeded: Welcome!! Feb 11 22:32:42 raspberrypi pppd: CHAP authentication succeeded Feb 11 22:32:42 raspberrypi pppd: Could not determine remote IP address: defaulting to 10.64.64.64 Feb 11 22:32:42 raspberrypi pppd: not replacing default route to eth0 [192.168.0.1] Feb 11 22:32:42 raspberrypi pppd: local IP address 10.217.44.214 Feb 11 22:32:42 raspberrypi pppd: remote IP address 10.64.64.64 Feb 11 22:32:42 raspberrypi pppd: primary DNS address 109.249.185.224 Feb 11 22:32:42 raspberrypi pppd: secondary DNS address 109.249.186.32 Feb 11 22:32:42 raspberrypi NetworkManager: [1581460362.2378] device (ppp0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external') Feb 11 22:32:42 raspberrypi NetworkManager: [1581460362.3090] device (ppp0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'external') Feb 11 22:35:30 raspberrypi pppd: Terminating on signal 15 Feb 11 22:35:30 raspberrypi pppd: Connect time 2.8 minutes. Feb 11 22:35:30 raspberrypi pppd: Sent 0 bytes, received 0 bytes. Feb 11 22:35:30 raspberrypi NetworkManager: [1581460530.4393] device (ppp0): state change: disconnected -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external') Feb 11 22:35:30 raspberrypi pppd: Connection terminated. For this, I tried using wvdial with these settings [Dialer Defaults] Auto DNS = yes Init1 = ATZ+CFUN=1 Init2 = ATH Init3 = ATE1 Init3 = AT+CGDCONT=1,"IP","EEM2M" Stupid mode = 1 Baud = 9600 Dial Command = ATD Modem = /dev/ttyUSB1 ISDN = 0 Phone = *99# Password = bt Username = bt NetworkManager.conf has this content [main] plugins=ifupdown,keyfile [ifupdown] managed=false ppp/resolv.conf has this content nameserver 109.249.185.224 nameserver 109.249.186.32 I think this was set by the setup (see log above) Last but not least, this shows when I do ifconfig -a after wvdial is running. Note that the 6 packets in ppp0 are internal pings to 10.217.44.214 eth0: flags=4163 mtu 1500 inet 192.168.0.12 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::b435:fc5d:b267:a226 prefixlen 64 scopeid 0x20 ether 00:e0:92:00:15:f3 txqueuelen 1000 (Ethernet) RX packets 299 bytes 30739 (30.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 269 bytes 36598 (35.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 4 bytes 156 (156.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4 bytes 156 (156.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ppp0: flags=4305 mtu 1500 inet 10.217.44.214 netmask 255.255.255.255 destination 10.64.64.64 ppp txqueuelen 3 (Point-to-Point Protocol) RX packets 6 bytes 66 (66.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 7 bytes 129 (129.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wwan0: flags=4098 mtu 1500 ether 00:1e:10:1f:00:00 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Edit 1: When running wvdial as root, I get this: --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ+CFUN=1 OK --> Sending: ATH OK --> Sending: AT+CGDCONT=1,"IP","EEM2M" OK --> Modem initialized. --> Sending: ATD*99# --> Waiting for carrier. CONNECT 150000000 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Tue Feb 11 23:01:49 2020 --> Pid of pppd: 1281 --> Using interface ppp0 --> pppd: X?CX?C --> pppd: X?CX?C --> pppd: X?CX?C --> pppd: X?CX?C --> pppd: X?CX?C --> pppd: X?CX?C --> local IP address 10.217.44.214 --> pppd: X?CX?C --> remote IP address 10.64.64.64 --> pppd: X?CX?C --> primary DNS address 109.249.185.224 --> pppd: X?CX?C --> secondary DNS address 109.249.186.32 --> pppd: X?CX?C I also noticed that when wvdial is running, the NetworkManager will load the correct DNS in /etc/resolv.conf, changing # Generated by NetworkManager nameserver 194.168.4.100 nameserver 194.168.8.100 to nameserver 109.249.185.224 nameserver 109.249.186.32 # Generated by NetworkManager
bem22 (167 rep)
Feb 11, 2020, 10:53 PM • Last activity: Jan 12, 2021, 03:07 PM
1 votes
1 answers
95 views
Saving USB cell modem dialog to a file
I have a ZTE MF190 USB stick on a Raspberry Pi. I run it with wvdial and it works fine. I want to log the signal strength. The appropriate AT command is AT +ZRSSI. When I insert this into wvdial.conf as part of the modem init strings and run wvdial at the terminal I get to see the output. I want to...
I have a ZTE MF190 USB stick on a Raspberry Pi. I run it with wvdial and it works fine. I want to log the signal strength. The appropriate AT command is AT +ZRSSI. When I insert this into wvdial.conf as part of the modem init strings and run wvdial at the terminal I get to see the output. I want to know the signal strength at a remote unit. I would like to be able to echo or redirect the init dialog to a file ......
Ian Boag (269 rep)
Jul 26, 2019, 10:59 PM • Last activity: Jul 27, 2019, 04:28 AM
2 votes
0 answers
327 views
Debian wvdial parse result to auto set the IP address
I'm trying to get wvdial to work automatically with a Telit LE910 WCDMA modem. My script will start up the connection as needed, then disconnect when not needed to prevent wasted data. One of the telit commands to set up the modem is to send AT+CGPADDR=3 and the result from this returns the IP addre...
I'm trying to get wvdial to work automatically with a Telit LE910 WCDMA modem. My script will start up the connection as needed, then disconnect when not needed to prevent wasted data. One of the telit commands to set up the modem is to send AT+CGPADDR=3 and the result from this returns the IP address my carrier has provided. in my wvdial.conf, I have this as one of the lines init5 = AT+CGPADDR=3 The response to that init string is +CGPADDR: 3,"100.121.106.244","254.128.0.0.0.0.0.0.0.0.1.128.162.96.1" OK The IP address changes every time I connect. With all the appropriate configurations in my wvdial.conf, wvdial completes successfully and connects. But my connection isn't fully complete until I manually issue two more commands in script or via command-line, and I'm not finding an easy way to pass that ip address back to the script to run unattended. To complete the connection, I have to type ifconfig usb0 100.121.106.244 netmask 255.255.255.0 -arp up route add default usb0 Is there some way in the wvdial.conf to have it do something with the init5 variable that could pass the result back to the script so that the connection completes automatically? The rest of my wvdial is [Dialer Defaults] Init1 = ATZ Init2 = AT+CGMR Init3 = AT#ncm=1,3 Init4 = AT+cgact=1,3 Init5 = AT+cgpaddr=3 Init6 = at+cgdcont? Init7 = AT+CGDATA="M-RAW_IP",3 Modem Type = USB Modem ISDN = 0 New PPPD = yes Modem = /dev/ttyACM3 Baud = 460800
Daniel Near (91 rep)
Oct 9, 2018, 06:06 PM • Last activity: Oct 9, 2018, 06:18 PM
1 votes
0 answers
649 views
WvDial serial communication not working with uart /dev/ttySAC4, but works with `screen`
I have embedded system based on Samsung Artik 710 board connected to Fibocom G510 cellular modem module via UART (two lines - RX and TX). When I try to communicate with modem using `screen` - modem responds to AT commands and looks like it's working: $ screen /dev/ttySAC4 . AT OK AT+CGDCONT=1,"ip","...
I have embedded system based on Samsung Artik 710 board connected to Fibocom G510 cellular modem module via UART (two lines - RX and TX). When I try to communicate with modem using screen - modem responds to AT commands and looks like it's working: $ screen /dev/ttySAC4 . AT OK AT+CGDCONT=1,"ip","playmetric" OK ATDT*99***1# CONNECT }&} } } } }#}$ďż˝#}%}&ďż˝}"Ú}'}"}(}"�� (...) When I try with wvdial - looks like there is no serial communication at all. [root@artik ~]# wvdial --> WvDial: Internet dialer version 1.61 --> Cannot set information for serial port. --> Initializing modem. --> Sending: AT --> Sending: ATQ0 --> Re-Sending: AT --> Modem not responding. [root@artik ~]# My /etc/wvdial.conf [Dialer Defaults] Modem = /dev/ttySAC4 # Modem = /dev/ttyUSB0 # Tested Raspberry Pi with /dev/ttyUSB0 modem Init1 = AT Init2 = AT Init3 = AT+CGDCONT=1,"ip","playmetric" Username=" " Password = " " Phone = "*99***1#" Dial Command = ATDT Stupid Mode = yes Dial Attempts = 0 Auto DNS = off My system: > Linux artik 4.4.113 #1 SMP PREEMPT Mon Jul 30 15:29:10 EDT 2018 > aarch64 aarch64 aarch64 GNU/Linux strace [root@artik ~]# strace wvdial execve("/usr/bin/wvdial", ["wvdial"], [/* 17 vars */]) = 0 brk(NULL) = 0x133c1000 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=34896, ...}) = 0 mmap(NULL, 34896, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fa7192000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/libwvstreams.so.4.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0000\377\3\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=847104, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa7191000 mmap(NULL, 912256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa7092000 mprotect(0x7fa7158000, 65536, PROT_NONE) = 0 mmap(0x7fa7168000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc6000) = 0x7fa7168000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/libwvutils.so.4.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0 \337\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=159312, ...}) = 0 mmap(NULL, 1278296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6f59000 mprotect(0x7fa6f7e000, 65536, PROT_NONE) = 0 mmap(0x7fa6f8e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fa6f8e000 mmap(0x7fa6f90000, 1053016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6f90000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/libwvbase.so.4.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0P\331\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=547856, ...}) = 0 mmap(NULL, 573648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6ecc000 mmap(0x7fa6f4c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x80000) = 0x7fa6f4c000 mmap(0x7fa6f52000, 24784, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6f52000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/libuniconf.so.4.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0@\v\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=376736, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa7190000 mmap(NULL, 441456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6e60000 mprotect(0x7fa6eb8000, 65536, PROT_NONE) = 0 mmap(0x7fa6ec8000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x58000) = 0x7fa6ec8000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\340\246\10\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=1554312, ...}) = 0 mmap(NULL, 1630888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6cd1000 mprotect(0x7fa6e41000, 61440, PROT_NONE) = 0 mmap(0x7fa6e50000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16f000) = 0x7fa6e50000 mmap(0x7fa6e5c000, 12968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6e5c000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\350\371\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1265992, ...}) = 0 mmap(NULL, 1335960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6b8a000 mprotect(0x7fa6cb8000, 61440, PROT_NONE) = 0 mmap(0x7fa6cc7000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12d000) = 0x7fa6cc7000 mmap(0x7fa6ccd000, 12952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6ccd000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0 \36\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=92400, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa718f000 mmap(NULL, 155912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6b63000 mprotect(0x7fa6b79000, 61440, PROT_NONE) = 0 mmap(0x7fa6b88000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fa6b88000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20`\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=366504, ...}) = 0 mmap(NULL, 430208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6af9000 mprotect(0x7fa6b48000, 65536, PROT_NONE) = 0 mmap(0x7fa6b58000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4f000) = 0x7fa6b58000 mmap(0x7fa6b62000, 128, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6b62000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libcrypto.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\200\34\6\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=1639112, ...}) = 0 mmap(NULL, 1717680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6955000 mprotect(0x7fa6ac1000, 65536, PROT_NONE) = 0 mmap(0x7fa6ad1000, 147456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16c000) = 0x7fa6ad1000 mmap(0x7fa6af5000, 13744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6af5000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\260(\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=70664, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa718e000 mmap(NULL, 134896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6934000 mprotect(0x7fa6945000, 61440, PROT_NONE) = 0 mmap(0x7fa6954000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7fa6954000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\360\v\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=30896, ...}) = 0 mmap(NULL, 283048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa68ee000 mprotect(0x7fa68f5000, 61440, PROT_NONE) = 0 mmap(0x7fa6904000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fa6904000 mmap(0x7fa6906000, 184744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6906000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\340$\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=51656, ...}) = 0 mmap(NULL, 115168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa68d1000 mprotect(0x7fa68dd000, 61440, PROT_NONE) = 0 mmap(0x7fa68ec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7fa68ec000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa718d000 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300R\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=643136, ...}) = 0 mmap(NULL, 705144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6824000 mprotect(0x7fa68c0000, 61440, PROT_NONE) = 0 mmap(0x7fa68cf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9b000) = 0x7fa68cf000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\320\r\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=10400, ...}) = 0 mmap(NULL, 73960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa6811000 mprotect(0x7fa6813000, 61440, PROT_NONE) = 0 mmap(0x7fa6822000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7fa6822000 close(3) = 0 faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20+\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=108944, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa6810000 mmap(NULL, 213544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa67db000 mprotect(0x7fa67f5000, 61440, PROT_NONE) = 0 mmap(0x7fa6804000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7fa6804000 mmap(0x7fa6806000, 37416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa6806000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa67da000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa67d9000 mprotect(0x7fa6cc7000, 16384, PROT_READ) = 0 mprotect(0x7fa6804000, 4096, PROT_READ) = 0 mprotect(0x7fa6822000, 4096, PROT_READ) = 0 mprotect(0x7fa68cf000, 4096, PROT_READ) = 0 mprotect(0x7fa68ec000, 4096, PROT_READ) = 0 mprotect(0x7fa6904000, 4096, PROT_READ) = 0 mprotect(0x7fa6ad1000, 102400, PROT_READ) = 0 mprotect(0x7fa6b58000, 16384, PROT_READ) = 0 mprotect(0x7fa6b88000, 4096, PROT_READ) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa67d8000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa67d7000 mprotect(0x7fa6e50000, 40960, PROT_READ) = 0 mprotect(0x7fa6f4c000, 20480, PROT_READ) = 0 mprotect(0x7fa6f8e000, 4096, PROT_READ) = 0 mprotect(0x7fa7168000, 28672, PROT_READ) = 0 mprotect(0x7fa6ec8000, 12288, PROT_READ) = 0 mprotect(0x427000, 4096, PROT_READ) = 0 mprotect(0x7fa719d000, 4096, PROT_READ) = 0 munmap(0x7fa7192000, 34896) = 0 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE SEGV RTMIN RT_1], [], 8) = 0 rt_sigaction(SIGILL, {0x7fa69ba7d8, ~[ILL TRAP BUS FPE SEGV RTMIN RT_1], 0}, {SIG_DFL, [], 0}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP RTMIN RT_1], 8) = 0 --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x7fa69ba828} --- rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP RTMIN RT_1], NULL, 8) = 0 rt_sigaction(SIGILL, {SIG_DFL, [], 0}, NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 brk(NULL) = 0x133c1000 brk(0x133f3000) = 0x133f3000 gettimeofday({1535476076, 539718}, NULL) = 0 dup(2) = 3 rt_sigaction(SIGTERM, {0x4061a4, [TERM], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGINT, {0x4061a4, [INT], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGHUP, {0x4061a4, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0 faccessat(AT_FDCWD, "/etc/wvdial.conf", F_OK) = 0 openat(AT_FDCWD, "/etc/wvdial.conf", O_RDONLY|O_NONBLOCK) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 fstat(4, {st_mode=S_IFREG|0640, st_size=288, ...}) = 0 gettimeofday({1535476076, 542825}, NULL) = 0 pselect6(5, , [], [], NULL, NULL) = 1 (in ) gettimeofday({1535476076, 543205}, NULL) = 0 read(4, "[Dialer Defaults]\nModem = /dev/t"..., 1024) = 288 gettimeofday({1535476076, 544035}, NULL) = 0 pselect6(5, , [], [], NULL, NULL) = 1 (in ) gettimeofday({1535476076, 544388}, NULL) = 0 read(4, "", 1024) = 0 close(4) = 0 faccessat(AT_FDCWD, "/root/.wvdialrc", F_OK) = -1 ENOENT (No such file or directory) gettimeofday({1535476076, 546258}, NULL) = 0 write(3, "--> ", 4--> ) = 4 write(3, "WvDial: Internet dialer version "..., 36WvDial: Internet dialer version 1.61) = 36 write(3, "\n", 1 ) = 1 openat(AT_FDCWD, "/var/lock/LCK..ttySAC4", O_RDWR|O_CREAT|O_EXCL|O_NONBLOCK, 0644) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 getpid() = 11826 write(4, " 11826\n", 11) = 11 close(4) = 0 openat(AT_FDCWD, "/dev/ttySAC4", O_RDWR|O_NOCTTY|O_NONBLOCK) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 gettimeofday({1535476076, 551931}, NULL) = 0 pselect6(5, , [], [], {0, 0}, NULL) = 0 (Timeout) gettimeofday({1535476076, 552290}, NULL) = 0 ioctl(4, TIOCGSERIAL, 0x7feba09818) = 0 ioctl(4, TIOCSSERIAL) = -1 EINVAL (Invalid argument) gettimeofday({1535476076, 552782}, NULL) = 0 write(3, "--> ", 4--> ) = 4 write(3, "Cannot set information for seria"..., 39Cannot set information for serial port.) = 39 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, SNDCTL_TMR_START or TCSETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 write(4, "\r", 1) = 1 nanosleep({0, 10000000}, NULL) = 0 write(4, "\r", 1) = 1 nanosleep({0, 10000000}, NULL) = 0 write(4, "\r", 1) = 1 nanosleep({0, 10000000}, NULL) = 0 write(4, "\r", 1) = 1 nanosleep({0, 10000000}, NULL) = 0 write(4, "\r", 1) = 1 nanosleep({0, 10000000}, NULL) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B0 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 500000000}, NULL) = 0 ioctl(4, TCGETS, {B0 -opost -isig -icanon -echo ...}) = 0 ioctl(4, SNDCTL_TMR_START or TCSETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 nanosleep({0, 10000000}, NULL) = 0 gettimeofday({1535476077, 130465}, NULL) = 0 pselect6(5, , [], [], {0, 0}, NULL) = 0 (Timeout) gettimeofday({1535476077, 131134}, NULL) = 0 gettimeofday({1535476077, 131458}, NULL) = 0 write(3, "\n", 1 ) = 1 write(3, "--> ", 4--> ) = 4 write(3, "Initializing modem.", 19Initializing modem.) = 19 write(3, "\n", 1 ) = 1 write(4, "\r\r\r\r\r", 5) = 5 gettimeofday({1535476077, 133553}, NULL) = 0 pselect6(5, , [], [], {0, 100000000}, NULL) = 0 (Timeout) gettimeofday({1535476077, 234525}, NULL) = 0 write(4, "AT\r", 3) = 3 gettimeofday({1535476077, 235221}, NULL) = 0 write(3, "--> ", 4--> ) = 4 write(3, "Sending: AT", 11Sending: AT) = 11 write(3, "\n", 1 ) = 1 gettimeofday({1535476077, 236560}, NULL) = 0 pselect6(5, , [], [], {5, 0}, NULL) = 0 (Timeout) gettimeofday({1535476082, 238733}, NULL) = 0 write(4, "ATQ0\r", 5) = 5 gettimeofday({1535476082, 239425}, NULL) = 0 write(3, "--> ", 4--> ) = 4 write(3, "Sending: ATQ0", 13Sending: ATQ0) = 13 write(3, "\n", 1 ) = 1 gettimeofday({1535476082, 240807}, NULL) = 0 pselect6(5, , [], [], {0, 500000000}, NULL) = 0 (Timeout) gettimeofday({1535476082, 742708}, NULL) = 0 write(4, "AT\r", 3) = 3 gettimeofday({1535476082, 743404}, NULL) = 0 write(3, "--> ", 4--> ) = 4 write(3, "Re-Sending: AT", 14Re-Sending: AT) = 14 write(3, "\n", 1 ) = 1 gettimeofday({1535476082, 744745}, NULL) = 0 pselect6(5, , [], [], {5, 0}, NULL) = 0 (Timeout) gettimeofday({1535476087, 746926}, NULL) = 0 gettimeofday({1535476087, 747288}, NULL) = 0 write(3, "--> ", 4--> ) = 4 write(3, "Modem not responding.", 21Modem not responding.) = 21 write(3, "\n", 1 ) = 1 gettimeofday({1535476087, 748780}, NULL) = 0 pselect6(5, , [], [], {0, 0}, NULL) = 0 (Timeout) gettimeofday({1535476087, 749438}, NULL) = 0 write(4, "\r", 1) = 1 gettimeofday({1535476087, 750058}, NULL) = 0 pselect6(5, [], , [], {0, 200000000}, NULL) = 1 (out , left {0, 199983349}) gettimeofday({1535476087, 750851}, NULL) = 0 gettimeofday({1535476087, 751147}, NULL) = 0 pselect6(5, , [], [], {0, 0}, NULL) = 0 (Timeout) gettimeofday({1535476087, 751792}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B0 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_CAR|TIOCM_DSR]) = 0 ioctl(4, TCGETS, {B0 -opost -isig -icanon -echo ...}) = 0 ioctl(4, SNDCTL_TMR_START or TCSETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 write(4, "+++", 3) = 3 nanosleep({1, 500000000}, NULL) = 0 write(4, "ATH\r", 4) = 4 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(4, TIOCMGET, [TIOCM_DTR|TIOCM_RTS|TIOCM_CAR|TIOCM_DSR]) = 0 ioctl(4, TCFLSH, TCIOFLUSH) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, SNDCTL_TMR_START or TCSETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCGETS, {B57600 -opost -isig -icanon -echo ...}) = 0 ioctl(4, TCFLSH, TCIOFLUSH) = 0 close(4) = 0 unlinkat(AT_FDCWD, "/var/lock/LCK..ttySAC4", 0) = 0 close(3) = 0 exit_group(1) = ? +++ exited with 1 +++
Kamil (799 rep)
Jul 30, 2018, 09:38 PM • Last activity: Aug 28, 2018, 05:09 PM
1 votes
0 answers
1014 views
ppp internet not only after restart
I have configured my network to get internet from HUAWEI E3131 usb modem at start. So I have prepared special wvdial.conf and interfaces files: **wvdial.conf:** root@debian:/home/s# cat /etc/wvdial.conf [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 Modem Type = Analog Modem Baud = 96...
I have configured my network to get internet from HUAWEI E3131 usb modem at start. So I have prepared special wvdial.conf and interfaces files: **wvdial.conf:** root@debian:/home/s# cat /etc/wvdial.conf [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 Modem Type = Analog Modem Baud = 9600 New PPPD = yes Modem = /dev/ttyUSB0 ISDN = 0 [Dialer orange] Phone = *99# Username =; Password =; root@debian:/home/s# **interfaces:** root@debian:/home/s# cat /etc/network/interfaces auto lo iface lo inet loopback auto ppp0 allow-hotplug ppp0 iface ppp0 inet wvdial provider orange root@debian:/home/s# Unfortunately with this configuration the internet connection works only after restarting my debian 8. So when I turn on the pc it doesn't work but when I then restart it, it gets to work. How to make internet start at turning the pc on? It should be wvdial because I share the ppp internet connection. **edit** There is no dual boot, no Windows installation in the system.
trzczy (680 rep)
Jun 24, 2018, 10:58 PM • Last activity: Jun 25, 2018, 06:20 PM
3 votes
1 answers
2171 views
systemd service does not trigger the tmux command upon reboot
I am using a Yocto image based on the `linux-mainline` kernel. I have `systemd` on the embedded OS that I have created. ### Aim I have a UMTS dongle connected to the board which will use `usb_modeswitch` to recognise the dongle and `wvdial` to connect to the 3G insfrastructure. ### Method I wrote a...
I am using a Yocto image based on the linux-mainline kernel. I have systemd on the embedded OS that I have created. ### Aim I have a UMTS dongle connected to the board which will use usb_modeswitch to recognise the dongle and wvdial to connect to the 3G insfrastructure. ### Method I wrote a simple bash script in /usr/umts.sh as follows #!/bin/bash sleep 1; usb_modeswitch --default-vendor 12d1 --default-product 1446 -J sleep 1; /usr/bin/tmux new-session -d -s Cloud /usr/bin/tmux set-option set-remain-on-exit on /usr/bin/tmux new-window -d -n 'wvdial' -t Cloud:1 'sleep 1; /usr/bin/wvdialconf; /usr/bin/wvdial'; usb_modeswitch will configure the USB Dongle and the next part will create a tmux session and trigger wvdial within. my systemd script looks like follows in /etc/systemd/system/enable-umts.service GNU nano 2.2.5 File: /etc/systemd/system/enable-umts.service [Unit] Description=Enable UMTS Dongle for Cloud Connectivity [Service] Type=oneshot ExecStart=/usr/umts.sh [Install] WantedBy=default.target (I have given execution rights to the script using chmod +x /usr/umts.sh) I reloaded the daemon systemctl daemon-reload and enabled the service systemctl enable enable-umts.service and rebooted the board (NOTE: I have only root on board and no other user) The dmesg infact triggers the usb_modeswitch from the script above and I see related messages [ OK ] Started Enable UMTS Dongle for Cloud Connectivity. [ 13.051247] scsi host2: usb-storage 1-1:1.5 [ 13.067326] usb-storage 1-1:1.6: USB Mass Storage device detected [ 13.074645] scsi host3: usb-storage 1-1:1.6 [ 13.158627] usbcore: registered new interface driver usbserial [ 13.165501] usbcore: registered new interface driver usbserial_generic [ 13.174754] usbserial: USB Serial support registered for generic [ 13.202356] usbcore: registered new interface driver option [ 13.208714] usbserial: USB Serial support registered for GSM modem (1-port) [ 13.216468] option 1-1:1.0: GSM modem (1-port) converter detected [ 13.229840] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 [ 13.238774] option 1-1:1.3: GSM modem (1-port) converter detected [ 13.248906] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 [ 13.256172] option 1-1:1.4: GSM modem (1-port) converter detected [ 13.264467] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2 [ 14.069960] scsi 2:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 [ 14.088684] scsi 3:0:0:0: Direct-Access HUAWEI TF CARD Storage PQ: 0 ANSI: 2 [ 14.127686] sd 3:0:0:0: [sda] Attached SCSI removable disk GSM modem (1-port) converter detected ] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 [ 13.238774] option 1-1:1.3: GSM modem (1-port) converter detected [ 13.248906] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 [ 13.256172] option 1-1:1.4: GSM modem (1-port) coPassword But upon login I try to list the sessions tmux ls and it states there are no sessions created. The `script in fact does not fail and the service status is as follows: ● enable-umts.service - Enable UMTS Dongle for Cloud Connectivity Loaded: loaded (/etc/systemd/system/enable-umts.service; enabled; vendor preset: enabled) Active: inactive (dead) since Thu 2018-05-17 12:52:10 UTC; 4min 51s ago Process: 214 ExecStart=/usr/umts.sh (code=exited, status=0/SUCCESS) Main PID: 214 (code=exited, status=0/SUCCESS) May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Set up interface 0 May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Use endpoint 0x01 for message sending ... May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Trying to send message 1 to endpoint 0x01 ... May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: OK, message successfully sent May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Reset response endpoint 0x81 May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Reset message endpoint 0x01 May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Could not reset endpoint (probably harmless): -99 May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: Device is gone, skip any further commands May 17 12:52:09 phyboard-mira-imx6-3 umts.sh: -> Run lsusb to note any changes. Bye! May 17 12:52:10 phyboard-mira-imx6-3 systemd: Started Enable UMTS Dongle for Cloud Connectivity. If execute the script /usr/umts.sh as a standalone script then in fact it does everything it is supposed to do (open a new tmux session and triggers wvdial) What is wrong here? I tried adding more sleep time but that isn't working either. Sadly there is no rc.local or cron available for the yocto image I am working on.
Shan-Desai (811 rep)
May 17, 2018, 12:56 PM • Last activity: May 20, 2018, 04:09 PM
0 votes
1 answers
304 views
Data and control channels for a modem in Linux?
I have a USB modem detected as a device device file (`/dev/ttyACM0`). Redirecting AT commands to the device file seems to work as the modem responds. Am going with the following assumption, the upper part represents a control channel. Through it one can dial up, setup the modem, cancel the connectio...
I have a USB modem detected as a device device file (/dev/ttyACM0). Redirecting AT commands to the device file seems to work as the modem responds. Am going with the following assumption, the upper part represents a control channel. Through it one can dial up, setup the modem, cancel the connection... in general do things related to controlling the modem without actually handling the data. By data I mean everything that aren't controls (for example HTTP packets). **Where does the data flow happen? If it's through the same file, how is that multiplexed?** Also ideally, one would like the modem just to be an underlying "service" that provides a network interface with an IP, so one can abstract that out and use TCP/IP sockets. The sockets are implemented in the kernel. **How does this fit into the picture once the modem is exposed as /dev/ttyACM0 in user space**?
TheMeaningfulEngineer (6220 rep)
Apr 17, 2018, 07:32 AM • Last activity: Apr 17, 2018, 09:02 AM
1 votes
1 answers
727 views
vwdial Bad init string on RPI
I'm trying to get a Huawei E398 3G USB modem to work on my Raspberry Pi 3 When I run `wvdial` I get the following response: pi@mypi:~ $ sudo wvdial --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0...
I'm trying to get a Huawei E398 3G USB modem to work on my Raspberry Pi 3 When I run wvdial I get the following response: pi@mypi:~ $ sudo wvdial --> WvDial: Internet dialer version 1.61 --> 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 ERROR --> Bad init string. This is my wvdial.conf: pi@mypi:~ $ cat /etc/wvdial.conf [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Modem Type = USB Modem ISDN = 0 New PPPD = yes Stupid Mode = yes Modem = /dev/ttyUSB0 Phone = *99# Username = internet Password = internet Baud = 115200 Anyone have any clue on what could cause this? I've tried every other init string I could come across, but every single one gives me the same error.
Bobbzorzen (23 rep)
Jan 15, 2018, 10:49 AM • Last activity: Feb 18, 2018, 01:55 AM
1 votes
0 answers
1482 views
Start wvdial on boot from crontab
I'm trying to get work crontab, I'm editing crontab with `sudo crontab -e`. After that I add the line @reboot wvdial at the end of file, theoretically, every boot the computer connect with `wvdial` but it doesn't work, why? Where I'm wrong? I'm trying also with @reboot /usr/bin/wvdial but no chance...
I'm trying to get work crontab, I'm editing crontab with sudo crontab -e. After that I add the line @reboot wvdial at the end of file, theoretically, every boot the computer connect with wvdial but it doesn't work, why? Where I'm wrong? I'm trying also with @reboot /usr/bin/wvdial but no chance to get this work. How can I set up my crontab file to run wvdial successfully at startup? When capturing the output from wvdial, I see this: --> WvDial: Internet dialer version 1.61 --> Cannot open /dev/ttyUSB1: No such file or directory
Francesco Valla (111 rep)
Jun 26, 2017, 01:41 PM • Last activity: Dec 9, 2017, 02:56 PM
4 votes
1 answers
1149 views
Is there a way to tell wvdial to wait for the answer of a command?
Some `AT` commands in `wvdial` return their answers with a delay. This period of time depends on the command. For instance, when you want to scan for available networks, you can use the `AT+COPS=?` command. The scanning process takes about 30s, but `wvdial` doesn't wait until it's finished and resen...
Some AT commands in wvdial return their answers with a delay. This period of time depends on the command. For instance, when you want to scan for available networks, you can use the AT+COPS=? command. The scanning process takes about 30s, but wvdial doesn't wait until it's finished and resend the command. After the second try, wvdial gives up with the following error: # wvdial info-scan --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: AT+COPS=? --> Re-Sending: AT+COPS=? --> Modem not responding. After some time (30s), I can issue another command via wvdial, it can be anything, for instance ATZ+CFUN=1, which does nothing when the modem is already on, but after sending the command, I get the output from the previous one: # wvdial modem-start --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ+CFUN=1 +COPS: (2,"T-Mobile.pl","TM PL","26002",2),(1,"T-Mobile.pl","TM PL","26002",7),(3,"Plus","PLUS","26001",7), (3,"Play","Play","26006",7),(3,"Orange","Orange","26003",7), (3,"Play","Play","26006",2),(3,"Orange","Orange","26003",2), (3,"Plus","PLUS","26001",2),,(0,1,2,3,4),(0,1,2) OK So is there a way to set some kind of timeout for the commands so they could get the delayed answer?
Mikhail Morfikov (11029 rep)
Mar 29, 2016, 05:47 PM • Last activity: Nov 14, 2017, 09:23 AM
2 votes
1 answers
1196 views
What is the relationship between wvdial, pon and chat?
I've checked their man pages, but I'm still confused. I just know they are all related to `ppp` connections. I'm surprised that when I googled "pon wvdial relationship", I get no useful results, so I ask this question here. Who can tell me the role of these three tools? I still feel they do the same...
I've checked their man pages, but I'm still confused. I just know they are all related to ppp connections. I'm surprised that when I googled "pon wvdial relationship", I get no useful results, so I ask this question here. Who can tell me the role of these three tools? I still feel they do the same thing... and... I find that a new tool - pon.wvdial has come out, and what is it? I'm really confused with these tools...
cifer (631 rep)
Jan 11, 2014, 03:27 PM • Last activity: Sep 27, 2016, 10:33 PM
3 votes
1 answers
7010 views
Troubles establishing connection with wvdial
I have a Huawei cell modem EM680 with which I can establish a connection on my Ubuntu 13.10 box just fine. I plug it in and I can establish a connection using the Connections Manager. I have a box without X server and I want to establish a connection with that same modem on that box. I can get a ser...
I have a Huawei cell modem EM680 with which I can establish a connection on my Ubuntu 13.10 box just fine. I plug it in and I can establish a connection using the Connections Manager. I have a box without X server and I want to establish a connection with that same modem on that box. I can get a serial link at /dev/ttyUSB1 and if I connect to it using screen /dev/ttyUSB1 460800 and send AT, it responds with OK just fine — so the modem works! After that I tried to establish a connection using wvdial with my /etc/wvdial.conf configured like this: [Dialer Defaults] Init1 = ATZ Init2 = AT+CFUN=1 Init3 = AT+CGDCONT=1,"IP","m2mstatic.apn" Modem = /dev/ttyUSB1 Phone = *99***1# Modem Type = USB Modem Username = "blank" Password = "blank" Stupid Mode = yes New PPPD = yes Baud = 460800 ISDN = 0 I tried to launch wvdial without any options or with wvdial eap-interval 1 require-chap because in my Connection Manager window, under the tab PPP the following checkboxes are checked: * EAP * MSCHAP * PAP * MSCHAPv2 * CHAP * Use BSD data compression * Use Deflate data compression * Use TCP header compression But upon launch I just get # wvdial eap-interval 1 require-chap --> WvDial: Internet dialer version 1.61 --> Warning: section [Dialer eap-interval] does not exist in wvdial.conf. --> Warning: section [Dialer 1] does not exist in wvdial.conf. --> Warning: section [Dialer require-chap] does not exist in wvdial.conf. --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: AT+CFUN=1 AT+CFUN=1 OK --> Sending: AT+CGDCONT=1,"IP","m2mstatic.apn" AT+CGDCONT=1,"IP","m2mstatic.apn" OK --> Modem initialized. --> Sending: ATDT*99***1# --> Waiting for carrier. ATDT*99***1# CONNECT 14000000 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Mon Jan 22 03:26:56 2007 --> Pid of pppd: 4295 Here it waits for about a minute and then: --> pppd: H� --> pppd: H� --> Disconnecting at Mon Jan 22 03:27:57 2007 --> The PPP daemon has died: Connect script failed (exit code = 8) --> man pppd explains pppd error codes in more detail. --> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information. --> Auto Reconnect will be attempted in 5 seconds --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ --> Sending: ATQ0 --> Re-Sending: ATZ --> Modem not responding. --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ --> Sending: ATQ0 --> Re-Sending: ATZ --> Modem not responding. --> Disconnecting at Mon Jan 22 03:28:19 2007 # But I can never actually reach the Internet. Exit code 8 in the pppd man page says: The serial port could not be opened. Which is ridiculous as I just opened (and **closed(!)** it with screen). Any ideas where I'm going wrong or what I'm missing? ### Edit I just found the connection manager's config file and it looks like this: [connection] id=Rogers uuid=5c4ed6f8-9ece-4888-a129-65ed5c741502 type=gsm permissions=user:ron:; [gsm] number=*99# password-flags=1 apn=m2mstatic.apn pin-flags=1 [ipv4] method=auto
stdcerr (2099 rep)
Jan 18, 2014, 03:59 AM • Last activity: Sep 27, 2016, 08:51 PM
6 votes
1 answers
24863 views
Linux PPP : how to debug disconnects with exit code = 16?
I'm using `pppd` and `wvdial` on my ARM Linux embedded system. I have a CDMA modem connected via a serial port and am connecting to the Verizon network. I am seeing that several times per day `pppd` exits with exit code 16 (see exact message from log below). How do I work out what is causing these d...
I'm using pppd and wvdial on my ARM Linux embedded system. I have a CDMA modem connected via a serial port and am connecting to the Verizon network. I am seeing that several times per day pppd exits with exit code 16 (see exact message from log below). How do I work out what is causing these disconnects? In particular what does the LCP terminated by peer message indicate? Feb 18 12:31:04 ts7600-47aad3 pppd: LCP terminated by peer Feb 18 12:31:04 ts7600-47aad3 pppd: Connect time 0.6 minutes. Feb 18 12:31:04 ts7600-47aad3 pppd: Sent 1044 bytes, received 0 bytes. Feb 18 12:31:04 ts7600-47aad3 pppd: restoring old default route to eth0 [1 92.168.98.1] Feb 18 12:31:07 ts7600-47aad3 pppd: Connection terminated. Feb 18 12:31:07 ts7600-47aad3 pppd: Modem hangup Feb 18 12:31:07 ts7600-47aad3 pppd: Exit. Feb 18 12:31:07 ts7600-47aad3 wvdial: Disconnecting at Tue Feb 18 12:31:07 2014 Feb 18 12:31:07 ts7600-47aad3 wvdial: The PPP daemon has died: A modem hung up t he phone (exit code = 16) Feb 18 12:31:07 ts7600-47aad3 wvdial: man pppd explains pppd error codes in more detail.
fred basset (1035 rep)
Feb 19, 2014, 06:47 PM • Last activity: Sep 27, 2016, 02:01 PM
1 votes
0 answers
1469 views
Wvdial.conf dial errors. Raspberry Pi Model B Huawei E1820 3G Modem
Linux is kicking my butt. I have attempted to use `wvdial` for the first time to get 3G working on my Raspberry Pi, but things have not gone as expected. First of all, when I do a simple sudo wvdialconf The scan gives me the following message: [![enter image description here][1]][1] Ok. Probably not...
Linux is kicking my butt. I have attempted to use wvdial for the first time to get 3G working on my Raspberry Pi, but things have not gone as expected. First of all, when I do a simple sudo wvdialconf The scan gives me the following message: enter image description here Ok. Probably not the best start I can get because of the errors on lines: ttyUSB0: ATQ0 V1 E1 S0=0 -- ERROR ttyUSB0: ATQ0 V1 E1 &C1 -- ERROR ttyUSB0: ATQ0 V1 E1 &D2 -- ERROR I figured that these errors could probably be the reason of the failure of my later attempt to use wvdial, which gives me the output as such: --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ0 V1 E1 +FCLASS=0 OK --> Sending: AT+CGDCONT=1, "IP", "internet" AT+CGDCONT=1, "IP", "internet" ERROR --> Bad init string. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ0 V1 E1 +FCLASS=0 OK --> Sending: AT+CGDCONT=1, "IP", "internet" AT+CGDCONT=1, "IP", "internet" ERROR --> Bad init string. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ0 V1 E1 +FCLASS=0 OK --> Sending: AT+CGDCONT=1, "IP", "internet" AT+CGDCONT=1, "IP", "internet" ERROR --> Bad init string. To provide some background on my configurations: My wvdial.conf looks like this: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 +FCLASS=0 Modem Type = Analog Modem ISDN = 0 New PPPD = yes Phone = *99# Modem = /dev/ttyUSB0 Username = username Password = password Baud = 9600 [Dialer E1820] Init1 = ATZ Init2 = ATQ0 V1 E1 +FCLASS=0 Init3 = AT+CGDCONT=1, "IP", "internet" Stupid Mode = 1 Phone = *99# New PPPD = yes Modem = /dev/ttyUSB0 Username = username Carrier Check = no Password = password Baud = 9600 and my dmesg logs look as such: enter image description here From these outputs, I infer (or possibly wrongly assumed) that my Huawei E1820 has indeed been turned into a modem and is ready for wvdial dialing. Additional Info: The SIM Card I'm using has been disabled of SIM_PIN and is bought from Chunghwa Telecom, a major telecom company located in Taiwan. ***Updated*** Hi all, I have tried changing my configs in the /etc/wvdial.conf file and now it looks as such: [Dialer E1820] Init1 = ATZ Init2 = ATQ0 V1 E1 +FCLASS=0 Stupid Mode = 1 Modem Type = Analog Modem ISDN = 0 Phone = *99# New PPPD = yes Modem = /dev/gsmmodem Baud = 460800 Username = username Carrier Check = no Password = password Now when I run wvdial, I get such error: --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 +FCLASS=0 ATQ 0 V1 E1 +FCLASS=0 OK --> Modem initialized. --> Sending: ATD*99# --> Waiting for carrier. ATD*99# ERROR --> Invalid dial command. --> Disconnecting at Sat Aug 20 08:53:35 2016 I suspect that the reason for this is either: * the modem is not working as expected, or * the parameter Phone in the /etc/wvdial.conf file is not properly assigned. Hope I get this to work. Any ideas out there?
Web (11 rep)
Aug 20, 2016, 06:09 AM • Last activity: Sep 26, 2016, 11:15 PM
2 votes
1 answers
3897 views
3G connection with wvdial gets no IP, exits with code 16
I am trying to establish a 3G connection with Raspbian, a 3G USB dongle, `usb_modeswitch` and `wvdial`. I followed [this tutorial][1] which has worked well before with a different 3G dongle. My 3G dongle is a ZTE D6601, the SIM has no PIN and the connection works flawlessly with the ISPs tool under...
I am trying to establish a 3G connection with Raspbian, a 3G USB dongle, usb_modeswitch and wvdial. I followed this tutorial which has worked well before with a different 3G dongle. My 3G dongle is a ZTE D6601, the SIM has no PIN and the connection works flawlessly with the ISPs tool under Windows and under Ubuntu 15 with the built-in mobile broadband tool. But I need to do this on a Raspberry Pi and from the command line. This is what I have tried so far: When I boot Raspbian, lsusb returns Bus 001 Device 004: ID 19d2:0154 ZTE WCDMA Technologies MSM I then run sudo usb_modeswitch -I -v 19d2 -p 0154 -c /etc/usb_modeswitch.conf Which changes the ProductID to Bus 001 Device 009: ID 19d2:0108 ZTE WCDMA Technologies MSM There is more than one 3G dongle with 0154 as DefaultProduct ID so the standard switching rules of usb_modeswitch don't work. 0108 is what Ubuntu switches the device to or what happens when I sudo eject the virtual CD drive, so I used that. My /etc/network/interfaces was only changed to use a WiFi connection: auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp So far, so good. When I run sudo wvdialconf, a modem is detected at /dev/ttyUSB1. I then run sudo wvdial dcom with dcom being defined like this (APN "e-connect" is correct, no user / pass required): [Dialer dcom] Modem = /dev/ttyUSB1 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","e-connect" Stupid Mode = 1 Modem Type = Analog Modem Phone = *99# ISDN = 0 Username = { } Auto Reconnect = 1 Password = { } Baud = 460800 The shell returns this: --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ OK --> Sending: ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Sending: AT+CGDCONT=1,"IP","e-connect" AT+CGDCONT=1,"IP","e-connect" OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# CONNECT 21600000 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Sat Apr 25 18:09:08 2015 --> Pid of pppd: 5530 --> Using interface ppp0 --> pppd: FX�FX8GXp Disconnecting at Sat Apr 25 18:09:39 2015 --> The PPP daemon has died: A modem hung up the phone (exit code = 16) --> man pppd explains pppd error codes in more detail. --> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information. --> Auto Reconnect will be attempted in 5 seconds --> Initializing modem. --> Sending: ATZ ATZ OK --> 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","e-connect" AT+CGDCONT=1,"IP","e-connect" OK --> Modem initialized. --> Initializing modem. --> Sending: ATZ ATZ OK --> 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","e-connect" AT+CGDCONT=1,"IP","e-connect" OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# ERROR --> Invalid dial command. --> Disconnecting at Sat Apr 25 18:09:45 2015 If I run wvdial dcom again, it will repeat the output of the second connection attempt above (Invalid dial command) and not even configure ppp0. Weirdly, after a quick sudo wvdialconf (during which /etv/wvdial.conf remains unchanged), I can connect again, but it will again assign no IP and break after 10 seconds. I have replicated this several times. Maybe this is also interesting: wlan0 loses its IP the moment ppp0 is created and I can only get it back running sudo ifdown wlan0 and sudo ifup wlan0 even though it is set to automatically reconnect.
nicolaus-hee (175 rep)
Apr 25, 2015, 11:43 AM • Last activity: Sep 26, 2016, 10:51 PM
4 votes
2 answers
2074 views
How can I run a script when internet connection is about to get lost?
I use `wvdial` (PPP dialer) with a SIM card modem and sometimes this connection is reset by server side. I would like to run a script which greps `ifconfig` to get a volume of data downloaded and stores it somewhere. Obviously it has to be done when connection is still alive, otherwise I get nothing...
I use wvdial (PPP dialer) with a SIM card modem and sometimes this connection is reset by server side. I would like to run a script which greps ifconfig to get a volume of data downloaded and stores it somewhere. Obviously it has to be done when connection is still alive, otherwise I get nothing, or a few seconds later a value for fresh connection, because wvdial is configured to immediately reconnect when connection is lost. Any idea? **Edit:** Of course I can grep output of ifconfig every second or two, but this is horrible workaround not even worth considering. The best scenario I can imagine is to somehow capture the signal which instructs ifconfig to "reset the counting" => suspend signal for a moment => run my script => unlock the signal. But maybe there are other possibilities which I'm not aware of like for example configure ifconfig itself to dump the previous result to a file if given interface disappears. Another option is to take output not from ifconfig by elsewhere. BTW, what is the input source for ifconfig?
WeSenseASoulInSearchOfAnswers (567 rep)
Oct 1, 2014, 10:21 PM • Last activity: Sep 26, 2016, 10:17 PM
Showing page 1 of 20 total questions