I have LAN and WI-FI working on my intel galileo.
Using LAN(eth0) and Wi-Fi(wlan0) interfaces I am able google.com.
But some times my Wi-Fi stops working. So I have to use galileo such that it should automatically switch to LAN if Wi-Fi stopped working and switch to Wi-Fi if LAN is not working.
I am not sure how to do this.
Please let me know if anyone have done this before.
This behavior should be automatic by default if I'm not mistaken, I'm not sure why you have to change the network manually. Could you please share a screenshot of your wpa_supplicant configuration file?
I dont think this behaviour is automatic by default.
I want to change my network automatically between Wi-Fi, LAN or 3G.
I am able to connect to internet using these modules individually.
This is what I want to achieve:
1. If LAN cable and Wi-Fi card both are connected to galileo, galileo should try to connect to internet using LAN cable. If it is not able to connect to internet using LAN cable(i.e. may be becuase LAN cable is loosely attched to it.), galileo should try to connect using Wi-fi card. If it should get successfully connected to Wi-Fi .
As now we have Wi-Fi connectivity on galileo board, insert the LAN cable and galileo board should then route data packet through LAN interface.
You should see if there's a change in the bus when you connect and disconnect the Ethernet cable, if there's a change it should be possible to write a sketch that detects this change/behavior to activate or deactivate your WiFi connection. The downside is that this sketch would be always running because it needs to check each and every time that a change in the bus takes place.
You should start with that. Checking the bus when the cable is connected.