Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,024 Views

Intel Edison Routing Table Resetting Automatically

Hi all. I've been using Intel Edison for some time for a project. I've setup the wifi to upload some data. Recently, I've been trying to work with a 3G dongle. The dongle is a Huawei dongle that connects to the Edison via USB.

I use WVDial and PPP to connect the dongle to the internet.I manually change the "/etc/resolv.conf" file to contain the following content:

nameserver 8.8.8.8

nameserver 8.8.4.4

I also manually change the routing table to this:

default via 10.64.64.64 dev ppp0

10.64.64.64 dev ppp0 src 10.194.197.111

192.168.0.0/24 dev wlan0 src 192.168.0.164

192.168.2.0/24 dev usb0 src 192.168.2.15

The dongle works and I can connect to the internet. However, when I leave the dongle connected overnight, I notice that the routing table and the "/etc/resolv.conf" file reset automatically to this:

nameserver 203.116.0.36

nameserver 203.116.1.78

default via 192.168.0.1 dev wlan0

10.64.64.64 dev ppp0 src 10.194.197.111

192.168.0.0/24 dev wlan0 src 192.168.0.164

192.168.2.0/24 dev usb0 src 192.168.2.15

This means that the dongle connection is lost and the Edison is now using the Wifi to connect to the internet.

I'm not able to understand this behaviour. Why is the routing table being reset automatically without any human intervention? Is it some setting inside Edison?

0 Kudos
7 Replies
idata
Community Manager
35 Views

Hello ankurgupta2212,

 

 

I will try to help you with this. Have you noticed that this happens at a specific time? Or is this reset not consistent?

 

 

In case you are not sure, you can create a simple script that creates a log that keep track of the connection, for example like this:

 

 

# !/bin/bash

 

x=1

 

while [ $x = 1 ]

 

do

 

date >> /home/root/connection.log

 

ifconfig >> /home/root/connection.log

 

sleep 5

 

done

 

 

Try that and let me know if you notice a pattern.

 

We'll be waiting for your update.

 

-Peter.
idata
Community Manager
35 Views

Hi. I'm currently in Singapore so time here is GMT + 8. Whenever I leave the system running overnight, I see that it resets at night. Once it reset at 0524 here which is 2124GMT and another time it reset at 0254 here which is 1854GMT. Previous times as well, the reset was happening at night but I didn't note down the timings.

I'm not able to figure out if the reset happens at an absolute time or if it resets at a time relative to the start of the 3G dongle, maybe 12 hours after the dongle starts.

Edit: I'm going through the two overnight logs I have. I notice that the interface resets 12 hours after the dongle starts in both cases. I don't know if this is a coincidence.

idata
Community Manager
35 Views

I'm not sure what might be causing this issue, however, if we can determine a pattern in the disconnection, we can create a service that detects automatically and reconnects to the 3G dongle.

 

So, if it is possible, I'd suggest you to collect data over the weekend to be sure if the issue appears 12 hours after it begins to work or to determine if there is an specific time that causes it (for example midnight).

 

 

Let me know how it goes and if you are able to collect more data.

 

-Peter.
idata
Community Manager
35 Views

Hi. The interface was changing over the weekend as well so I created the service that changes it back and reconnects to the dongle.

idata
Community Manager
35 Views

I'm glad to hear that. Even though this behavior is very strange I'm happy that you were able to find a workaround for it. If it's not a problem I would like to ask you to share the service with the community, this information might be helpful for other users.

-Peter.

idata
Community Manager
35 Views

Hi Sure. I coded it out in bash.

function checkInterface {

a="$(ip route)"

IFS=' ' read -r -a array <<< "$a"

b="${array[2]}"

if [ "$b" != "10.64.64.64" ] ; then

echo "The interface had changed! Changing it back!" >> $file

switchOnWVDIAL

fi

}

The "10.64.64.64" IP address is specific to the 3G dongle. The 'switchOnWVDIAL' function is also specific to the 3G dongle.

idata
Community Manager
35 Views

Thanks a lot for sharing this information. If you ever have any other issue, please don't hesitate to come back to the community, we'll try to help you in any way we can.

 

 

-Peter.
Reply