Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkManager connections for each prime type #63

Merged
merged 5 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ COPY --chown=root:root ./userspace/motd/* /etc/update-motd.d/
COPY ./userspace/files/10-globally-managed-devices.conf /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
COPY ./userspace/files/NetworkManager.conf /etc/NetworkManager/NetworkManager.conf

# Add LTE connection
COPY ./userspace/files/lte.nmconnection /usr/lib/NetworkManager/system-connections/
RUN chmod 600 /usr/lib/NetworkManager/system-connections/lte.nmconnection
# Add cellular connections
COPY ./userspace/files/*.nmconnection /usr/lib/NetworkManager/system-connections/
RUN chmod 600 /usr/lib/NetworkManager/system-connections/*.nmconnection

# Prefer ipv4 over ipv6
RUN echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf
Expand Down
29 changes: 29 additions & 0 deletions userspace/files/blue-prime.nmconnection
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[connection]
id=blue-prime
uuid=d3e5a78d-7286-4656-b53a-53b5fd372ea3
type=gsm
interface-name=cdc-wdm0
permissions=
autoconnect=true
autoconnect-retries=100
autoconnect-priority=1

[gsm]
apn=Broadband
home-only=true
sim-operator-id=310410

[ipv4]
route-metric=1000
dns-priority=1000
dns-search=
method=auto

[ipv6]
ddr-gen-mode=stable-privacy
dns-search=
route-metric=1000
dns-priority=1000
method=auto

[proxy]
7 changes: 3 additions & 4 deletions userspace/files/lte.nmconnection
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ uuid=6586fb1f-4a66-46d4-9164-0100b73750ee
type=gsm
interface-name=cdc-wdm0
permissions=
autoconnect=yes
autoconnect-retries=0
autoconnect=true
autoconnect-retries=100

[gsm]
auto-config=yes
home-only=yes
auto-config=true

[ipv4]
route-metric=1000
Expand Down
28 changes: 28 additions & 0 deletions userspace/files/magenta-prime.nmconnection
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[connection]
id=magenta-prime
uuid=5bf787ca-ba77-4eda-9018-8cbde60ad2c7
type=gsm
interface-name=cdc-wdm0
permissions=
autoconnect=true
autoconnect-retries=20
autoconnect-priority=1

[gsm]
apn=fast.t-mobile.com
sim-operator-id=310240

[ipv4]
route-metric=1000
dns-priority=1000
dns-search=
method=auto

[ipv6]
ddr-gen-mode=stable-privacy
dns-search=
route-metric=1000
dns-priority=1000
method=auto

[proxy]
3 changes: 0 additions & 3 deletions userspace/usr/comma/comma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ fi
# sudo because udev isn't ready yet
sudo $(which python3) /usr/comma/set_time.py

# TODO: why is this necessary when this is in the connection settings?
nmcli connection modify --temporary lte gsm.auto-config yes
nmcli connection modify --temporary lte gsm.home-only yes

while true; do
pkill -f "$SETUP"
Expand Down