You are not logged in.

#1 2024-05-22 18:10:08

archuser38013
Member
Registered: 2024-01-27
Posts: 51

Can I force 4g modem to use ipv4?

Output of:

mmcli -m X

the capabilities show:

  ----------------------------------
  General  |                   path: /org/freedesktop/ModemManager1/Modem/25
           |              device id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  ----------------------------------
  Hardware |           manufacturer: QUALCOMM INCORPORATED
           |                  model: 0
           |      firmware revision: xxxxxxxxxxxxxxxxxx
           |         carrier config: default
           |           h/w revision: 20002
           |              supported: gsm-umts, lte
           |                current: gsm-umts, lte
           |           equipment id: xxxxxxxxxxxxxxx
  ----------------------------------
  System   |                 device: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
           |                physdev: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
           |                drivers: qmi_wwan, option
           |                 plugin: d-link
           |           primary port: cdc-wdm0
           |                  ports: cdc-wdm0 (qmi), ttyUSB1 (at), ttyUSB2 (at), wwan0 (net)
  ----------------------------------
  Numbers  |                    own: xxxxxxxxxxx
  ----------------------------------
  Status   |                   lock: sim-pin2
           |         unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                  state: registered
           |            power state: on
           |            access tech: lte
           |         signal quality: 47% (recent)
  ----------------------------------
  Modes    |              supported: allowed: 3g; preferred: none
           |                         allowed: 4g; preferred: none
           |                         allowed: 3g, 4g; preferred: 4g
           |                         allowed: 3g, 4g; preferred: 3g
           |                current: allowed: 3g, 4g; preferred: 4g
  ----------------------------------
  Bands    |              supported: utran-1, utran-8, eutran-1, eutran-3, eutran-7, eutran-8, 
           |                         eutran-20, eutran-38, eutran-40
           |                current: utran-1, utran-8, eutran-1, eutran-3, eutran-7, eutran-8, 
           |                         eutran-20, eutran-38, eutran-40
  ----------------------------------
  IP       |              supported: ipv4, ipv6, ipv4v6
  ----------------------------------
  3GPP     |                   imei: xxxxxxxxxxxxxxx
           |          enabled locks: fixed-dialing
           |            operator id: xxxxx
           |          operator name: Now
           |           registration: home
           |   packet service state: attached
  ----------------------------------
  3GPP EPS |   ue mode of operation: csps-2
           |    initial bearer path: /org/freedesktop/ModemManager1/Bearer/31
           |     initial bearer apn: Internet
           | initial bearer ip type: ipv4v6
  ----------------------------------
  SIM      |       primary sim path: /org/freedesktop/ModemManager1/SIM/18

Output of

sudo cat /sys/kernel/debug/usb/devices

shows, for the device:

T:  Bus=01 Lev=03 Prnt=126 Port=02 Cnt=03 Dev#=  7 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2001 ProdID=7e3d Rev= 2.28
S:  Manufacturer=Mobile Connect
S:  Product=Mobile Connect
S:  SerialNumber=xxxxxxxxxxxxxxxx
C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=89(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

Is there any way to get ipv4 using ModemManager commands or suchlike? The capabilities clearly show it and also an ipv4 is issued from the same provider when using a different modem so not like it is locked there. It seems the device itself which is somehow forcing ipv6 only. It says on the mmcli output it should prefer ipv4v6 so why does it only issue and ipv6 and how to solve to get ipv4?

Last edited by archuser38013 (2024-05-22 18:12:22)

Offline

#2 2024-05-25 18:12:32

cryptearth
Member
Registered: 2024-02-03
Posts: 214

Re: Can I force 4g modem to use ipv4?

as I don't have a device which has a mobile modem (aside from my phone) I can't tell for sure - but from a more general networking point of view: usually you get what you request - i.e. if you only ask for an v6 ip your provider may give you an v6 ip only without serving an additional v4 ip along
it could also be that the isp for some reasons restricts mobile to v6 only as it may doesn't have enough v4 or doesn't have cgnat in place
I doubt it's an issue with the modem itself as all it really does is to do what the software tells it to - so more likely this is a config issue
have you worked your way through the wiki: https://wiki.archlinux.org/title/Mobile_broadband_modem ? from what I understand ModemManager only establishes the wireless link - but then you still need to PPP or DHCP to get an IP
as you get an IP (although only a v6 one): HOW you get it (i.e.: have you set some static or run dhcp/ppp)?

btw: for many it would be helpful to help you if you keep your seemingliy ONE big topic in ONE thread instead of spreading it across like half a dozen threads
from your history you seem to tinker around with that stuff for some time now - as mentioned by others already - it's likely you will get your issues solved easier and faster if you would just ask the new questions within the same topic after you got some answer instead of keep opening new threads in different parts of this forum
I'm no authority - but from decades of experience and common sense to me it's simple that the following threads are all related to one big topic: for some reason you want to or have to use a mobile 3g/4g modem
https://bbs.archlinux.org/viewtopic.php?id=295956
https://bbs.archlinux.org/viewtopic.php?id=295891
https://bbs.archlinux.org/viewtopic.php?id=295763
https://bbs.archlinux.org/viewtopic.php?id=295542
https://bbs.archlinux.org/viewtopic.php?id=295673
https://bbs.archlinux.org/viewtopic.php?id=295657
https://bbs.archlinux.org/viewtopic.php?id=295631
https://bbs.archlinux.org/viewtopic.php?id=295016
I'm not quite sure what your underlying issue or your intented goal is - and I understand that it is maybe not feasible for you to just buy some off-the-shelf device which you can stick a SIM into any which gets you an ethernet port and a simple to use web-frontend - but it's hard for us to offer you help in this way

honestly: those questions about suspicious used hardware and to use others' hardware to deal with it cause for some reason you don't want to use your own - to me it's just simple paranioa
if you don't trust strangers on the used market - go buy first hand from a trustworthy shop
if you don't want to risk your system but rather put others' devices in jeopardy - go buy a cheap used system you can air gap ... oh, wait, conflicts with the previous one
if you have trouble getting a "surf stick" to work due to some weird firmware or driver issues - use another one - or a whole different solution like use a phone and enable wifi-hotspot/usb-tethering (even apple allows this without jailbreak for some time now)
I'm not really sure if there really is a "solution" to your "issue" - as it's either something related to the hardware, to the mobile provider - or something personal you don't want to share but still request others to figure it anyway - in case of the latter seek for mental help

Last edited by cryptearth (2024-05-25 18:28:59)

Offline

#3 Today 02:55:14

archuser38013
Member
Registered: 2024-01-27
Posts: 51

Re: Can I force 4g modem to use ipv4?

cryptearth wrote:

as I don't have a device which has a mobile modem (aside from my phone) I can't tell for sure - but from a more general networking point of view: usually you get what you request - i.e. if you only ask for an v6 ip your provider may give you an different solution like use a phone and enable wifi-hotspot/usb-tethering (even apple allows this without jailbreak for some time now)
I'm not really sure if there really is a "solution" to your "issue" - as it's either something related to the hardware, to the mobile provider - or something personal you don't want to share but still request others to figure it anyway - in case of the latter seek for mental help

Yes I considered that it is the isp however that doesn't explain why ipv4 is provided with the older 2/3g only dongle.

I of course went through the mobile broadband wiki. The connection works fine for the older one to provide v4 and v6 but not the newer one so not sure why the difference as I use the same process both times.

I can only think maybe there is some setting on the dongle which would have to be activated as there are many different 'modes' apparently. The newer one doesn't use ppp since it uses a different interface call cdc-wdm whereas the older dongle uses ttyUSB* as their main internet port. The newer one still has ttyUSB* interfaces and I read one of those could be used on the specific device to connect with but I didn't figure out how to modeswitch to the right one. Yes I tried usb_modeswitch and I think it changed but didn't change the functionality that I could tell.

Was hard to find documentation for what to do in terms of the different modes and how to switch between them. There is another thing call 'option' which is also related to modes apparently but unsure how to access.

Ppp, from what I read only connects 3g, not 4g, which would explain why it did not use that with this new one as it is 4g. The cdc-wdm port is used for this qmi modem and wondering if I could get given an ipv4 if I were able to access the older style ttyUSB* interface but due to sparse literature on how to access I had given up.

Last edited by archuser38013 (Today 02:56:56)

Offline

Board footer

Powered by FluxBB