0

I have a problem with the disconnection of the modem after several seconds of connection. Reconnecting is not possible "Cannot open /dev/ttyUSB0: No such file or directory":

--> Connect time 0.6 minutes.
--> pppd: ??[01]??[01]
--> pppd: ??[01]??[01]
--> pppd: ??[01]??[01]
--> Disconnecting at Sat Jul 29 09:45:42 2017
--> 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
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Disconnecting at Sat Jul 29 09:45:42 2017

/var/log/messages:

raspberrypi pppd[1474]: pppd 2.4.6 started by root, uid 0
raspberrypi pppd[1474]: Using interface ppp0
raspberrypi pppd[1474]: Connect: ppp0 <--> /dev/ttyUSB0
raspberrypi pppd[1474]: CHAP authentication succeeded
raspberrypi pppd[1474]: CHAP authentication succeeded
raspberrypi pppd[1474]: Could not determine remote IP address: defaulting to 10.64.64.64
raspberrypi pppd[1474]: local  IP address 10.97.88.33
raspberrypi pppd[1474]: remote IP address 10.64.64.64
raspberrypi pppd[1474]: primary   DNS address 194.204.159.1
raspberrypi pppd[1474]: secondary DNS address 194.204.152.34
raspberrypi pppd[1474]: Modem hangup
raspberrypi kernel: [ 2730.655397] usb 1-1.2: USB disconnect, device number 7
raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Sat Jul 29 09:46:10 2017 [try http://www.rsyslog.com/e/2007 ]
raspberrypi kernel: [ 2730.679487] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
raspberrypi kernel: [ 2730.679628] option 1-1.2:1.0: device disconnected
raspberrypi kernel: [ 2730.681488] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
raspberrypi kernel: [ 2730.681607] option 1-1.2:1.1: device disconnected
raspberrypi pppd[1474]: Connect time 0.6 minutes.
raspberrypi kernel: [ 2730.693755] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
raspberrypi kernel: [ 2730.693876] option 1-1.2:1.2: device disconnected
raspberrypi kernel: [ 2730.694196] qmi_wwan 1-1.2:1.3 wwan0: unregister 'qmi_wwan' usb-20980000.usb-1.2, WWAN/QMI device
raspberrypi pppd[1474]: Sent 0 bytes, received 0 bytes.
raspberrypi pppd[1474]: Connection terminated.
raspberrypi pppd[1474]: Exit.

usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1505 file contains:

# Huawei E398

DefaultVendor= 0x12d1
DefaultProduct=0x1505

TargetVendor=  0x12d1
TargetProduct= 0x1506

CheckSuccess=20

# Standard profile
;MessageEndpoint= 0x0f

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

Configuration of /etc/wvdial.conf:

[Dialer orange]
Stupid Mode = 1
Init3 = ATZ
Init4 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init5 = AT+CGDCONT=1,"IP","internet"
Password = internet
Phone = *99#
Idle Seconds = 0
Modem Type = Analog Modem
Compuserve = 0
Baud = 460800
Auto DNS = off
Dial Command = ATDTW
Ask Password = 0
ISDN = 0
Username = internet
Carrier Check = off
Modem = /dev/ttyUSB0

[Dialer pin]
Init1 = AT+CPIN=0000

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 +FCLASS=0
Modem Type = Analog Modem
; Phone = <Target Phone Number>
ISDN = 0
; Password = <Your Password>
; Username = <Your Login Name>
Modem = /dev/ttyUSB0
Baud = 9600

Configuration tested on all raspberry models B+, 2 and 3.

It seemed to me that it could be a problem with the power supply so I added to /boot/config.txt

max_usb_current=1
safe_mode_gpio=4

sudo wvdialconf - It configures itself which port to use:

Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyUSB0<*1>: ATQ0 V1 E1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: Huawei Technologies Co., Ltd.
ttyUSB0<*1>: Speed 9600: AT -- OK
ttyUSB0<*1>: Max speed is 9600; that should be safe.
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: Huawei Technologies Co., Ltd.
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Max speed is 9600; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.
ttyUSB0<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyUSB1<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

I checked and this is not a power problem.

1

I found a solution to the problem, which was wrongly selected device port.

It was:

Modem = /dev/ttyUSB0

And should:

Modem = /dev/ttyUSB1

Raspberry Pi model B it works without any problem without additional power with this modem. We only need to remember to get a 5.1v 2.5A power supply.

-1

Four nodes about /dev/ttyUSB0-3 should be generated after plugging ,try to modify the option of Modem in /etc/wvdial.conf

  • wvdialconf - It configures itself which port to use - See above – MalT Jul 29 '17 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.