Difference between revisions of "ZTE modem"

From Yantrr Wiki
Jump to: navigation, search
(Wvdial/ppp connection)
Line 1: Line 1:
===ZTE MG3732===
+
== Overview ==
  
Vayu 3GHN-D comes with ZTE MG3732 3G modem. ZTE modem creates 4 ports :  
+
Vayu 3GHx-D and VIBE 3GHx-D comes with ZTE MG3732 3G modem for Global connectivity. The 3G modem creates 4 ports :  
 +
*/dev/ttyUSB0 
 +
*/dev/ttyUSB1 : AT commands port
 +
*/dev/ttyUSB2
 +
*/dev/ttyUSB3 : Data communications port and AT commands port (baud rate 115200)
  
/dev/ttyUSB0
+
The USB drivers for the ZTE 3G modem are already pre-included in the latest Debian wheezy images available for Beaglebone Black. There is no need to add the drivers separately in the kernel.
  
/dev/ttyUSB1
+
== Modem Control ==
  
/dev/ttyUSB2
+
Please ensure that the modem is properly turned on before ppp connections can be established.
 +
If PPP connection cannot be established properly, soft reset the modem following the timing procedures for ZTE modem.
  
/dev/ttyUSB3
+
The modem can be powered on/off by either using the push button switch or GPIO45.  
 
+
The USB drivers are already there in the pre included debian wheezy images already available for beaglebone black.
+
 
+
==Module Power on/off and reset==
+
 
+
The module can be powered on/off by either using the push button switch S1 or GPIO45.  
+
  
 
'''Power on'''
 
'''Power on'''
  
The module will be turned off after power-on normally. In the state of power off, provide a low level pulse more than 50ms to ON/OFF PIN to turn on the module.
+
The module will be turned off after power-on(when power is supplied) normally. In the state of power off, provide a low level pulse more than 50ms to ON/OFF PIN to turn on the module by either toggling the push button switch or by cycling the GPIO through Low-High cycle.
  
The same can be done with the help of gpio45.
+
The default state of ON/OFF Gpio should be high.
<pre>
+
setout 45 high
+
</pre>
+
or
+
 
<pre>
 
<pre>
 
cd /sys/class/gpio
 
cd /sys/class/gpio
 +
echo 45 > export
 
cd gpio45
 
cd gpio45
 
echo “high” > direction
 
echo “high” > direction
 
</pre>
 
</pre>
 +
 +
<pre>
 +
cd /sys/class/gpio/gpio45
 +
echo "low" > direction
 +
sleep 1
 +
echo "high" > direction
 +
</pre>
 +
  
 
'''Power off'''
 
'''Power off'''
  
In the state of power on, provide a 2000ms low level pulse to ON/OFF  PIN to turn
+
In the state of Power On, provide atleast a 2000ms low level pulse to ON/OFF  PIN to turn
 
off the module.
 
off the module.
  
The same can be done with the help of gpio45
 
 
<pre>
 
<pre>
setout 45 low
+
cd /sys/class/gpio/gpio45
</pre>
+
echo "low" > direction
or
+
sleep 2
<pre>
+
echo "high" > direction
cd /sys/class/gpio
+
cd gpio45
+
echo “low” > direction
+
 
</pre>
 
</pre>
  
This can also be done by AT commands:
+
This can also be done by issuing AT commands on ports /dev/ttyUSB1 or /dev/ttyUSB3:
 
<pre>
 
<pre>
 
AT+$MYPOWEROFF
 
AT+$MYPOWEROFF
Line 56: Line 56:
 
'''Soft Reset'''
 
'''Soft Reset'''
  
In the state of power on, provide a low level pulse more than 2000ms to /RESET PIN  to reset the module. After reset, the module will be turned off.To turn on the module, provide a low level pulse more than 50ms to ON/OFF PIN.
+
To soft reset the modem, cycle the Modem On/Off pin through a Power-Off and then Power-On cycle.
<pre>
+
setout 45 low ; sleep 2 ; setout 45 high
+
</pre>
+
or
+
<pre>
+
cd /sys/class/gpio
+
cd gpio45
+
echo “low” > direction ; sleep 2 ; echo “high” > direction
+
</pre>
+
  
 
'''Hard Reset'''
 
'''Hard Reset'''
  
There may arise some siuations when you need to hard reset the modem as it is not responding ro any AT commands or there may be some other proble. In such cases, gpio60 can be used:
+
*In the state of power on, providing a low level pulse less than 2000ms to /RESET PIN to reset the module. After reset, the module will be turned on.
 +
 
 +
*In the state of power on, providing a low level pulse more than 2000ms to /RESET PIN  to reset the module. After reset, the module will be turned off.To turn on the module, provide a low level pulse more than 50ms to ON/OFF PIN.
 +
 
 +
Hardware Reset can be issued over GPIO44 for VIBE and GPIO60 in case of VAYU cape. It can also be issued by toggling the push button switch for hardware reset.
  
The same can be done by:
 
<pre>
 
cd /sys/class/gpio
 
cd gpio60
 
echo “low” > direction ; sleep 2 ; echo “high” > direction
 
</pre>
 
  
 
'''Note: The USB drivers are already there in the pre included debian wheezy images available for beaglebone black.'''
 
'''Note: The USB drivers are already there in the pre included debian wheezy images available for beaglebone black.'''
Line 91: Line 80:
  
 
The ppp connection can be established using the /dev/ttyUSB3 port at a baud rate of 115200. Make the suitable corrections in the /etc/wvdial.conf file.
 
The ppp connection can be established using the /dev/ttyUSB3 port at a baud rate of 115200. Make the suitable corrections in the /etc/wvdial.conf file.
 +
 +
For starters, issue following commands :
 +
<pre>
 +
wvdialconf
 +
</pre>
 +
 +
Then edit /etc/wvdial.conf for [Dialer Defaults] to generate a file with contents as :
 +
<pre>
 +
[Dialer Defaults]
 +
Init1 = ATZ
 +
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
 +
Modem Type = Analog Modem
 +
Baud = 115200
 +
New PPPD = yes
 +
Modem = /dev/ttyUSB3
 +
ISDN = 0
 +
Phone = *99#
 +
Password = SERVICE_PROVIDER_PASSWORD
 +
Username = SERVICE_PROVIDER_USERNAME
 +
</pre>
  
 
Establish the connection using:
 
Establish the connection using:
Line 96: Line 105:
 
wvdial
 
wvdial
 
</pre>
 
</pre>
 
'''Note : For detailed instruction, see the “wvdial configuration for debian wheezy” section above. '''
 
 
'''Note : If the ppp connection is not succesfull, make sure of the changes in the /etc/wvdial.conf file.'''
 

Revision as of 10:48, 21 July 2015

Overview

Vayu 3GHx-D and VIBE 3GHx-D comes with ZTE MG3732 3G modem for Global connectivity. The 3G modem creates 4 ports :

  • /dev/ttyUSB0
  • /dev/ttyUSB1 : AT commands port
  • /dev/ttyUSB2
  • /dev/ttyUSB3 : Data communications port and AT commands port (baud rate 115200)

The USB drivers for the ZTE 3G modem are already pre-included in the latest Debian wheezy images available for Beaglebone Black. There is no need to add the drivers separately in the kernel.

Modem Control

Please ensure that the modem is properly turned on before ppp connections can be established. If PPP connection cannot be established properly, soft reset the modem following the timing procedures for ZTE modem.

The modem can be powered on/off by either using the push button switch or GPIO45.

Power on

The module will be turned off after power-on(when power is supplied) normally. In the state of power off, provide a low level pulse more than 50ms to ON/OFF PIN to turn on the module by either toggling the push button switch or by cycling the GPIO through Low-High cycle.

The default state of ON/OFF Gpio should be high.

cd /sys/class/gpio
echo 45 > export
cd gpio45
echo “high” > direction
cd /sys/class/gpio/gpio45
echo "low" > direction
sleep 1
echo "high" > direction


Power off

In the state of Power On, provide atleast a 2000ms low level pulse to ON/OFF  PIN to turn off the module.

cd /sys/class/gpio/gpio45
echo "low" > direction
sleep 2
echo "high" > direction

This can also be done by issuing AT commands on ports /dev/ttyUSB1 or /dev/ttyUSB3:

AT+$MYPOWEROFF


Soft Reset

To soft reset the modem, cycle the Modem On/Off pin through a Power-Off and then Power-On cycle.

Hard Reset

  • In the state of power on, providing a low level pulse less than 2000ms to /RESET PIN to reset the module. After reset, the module will be turned on.
  • In the state of power on, providing a low level pulse more than 2000ms to /RESET PIN  to reset the module. After reset, the module will be turned off.To turn on the module, provide a low level pulse more than 50ms to ON/OFF PIN.

Hardware Reset can be issued over GPIO44 for VIBE and GPIO60 in case of VAYU cape. It can also be issued by toggling the push button switch for hardware reset.


Note: The USB drivers are already there in the pre included debian wheezy images available for beaglebone black.

Note : You can check the presence of modem by the use of “lsusb”.The PID:VID detected for 3GHN-D is "19d2:ffeb" Also attachment of ports can be seen with the help of “dmesg | grep -i usb”. For detailed use of the commands, see “Power on modem” section on the SW startup guide for Vayu 3G page

AT commands

All the AT commands can be executed on the /dev/ttyUSB1 with serial port settings as 115200 8N1.

Note : If the AT command/ppp connection is not established, please look at the Module power on/off procedure again. Maybe the module has not started properly.

Wvdial/ppp connection

The ppp connection can be established using the /dev/ttyUSB3 port at a baud rate of 115200. Make the suitable corrections in the /etc/wvdial.conf file.

For starters, issue following commands :

wvdialconf

Then edit /etc/wvdial.conf for [Dialer Defaults] to generate a file with contents as :

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 115200
New PPPD = yes
Modem = /dev/ttyUSB3
ISDN = 0
Phone = *99#
Password = SERVICE_PROVIDER_PASSWORD
Username = SERVICE_PROVIDER_USERNAME

Establish the connection using:

wvdial