I'm building a smartphone controlled quadrotor and I have been following this guide from here.
Everything was good, until I realised I could no longer use other interfaces over my pi. I have no idea why and how this has happened, but earlier I used to connect my pi to my laptop via an ethernet cable and use RDP to work on it. But now I'm unable to access any networking interface on my pi. Even if I plug in an external WiFi adapter (USB) it doesn't seem to detect. The following, I believe, should be needed
Contents of /etc/network/interfaces
# comments
source-directory /etc/network/interfaces.d
auto lo
auto eth0
iface lo inet dhcp
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet static
<As shown in the link>
Output of ifconfig -a shows an ethernet interface and an external USB WiFi adapter, but their identifiers are something like enx{Mac}, wln{Mac}. But wlan0 is just fine.
When I remove all of these configuration information from the /etc/network/interfaces file and simply leave it as was default, the interfaces work, but now have interface identifiers followed by Mac addresses. For eg, ethernet interface comes up as enx{Mac}. Wlan0 is fine, but when I insert the external WiFi adapter it shows as wln{Mac}.
I have prepared a fresh SD card with the same operating system (both run the latest raspbian stretch), and in that everything works just fine.
My objectives I would want to meet are:
- I want to be able to use other interfaces also, like eth0, wlan1 apart from the wlan0 that I use for hotspot
- I want to know if there is an easy way to switch the configurations so that when I don't need a hotspot, I'd be able to use everything just like a normal pi would do. In the sense use eth0, wlan0 etc to simply connect to the internet.
Any help would be appreciated.
Thanks.
systemd
actually pre-dates stretch, but things are definitely moving towardssystemd
for init (startup) scripts. – bobstro Jan 04 '18 at 18:51