# BalenaFin cannot connect Internet via 4G modem setting

**URL:** <https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780>\
**Category:** Product support\
**Tags:** network\
**Created:** [September 14, 2020, 11:14am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780 "2020-09-14T11:14:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 14, 2020, 11:14am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/1 "2020-09-14T11:14:34Z")

</div>

Hi, I currently want to achieve internet connection via 4G data card. I followed instructions from here:

> **[Network Setup on balenaOS 2.x - Balena Documentation](https://www.balena.io/docs/reference/OS/network/2.x/#cellular-modem-setup)**

  
I modified the existing resin-wifi wile as .ignore file and created a new cellular file. However, it seems like my balenafin didn’t process it well. Even I remove the data card from board, the fin is still connected to my balena cloud. Therefore, it still connects with my WIFI.

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [September 14, 2020, 1:26pm UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/5 "2020-09-14T13:26:09Z")

</div>

Hi there,  
It’s a bit odd that you’ve created the file int the /resin-boot/system-connections directory as described and it doesn’t work. Could you please create a new .img file from scratch and try again. I’d like to make sure that there are no left characters around that could block the setup.  
In case it still doesn’t work could you please share the cellular file with us to take a look?  
Thanks,  
Georgia

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 14, 2020, 1:29pm UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/6 "2020-09-14T13:29:24Z")

</div>

@georgiats Sure, I will give a try. Just wondering that if I have already burned the image to my fin, can I just simply change the resin wifi file to cellular by just connecting it with my laptop? Or do I need to re-process it from the beginning starting downloading a new image?

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [September 14, 2020, 1:38pm UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/8 "2020-09-14T13:38:25Z")

</div>

That’s a good question.  
You definitely don’t need to reflash your device. [Here is an answer](https://forums.balena.io/t/4g-gsm-connection/118586) from one of my colleagues on how to disable the wifi-connect using the network manager CLI. It’s possible that adding that resin-wifi wile as .ignore file didn’t do the trick.

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 16, 2020, 9:25am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/10 "2020-09-16T09:25:39Z")

</div>

@georgiats Hi, I tried with uploading a new image and still not working. My cellular file looks like below. Meanwhile, I also set the wifi file to .ignore file.

![image](https://global.discourse-cdn.com/balena/original/2X/d/d8f16c52aab654dfce2d69d2110d6df6f1ee7263.png)

Then I checked with NetworkManager CLI:  
 ![image](https://global.discourse-cdn.com/balena/original/2X/7/7ee38f4a6fa56a19040f35909208ac6e462c9068.png)

So, it seems like it contains both gsm setting and resin-wifi. So, how could I disable the wifi first and turn on gsm, but then I need to turn on wifi again and switch off gsm.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [September 16, 2020, 9:53am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/11 "2020-09-16T09:53:26Z")

</div>

Hello, to disable wifi you can try

` nmcli radio wifi off`

which will turn of the WiFi from the fin. Before you turn off the WiFi connection, make sure you have other ways of accessing the device, as you have with 4G, or you will lose remote access to the device.

Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 16, 2020, 9:55am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/12 "2020-09-16T09:55:44Z")

</div>

Hi @mpous That.s what I am worry about. I cannot know if the 4G works when I switch off the wifi on fin. But if doesn’t work, how can I access to the terminal window

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [September 16, 2020, 10:37am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/14 "2020-09-16T10:37:44Z")

</div>

Hi Tony

- You can access the terminal window in a couple of ways - the easiest is through the balena dashboard since your device seems to connect to balenaCloud. If you want to do this locally, you can flash the development image and connect to the device using a serial cable.
- When you say you edited the file, what was that path of the file you edited? And how did you edit it - was it by connecting the device to your computer using a USB cable?

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 16, 2020, 11:45am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/16 "2020-09-16T11:45:03Z")

</div>

@anujdeshpande Hi, yes. I edited by connecting the fin via a USB cable to laptop. I created the cellular file and set the resin-wifi file to .ignore file.

So, if I switch off wifi by `nmcli radio wifi off`, will the gsm automatically be set to use?

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [September 16, 2020, 12:42pm UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/17 "2020-09-16T12:42:51Z")

</div>

Hi Tony,  
Let’s try to make sure first that the 4G data connection works properly so that we know how to proceed.  
Could you please

1. remove the wifi file from the .ignore file
2. make sure that the wifi connection now works
3. run `nmcli radio wifi off` and see if you automatically connect to your 4G network. \_The expected behavior is that it will connect to the gsm automatically, given that the cellular file contains the right info. \_

Once we know this works we can move on and assist with further troubleshooting.

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 17, 2020, 4:03am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/19 "2020-09-17T04:03:10Z")

</div>

@georgiats So, I ran the `nmcli radio wifi off`, and the fin status shows that it is online but with no vpn connected  
 ![image](https://global.discourse-cdn.com/balena/original/2X/e/ed896308db0ed2b68630bfe43aaabed9f64600b6.png)  
And currently I cannot open the Terminal window on balena cloud to switch on the wifi getting remote access. The sim card works properly for internet connection since I tested within my phone.

I am using Quectel EC25 modem just in case.

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [September 17, 2020, 6:21am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/23 "2020-09-17T06:21:34Z")

</div>

Hi

- The Quectel EC25 is something that we use with the fin in our [GPS tracker](https://www.balena.io/blog/balena-fin-gps-tracker-project/) project as well, so that should be okay.
- Can you enable support access for the device, and send the device’s UUID to me as a private message?
- One thing that will help is to look at the `dmesg` logs as well as Network and Modem manager logs from `/var/log/journal`. Enabling persistent logging would also help - that way we can reboot the device and still have logs from the previous boot on the disk.
- If it shows online, but no VPN it might be the case that only the API is able to connect. Do you still see the logs then? Not being able to open a terminal is expected if the VPN isn’t working (see more about our device states here [https://www.balena.io/docs/learn/manage/device-statuses/#device-connectivity](https://www.balena.io/docs/learn/manage/device-statuses/#device-connectivity))

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 17, 2020, 7:02am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/24 "2020-09-17T07:02:13Z")

</div>

Sure, I PMed to you within detail

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [September 17, 2020, 7:06am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/26 "2020-09-17T07:06:34Z")

</div>

Hi

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [September 17, 2020, 7:06am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/27 "2020-09-17T07:06:52Z")

</div>

Thanks for sharing device access. Can you power cycle the device?

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 17, 2020, 7:08am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/28 "2020-09-17T07:08:38Z")

</div>

Sure, it is powered now

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [September 17, 2020, 7:17am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/29 "2020-09-17T07:17:40Z")

</div>

Hi

- It looks like the device wasn’t configured correctly for the SIM. I see that it has received just one IP - the local one from WiFi.
- I would normally ask you to connect to the device using a serial cable, but it looks like the device is using a production image and not a development one.
- In that case, can you reflash the device with your WiFi credentials included? You can do this by downloading the image from your app in balenaCloud

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 17, 2020, 8:14am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/31 "2020-09-17T08:14:49Z")

</div>

@anujdeshpande I re flashed again and PMed to you. And it seems like the gsm is prepared to connect, however, when I switched off the wifi, it is not connected.  
 ![image](https://global.discourse-cdn.com/balena/original/2X/e/e1bfe16d1fc9a8b2feed48f130e59cc0cc9ecf05.png)

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [September 17, 2020, 9:36am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/38 "2020-09-17T09:36:03Z")

</div>

Hi

Thanks for sharing access. I am taking a look now.

After flashing the device, did you make any changes?

---

<div class="post-metadata">

**Author:** ![Xia](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@Xia](https://forums.balena.io/u/Xia)\
**Post date:** [September 17, 2020, 9:37am UTC](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780/39 "2020-09-17T09:37:52Z")

</div>

@anujdeshpande Hi, I only added a same cellular file like before with no other operations

[Next page](https://forums.balena.io/t/balenafin-cannot-connect-internet-via-4g-modem-setting/188780.md?page=2)
