Search code examples
connectionraspberry-pi3internet-connectionhuawei-mobile-services

Usb internet key & Raspberry: disable internet connection, used only for sms


I would like to use a USB internet Key Huawei E3531i for send and receive SMS. I'm working on it, I can send but I have some issue receiving but this is not the topic of this thread.

When I plug the USB stick the Raspberry (connected to wireless lan) doesn't have access to internet any more. Most probably because somehow the internet key is considered as preferred connection but I don't have idea how to change this.

The best for me would be that the USB stick is not used at all for internet connection, even the wireless lan is not available.

How to configure this? Thanks Andrea


Solution

  • SOLVED! Editing the file: /etc/dhcpcd.conf

    Adding the metric for each interface. In this way I can drive the priority of routing for internet connection:

    interface wlan0
    metric 200
    
    interface eth1
    metric 300
    

    The smaller number has higher priority.

    Now I'm able to reach the internet key with his static ip address but also connecting to internet because the default interface is the wifi.

    Bye Andrea