On Tue, 12 May 2020 10:41:36 +0200
Aleksander Morgado <[email protected]> wrote:
> Hey,
>
> >
> > root@localhost:~# mmcli -b 2
> > --------------------------------
> > General | dbus path:
> > /org/freedesktop/ModemManager1/Bearer/2
> > | type: default
> > --------------------------------
> > Status | connected: yes
> > | suspended: no
> > | interface: wwan0
> > | ip timeout: 20
> > --------------------------------
> > Properties | roaming: allowed
> > --------------------------------
> > IPv4 configuration | method: dhcp
>
> This is the issue here. It shouldn't say DHCP, it should say "static",
> because the WWAN network interface of all the new 5G modules are
> always in raw-ip instead of 802.3, and therefore MM should fallback to
> request static IP addressing instead of DHCP.
>
> Please try to backport the following fix:
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/a8fd33ebaa80a0844c375fdb39173736d18f71cb
>
> I really haven't spent much time backporting 5G related fixes to the
> 1.12 branch, because they will all be released together in 1.14 soon.
>
I found it easier to switch my own setup to use the libqmi master
branch and modemmanager from the commit you mentioned. It works just
fine so far, wwan0 gets the correct address and the modem can ping fine
now.
I attached the makefiles and patches I used for my openwrt build if
anyone needs them. In order to build the master branch, I also needed
to add
https://github.com/autoconf-archive/autoconf-archive
as a build dependency.
#
# Copyright (C) 2016 Velocloud Inc.
# Copyright (C) 2016 Aleksander Morgado <[email protected]>
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libqmi
PKG_VERSION:=master
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cabe90c3f9f067db464b085333aaa824ed19758a
PKG_SOURCE_URL:=git://anongit.freedesktop.org/libqmi
PKG_MAINTAINER:=Nicholas Smith <[email protected]>
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=autoconf-archive/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/libqmi
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libmbim
TITLE:=Helper library to talk to QMI enabled modems
URL:=https://www.freedesktop.org/wiki/Software/libqmi
LICENSE:=LGPL-2.0-or-later
LICENSE_FILES:=COPYING.LIB
endef
define Package/libqmi/description
Helper library talk to QMI enabled modems.
Add qmi-utils for extra utilities.
endef
define Package/qmi-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libqmi
TITLE:=Utilities to talk to QMI enabled modems
URL:=https://www.freedesktop.org/wiki/Software/libqmi
LICENSE:=GPL-2.0-or-later
LICENSE_FILES:=COPYING
endef
define Package/libqmi-utils/description
Utils to talk to QMI enabled modems
endef
CONFIGURE_ARGS += \
--disable-static \
--disable-gtk-doc \
--disable-gtk-doc-html \
--disable-gtk-doc-pdf \
--disable-silent-rules \
--enable-firmware-update \
--enable-mbim-qmux \
--enable-more-warnings=yes \
--without-udev \
--without-udev-base-dir
define Build/Prepare
$(call Build/Prepare/Default)
( cd $(PKG_BUILD_DIR); env NOCONFIGURE=1 ./autogen.sh )
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/libqmi-glib \
$(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libqmi*.so* \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/qmi-glib.pc \
$(1)/usr/lib/pkgconfig
endef
define Package/libqmi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libqmi*.so.* \
$(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/qmi-proxy $(1)/usr/lib/
endef
define Package/qmi-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmicli $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-network $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-firmware-update $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libqmi))
$(eval $(call BuildPackage,qmi-utils))
#
# Copyright (C) 2016 Velocloud Inc.
# Copyright (C) 2016 Aleksander Morgado <[email protected]>
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager
PKG_VERSION:=1.12.10
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a8fd33ebaa80a0844c375fdb39173736d18f71cb
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
PKG_MIRROR_HASH:=3953a7a03d7d816860101ee331b8a485b6f98a23d97abff5a0a86fd743c3a0b0
PKG_BUILD_DIR:=$(BUILD_DIR)/modemmanager-$(PKG_VERSION)
PKG_MAINTAINER:=Nicholas Smith <[email protected]>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=glib2/host libxslt/host resolveip autoconf-archive/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/modemmanager/config
source "$(SOURCE)/Config.in"
endef
define Package/modemmanager
SECTION:=net
CATEGORY:=Network
TITLE:=Control utility for any kind of mobile broadband modem
URL:=https://www.freedesktop.org/wiki/Software/ModemManager
DEPENDS:= \
$(INTL_DEPENDS) \
+glib2 \
+dbus \
+ppp \
+MODEMMANAGER_WITH_MBIM:libmbim \
+MODEMMANAGER_WITH_QMI:libqmi
endef
define Package/modemmanager/description
ModemManager is a D-Bus-activated service which allows controlling mobile
broadband modems. Add kernel modules for your modems as needed.
Select Utilities/usb-modeswitch if needed.
endef
CONFIGURE_ARGS += \
--without-polkit \
--without-udev \
--without-systemdsystemunitdir \
--disable-rpath \
--disable-gtk-doc
ifdef CONFIG_MODEMMANAGER_WITH_MBIM
CONFIGURE_ARGS += --with-mbim
else
CONFIGURE_ARGS += --without-mbim
endif
ifdef CONFIG_MODEMMANAGER_WITH_QMI
CONFIGURE_ARGS += --with-qmi
else
CONFIGURE_ARGS += --without-qmi
endif
define Build/Prepare
$(call Build/Prepare/Default)
( cd $(PKG_BUILD_DIR); env NOCONFIGURE=1 ./autogen.sh )
( cd "$(PKG_BUILD_DIR)"; \
printf "all:\ninstall:\n" >po/Makefile.in.in; \
)
$(SED) 's|^\(GLIB_MKENUMS\)=.*|\1=$(STAGING_DIR_HOSTPKG)/bin/glib-mkenums|' \
$(PKG_BUILD_DIR)/configure.ac
$(SED) 's|^\(GDBUS_CODEGEN\)=.*|\1=$(STAGING_DIR_HOSTPKG)/bin/gdbus-codegen|' \
$(PKG_BUILD_DIR)/configure.ac
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ModemManager
$(CP) $(PKG_INSTALL_DIR)/usr/include/ModemManager/*.h $(1)/usr/include/ModemManager
$(INSTALL_DIR) $(1)/usr/include/libmm-glib
$(CP) $(PKG_INSTALL_DIR)/usr/include/libmm-glib/*.h $(1)/usr/include/libmm-glib
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ModemManager.pc $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mm-glib.pc $(1)/usr/lib/pkgconfig
endef
define Package/modemmanager/install
$(INSTALL_DIR) $(1)/lib/udev/rules.d
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/udev/rules.d/*.rules $(1)/lib/udev/rules.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so.* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ModemManager
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-shared-*.so* $(1)/usr/lib/ModemManager
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-plugin-*.so* $(1)/usr/lib/ModemManager
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf $(1)/etc/dbus-1/system.d
$(INSTALL_DIR) $(1)/usr/share/dbus-1/system-services
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service $(1)/usr/share/dbus-1/system-services
$(INSTALL_DIR) $(1)/usr/share/ModemManager
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager
$(INSTALL_DATA) ./files/modemmanager.common $(1)/usr/share/ModemManager
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
$(INSTALL_DATA) ./files/25-modemmanager-usb $(1)/etc/hotplug.d/usb
$(INSTALL_DIR) $(1)/etc/hotplug.d/net
$(INSTALL_DATA) ./files/25-modemmanager-net $(1)/etc/hotplug.d/net
$(INSTALL_DIR) $(1)/etc/hotplug.d/tty
$(INSTALL_DATA) ./files/25-modemmanager-tty $(1)/etc/hotplug.d/tty
$(INSTALL_DIR) $(1)/lib/netifd/proto
$(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh
endef
$(eval $(call BuildPackage,modemmanager))
Index: modemmanager-1.12.10/configure.ac
===================================================================
--- modemmanager-1.12.10.orig/configure.ac
+++ modemmanager-1.12.10/configure.ac
@@ -69,7 +69,6 @@ dnl All message protocol structs are pac
DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed"
dnl Setup compiler checks
-AX_COMPILER_FLAGS()
AX_COMPILER_FLAGS_CFLAGS(,,,[${DISABLED_WARNINGS}])
dnl Specify gnu89 mode
Index: libqmi-master/configure.ac
===================================================================
--- libqmi-master.orig/configure.ac
+++ libqmi-master/configure.ac
@@ -62,7 +62,6 @@ dnl All message protocol structs are pac
DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed"
dnl Setup compiler checks
-AX_COMPILER_FLAGS()
AX_COMPILER_FLAGS_CFLAGS(,,,[${DISABLED_WARNINGS}])
dnl Specify gnu89 mode
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel