ZTE modem
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 pre included in the 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