qusetion about DHCP funcationality in libqmi

Dan Williams dcbw at redhat.com
Thu Feb 9 22:49:53 UTC 2017


Hi,

No, DHCP functionality is not implemented in libqmi.  It's implemented
in the modem's firmware and depends on the network mode the firmware
boots up into, or is told to use.  There are two:

1) 802.3 - the "net" port emulates an ethernet interface and can be
used easily with DHCP; this is often the easiest to use because it
doesn't require reading/parsing IP details from QMI, and everyone
already has a DHCP client somehwere.

2) raw-ip - the "net" port does not emulate ethernet, but instead
transmits and receives raw IP packets.  This is more efficient, since
the ethernet framing is entirely pointless and is not transmitted over
the air.  You can use QMI to request the IP details that should be
assigned statically to the net port rather than run DHCP.

libqmi/qmicli leave the device in whatever mode it boots up in, and
provide the --get-expected-data-format/--set-expected-data-format
options to switch between the two.

But the latest Gobi drivers from CodeAurora force the device into raw-
ip mode, see QMI.c::QMIWDASetDataFormatReq() and the "Link Layer
Protocol" TLV:

   // Link Layer protocol
   *(u8 *)(pBuffer + sizeof( sQMUX ) + 11)  = 0x11;
   // Size
   *(u16 *)(pBuffer + sizeof( sQMUX ) + 12) = 0x0004;
   // IP is enabled
   *(u32 *)(pBuffer + sizeof( sQMUX ) + 14) = 0x00000002;

where 0x00000002 means "use raw-ip mode".  So there's your problem.  It
doesn't look like you can even ask the Gobi drivers to use 802.3 mode.

Dan

On Thu, 2017-02-09 at 21:12 +0000, Chen, Jing wrote:
> Hi, All:
> 
> I am using Sierra MC7354. When I use qcserial and qmi-wwan as driver,
> I could run "dhclient" command successfully to get route table
> updated after wds-start-network. While, when I use Gobi driver from
> device provider, DHCPDISCOVER messages receive no reply when I run
> "dhclient".
> 
> So, I am wondering, is DHCP functionality integrated in libqmi? Is
> this issue something relative to network setting at my Ubuntu host
> (Linux kernel 4.8), or it's a GOBI driver problem.
> 
> Thanks!
> 
> Jenny
> 
> 
> 
> 
> Spirent Communications e-mail confidentiality.
> -------------------------------------------------------------------
> -----
> This e-mail contains confidential and / or privileged information
> belonging to Spirent Communications plc, its affiliates and / or
> subsidiaries. If you are not the intended recipient, you are hereby
> notified that any disclosure, copying, distribution and / or the
> taking of any action based upon reliance on the contents of this
> transmission is strictly forbidden. If you have received this message
> in error please notify the sender by return e-mail and delete it from
> your system.
> 
> Spirent Communications plc
> Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN, United
> Kingdom.
> Tel No. +44 (0) 1293 767676
> Fax No. +44 (0) 1293 767677
> 
> Registered in England Number 470893
> Registered at Northwood Park, Gatwick Road, Crawley, West Sussex,
> RH10 9XN, United Kingdom.
> 
> Or if within the US,
> 
> Spirent Communications,
> 27349 Agoura Road, Calabasas, CA, 91301, USA.
> Tel No. 1-818-676- 2300
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel


More information about the libqmi-devel mailing list