LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-25-2022, 01:13 AM   #1
kzo81
Member
 
Registered: Aug 2014
Location: Hungary
Distribution: Debian, Linux Mint, CentOS
Posts: 197

Rep: Reputation: Disabled
Quectel EG25G


Hi,

I got this pull up script for a Quectel EG25 miniPCIe.

Code:
#!/bin/bash

CONN="T-Mobile"
APN="internet"

IFACE="wwan0"

nmcli connection add type gsm ifname "$IFACE" con-name $CONN apn "$APN"

echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf

# enable NAT:

iptables -t nat -A POSTROUTING -o "$IFACE" -j MASQUERADE
iptables -A FORWARD -i "$IFACE" -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o "$IFACE" -j ACCEPT


nmcli connection add type gsm ifname "$IFACE" con-name "$CONN" apn "$APN"

nmcli -t device

nmcli dev set "$IFACE" managed yes


nmcli con add type gsm con-name "$CONN" ifname "$IFACE" apn "$APN" ipv4.dns "8.8.8.8"
nmcli con up "$CONN"
However it doesnt work I got this error message:

Code:
Connection 'T-Mobile' (dfab8599-011b-4484-8d66-ef7165d7f1cc) successfully added.
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
Do you have any idea what do I do wrong? This module works perfectly in my debian laptop, now it is attached to an embedded Yocto based ARM linux module.
 
Old 02-25-2022, 08:52 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,810

Rep: Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003
Quote:
Originally Posted by kzo81 View Post
Hi,
I got this pull up script for a Quectel EG25 miniPCIe.
Code:
#!/bin/bash
CONN="T-Mobile"
APN="internet"

IFACE="wwan0"

nmcli connection add type gsm ifname "$IFACE" con-name $CONN apn "$APN"

echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf

# enable NAT:
iptables -t nat -A POSTROUTING -o "$IFACE" -j MASQUERADE
iptables -A FORWARD -i "$IFACE" -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o "$IFACE" -j ACCEPT

nmcli connection add type gsm ifname "$IFACE" con-name "$CONN" apn "$APN"
nmcli -t device
nmcli dev set "$IFACE" managed yes
nmcli con add type gsm con-name "$CONN" ifname "$IFACE" apn "$APN" ipv4.dns "8.8.8.8"
nmcli con up "$CONN"
However it doesnt work I got this error message:
Code:
Connection 'T-Mobile' (dfab8599-011b-4484-8d66-ef7165d7f1cc) successfully added.
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
Do you have any idea what do I do wrong? This module works perfectly in my debian laptop, now it is attached to an embedded Yocto based ARM linux module.
Look carefully at the error...it's trying to do something with lo (the loopback device).

Since this is a bash script, have you tried typing in the commands one at a time, to see which one fails, or done any troubleshooting?? Start at that point. Since it's different hardware, you'll probably have to modify the script.
 
Old 03-02-2022, 01:57 AM   #3
kzo81
Member
 
Registered: Aug 2014
Location: Hungary
Distribution: Debian, Linux Mint, CentOS
Posts: 197

Original Poster
Rep: Reputation: Disabled
Hi, thank you for your suggestions. It fails at the last command, even if I set the lo interface managed.
The error is the same: (device lo not available because device is strictly unmanaged)

Code:
#!/bin/bash

CONN="T-Mobile"
APN="internet"
IFACE="wwan0"

nmcli conn del "$CONN"

nmcli connection add type gsm ifname "$IFACE" con-name $CONN apn "$APN"

UUID=$(nmcli --get-values connection.uuid c show "$CONN")

nmcli dev set "$IFACE" managed yes

nmcli dev set lo managed yes

nmcli con add type gsm con-name "$UUID" ifname "$IFACE" apn "$APN" ipv4.dns "8.8.8.8"

nmcli con up "$CONN"  <-- fails here
Here are some status report:

Code:
mcli general status
STATE         CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN    
disconnected  none          enabled  enabled  enabled  enabled
Code:
nmcli device status
DEVICE  TYPE      STATE        CONNECTION 
wwan0   wwan      unavailable  --         
bond0   bond      unmanaged    --         
dummy0  dummy     unmanaged    --         
eth0    ethernet  unmanaged    --         
ifb0    ifb       unmanaged    --         
ifb1    ifb       unmanaged    --         
sit0    iptunnel  unmanaged    --         
lo      loopback  unmanaged    --         
eql     unknown   unmanaged    --
Code:
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST400> mtu 1500 qdisc noop qlen 1000
    link/ether 26:a5:37:93:71:88 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop qlen 1000
    link/ether ca:d3:9d:1d:9f:95 brd ff:ff:ff:ff:ff:ff
4: eql: <400> mtu 576 qdisc noop qlen 5
    link/slip 
5: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop qlen 32
    link/ether 72:f8:78:36:bc:96 brd ff:ff:ff:ff:ff:ff
6: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop qlen 32
    link/ether b2:e7:ff:af:34:f3 brd ff:ff:ff:ff:ff:ff
7: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:08:e1:07:33:45 brd ff:ff:ff:ff:ff:ff
    inet 10.254.255.29/24 brd 10.254.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::208:e1ff:fe07:3345/64 scope link 
       valid_lft forever preferred_lft forever
8: sit0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
9: wwan0: <BROADCAST,MULTICAST,NOARP> mtu 1500 qdisc noop qlen 1000
    link/ether 26:ee:5b:aa:be:25 brd ff:ff:ff:ff:ff:ff
Here is the error:

Code:
+ CONN=T-Mobile
+ APN=internet
+ IFACE=wwan0
+ nmcli conn del T-Mobile
Error: unknown connection 'T-Mobile'.
Error: cannot delete unknown connection(s): 'T-Mobile'.
+ nmcli connection add type gsm ifname wwan0 con-name T-Mobile apn internet
Connection 'T-Mobile' (df5c1308-2b52-4256-8243-a4b497673845) successfully added.
++ nmcli --get-values connection.uuid c show T-Mobile
+ UUID=df5c1308-2b52-4256-8243-a4b497673845
+ nmcli dev set wwan0 managed yes
+ nmcli dev set lo managed yes
+ nmcli con add type gsm con-name df5c1308-2b52-4256-8243-a4b497673845 ifname wwan0 apn internet ipv4.dns 8.8.8.8
Connection 'df5c1308-2b52-4256-8243-a4b497673845' (660d3f53-02e1-4b4d-a52d-5633c72656b8) successfully added.
+ nmcli con up T-Mobile
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
As I'm reading the mncli documentation the lo device is treated unmanaged by design.

Last edited by kzo81; 03-02-2022 at 03:03 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Quectel EG25-G kzo81 Linux - Software 7 08-23-2021 12:52 AM
Quectel EG25-G LTE modem kzo81 Linux - Newbie 3 03-23-2021 04:14 AM
LXer: 96Boards CE Extended SBC taps the quad -A7 Quectel SC20 4G module LXer Syndicated Linux News 0 05-23-2020 12:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration