Re: Icera based ZTE modems should use DHCP configuration



В Вт., 05/06/2012 в 17:11 -0500, Dan Williams пишет:
> On Sat, 2012-06-02 at 22:53 +0400, Alexander Orlov wrote:
> > Hello, everybody!
> > 
> > ModemManager uses MM_MODEM_IP_METHOD_STATIC property for all ZTE
> > Icera-based devices. But it should use DHCP for some of them:
> > - MF192+, which I have;
> > - MF192 (http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=889);
> > - MF591 (http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=932);
> > And may be more. All these devices works after invoking "sudo dhclient
> > usb0" after connection with NetworkManager.
> > 
> > May be there should be implemented some udev property to handle this
> > (much like it is done for ID_MM_ZTE_PORT_TYPE_AUX)? Or there should be
> > another solution. Anyway, I could help you with this.
> 
> Do these devices work with the Icera AT commands that retrieve the
> static IP addressing details?  I don't think it makes a ton of
> difference whether we use static or DHCP on these devices, with the
> possible exception of IPv6 support later on.  Ideally, we can autodetect
> which devices want DHCP via AT commands or such.  Is that possible?
Yes, this devices work with AT%IPDPADDR command:

(ttyACM0): <-- '<CR><LF>%IPDPACT: 1, 1, 0<CR><LF>'
mm_port_set_connected(): (usb0): port now connected
mm_modem_set_state(): Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)
simple_state_machine(): (usb0): simple connect state 6
(ttyACM0): --> 'AT%IPDPADDR=1<CR>'
(ttyACM0): <-- '<CR><LF>%IPDPADDR: 1, 10.99.29.186, 10.99.29.187, 213.87.1.1, 195.34.32.124, 0.0.0.0, 0.0.0.0, 255.0.0.0, 255.255.255.0, 10.99.29.187, <CR><LF>OK<CR><LF>'
(ttyACM0): <-- '<CR><LF>%NWSTATE: 4,25001,3G-HSDPA,R99,0<CR><LF>'

The IP address and other parameters are identical to parameters obtained
by dhclient. Routing tables of both methods are identical too.
NetworkManager seems to connect, but no server could be reached, until I
run dhclient manually.
I think, that DHCP request activates connection in the modem itself.

I don't know, is there any AT command to autodetect if the device wants
DHCP request.

-- 
Alexander Orlov



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]