I'm new here, so I'm sorry if I started an already existing thread. I have a Raspberry Pi 3 with Raspbian Jessie (2017-06-21). It has SSH enabled. I just modified my cmdline.txt to set static IP. cmdline.txt looks like this:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1
root=PARTUUID=2f542d6a-02 rootfstype=ext4 elevator=deadline
fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

The ssh connection works fine on my laptop. The /etc/network/interfaces looks like this:

source-directory /etc/network/interfaces.d

auto lo iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0 iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1 iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug usb0
auto usb0 
iface usb0 inet static

I modified this file in order to SSH using USB Tethering, that works fine as well. It, however, does not work if I just boot up the Pi without the Ethernet connection.

I also made a music player using python which works, but not on boot. I used rc.local but that doesn't help. That also works if the ethernet cable is plugged in. Earlier (I don't remember which version of Raspbian I had) it worked fine.

I have also noticed a change in the earlier and the new cmdline.txt files.

You can see the music player at my blog - http://sparkthatplug.blogspot.com

YouTube - http://www.youtube.com/channel/UCF-1-bnmCXpKdTfkKkoxnaA

  • Your network file is totally messed up: make sure to have correct line ends. As it is, it doesn't parse correctly. – TheDiveO Aug 2 '17 at 18:17
  • And how do i fix it? @TheDiveO – Akshay Taneja Aug 3 '17 at 9:15
  • It now looks better. Now, decide on a single place where to put the static configuration to; I highly recommend using only /etc/dhcpcd.conf. Thus, remove the ip= boot parameters (why are you doing this after all?), and remove the static configuration form /etc/network/interfaces. Set iface usb0 inet auto as I assume(?) that your wired LAN has a dedicated DHCPv4 service running on a home router or something similar. In dhcpcd.conf set for interface usb0 then static ip_address= – TheDiveO Aug 3 '17 at 10:40
  • Please add information about your network structure to your question; without such important information it is yet unclear what you are trying to achieve. Is there a home router with DHCPv4 and default route present? – TheDiveO Aug 3 '17 at 10:40
  • @TheDiveO i understand the part of removing the ip= part from the cmdline.txt but if i do that i cannot connect to the pi in anyway, even if i put the ip= thing back in the file the ssh connection is not possible And im sure you explained in a perfect way but i'm not sure about what to do next how do i configure the dhcpcd.conf file or the interfaces file and about the router - i want to make that thing portable so why do you ask about the router (yes i do have a router to use, just in case) – Akshay Taneja Aug 13 '17 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.