simply use geographical addressing to assign a NIC name rather than this MAC based crap - and you're done:
[HOWTO] assign predictable WLAN device names without fiddling with MAC addrs - Raspberry Pi Forums
simply use geographical addressing to assign a NIC name rather than this MAC based crap - and you're done:
I understand the fact that Foundation follows Debian, and I was anticipating Predictable Network Names. My problem was with the backflip.ShiftPlusOne wrote: ↑Tue Dec 05, 2017 8:10 amNothing to do with the Foundation at all. We follow Debian and this came as a result of the move to Stretch.Milliways wrote: My problem is that the Foundation FINALLY introduced Predictable Network Names,
There was a flood of people complaining and saying it's the worst thing ever. Also, at the time of release, dhcpcd would grab the interface and the rename would fail. Having it only sort of kind of work defeats the point of it. Based on the feedback on the forum, a discussion in the office and the renaming issue, we took it out. Recognising that some users would prefer predictable names, the option was added to raspi-config. A later version of dhcpcd fixed the interface renaming issue.Milliways wrote:only to get cold feet 3 weeks later
Then why come across so aggressive and say were over a year behind when we definitely weren't? I can understand getting frustrated when things don't work the way you want, but that's no excuse to take it out on other people. We reverted back to the old naming scheme because that's what people seem to prefer here.Milliways wrote: I understand the fact that Foundation follows Debian, and I was anticipating Predictable Network Names
What documentation is missing? How would you have liked to have been presented with the information?Milliways wrote: This makes the lack of documentation doubly inexcusable.
I can't answer every single question. If somebody asks politely and the information isn't easy to find, I make an effort.Milliways wrote: My questions on this site have not elucidated any further information about these alleged problems.
Rudeness aside, that was already addressed on the first page of the thread:Milliways wrote: I don't know what the "failing predictable interface names" is supposed to be but apparently the 2017-09-07 release
That problem has since been fixed.ncguk wrote: ↑Mon Aug 21, 2017 12:24 pmI also spotted this:Code: Select all
Aug 16 01:22:50 raspberrypi systemd-udevd[152]: error changing net interface name 'eth0' to 'enx8cae4cf9e087': Device or resource busy Aug 16 01:22:50 raspberrypi systemd[1]: Started Load/Save RF Kill Switch Status. Aug 16 01:22:50 raspberrypi systemd-udevd[152]: could not rename interface '3' from 'eth0' to 'enx8cae4cf9e087': Device or resource busy
I didn't see that question, but again, https://www.freedesktop.org/wiki/Softwa ... faceNames/Milliways wrote: Can you please explain HOW so I can undo the change. (I know I could do a forensic analysis to find this myself.)
I am sorry if you took my comments as aggressive, that was not my intention, although I often seem to tread on people's toes. Your "quote" misrepresents my statement, by omitting the remainder of the sentence I actually posted.ShiftPlusOne wrote: ↑Tue Dec 05, 2017 10:11 amThen why come across so aggressive and say were over a year behind when we definitely weren't? I can understand getting frustrated when things don't work the way you want, but that's no excuse to take it out on other people. We reverted back to the old naming scheme because that's what people seem to prefer here.Milliways wrote: I understand the fact that Foundation follows Debian, and I was anticipating Predictable Network Names
What documentation is missing? How would you have liked to have been presented with the information?Milliways wrote: This makes the lack of documentation doubly inexcusable.
All the necessary information is the first hit on any search engine if you search for anything relating to predictable network interface names.
https://www.freedesktop.org/wiki/Softwa ... faceNames/
I can't answer every single question. If somebody asks politely and the information isn't easy to find, I make an effort.Milliways wrote: My questions on this site have not elucidated any further information about these alleged problems.
Rudeness aside, that was already addressed on the first page of the thread:Milliways wrote: I don't know what the "failing predictable interface names" is supposed to be but apparently the 2017-09-07 releaseThat problem has since been fixed.ncguk wrote: ↑Mon Aug 21, 2017 12:24 pmI also spotted this:Code: Select all
Aug 16 01:22:50 raspberrypi systemd-udevd[152]: error changing net interface name 'eth0' to 'enx8cae4cf9e087': Device or resource busy Aug 16 01:22:50 raspberrypi systemd[1]: Started Load/Save RF Kill Switch Status. Aug 16 01:22:50 raspberrypi systemd-udevd[152]: could not rename interface '3' from 'eth0' to 'enx8cae4cf9e087': Device or resource busy
I didn't see that question, but again, https://www.freedesktop.org/wiki/Softwa ... faceNames/Milliways wrote: Can you please explain HOW so I can undo the change. (I know I could do a forensic analysis to find this myself.)
I would advise a centralized, public, issue-tracking and resolution mechanism which is meticulously monitored and maintained by technical staff. We search there first to see if a particular issue has been reported (e.g. Wifi connections under Stretch), if a resolution has yet been sanctioned by the development team, or if not, to report a problem (issue). Googling is a killer, points to every bottomless rabbit hole on the planet, so frustrating! The Foundation's Issue logs should be on the RaspberryPi.org website under the Troubleshooting or (perhaps new) Issue Logs designation.ShiftPlusOne wrote: ↑Tue Dec 05, 2017 8:01 amWhat issues would that be and how would you have done it instead? Every change has been made for a good reason and has been the result of changes upstream.PorterDon wrote: ↑Tue Dec 05, 2017 7:37 amUnbelievable and unacceptable the Foundation somehow allowed these issues to flood us. I still can't get my Zero to bloody connect to wifi correctly on a static IP after hours of chasing rabbits! I don't know how the upgrade to Stretch was "managed" for wifi connection -- but I'd say somebody deserves a little "chat" at the water cooler. The Foundation has taken many, many harmful hits as a result of all this totally avoidable nonsense.
https://github.com/rpi-distro/repo/issues or the forum are both suitable places.PorterDon wrote: ↑Tue Dec 05, 2017 10:41 amI would advise a centralized, public issue-tracking and resolution mechanism which is meticulously monitored and maintained by technical staff. We search there first to see if a particular issue has been reported (e.g. Wifi connections under Stretch) and if a resolution has yet been sanctioned by the development team. Googling is a killer, points to every bottomless rabbit hole on the planet, so frustrating! The Foundation's Issue logs should be on the RaspberryPi.org website under the Troubleshooting or Issues Logs designation.
No problem, I probably just misread the tone of the messages.Milliways wrote: I am sorry if you took my comments as aggressive, that was not my intention, although I often seem to tread on people's toes.
Yeah, that's understandable.Milliways wrote: Unless I missed something the announcements about the Stretch release https://www.raspberrypi.org/blog/raspbian-stretch/ did not mention this significant change of behaviour.
Neither was I critical of the late implementation of predictable interface names, which I understand. I admit I was anticipating the change, and was surprised when it was dropped - admittedly mentioned in the release notes (which I suspect few people read), but again conspicuously absent from the Blog.
One of the problems with Raspberry Pi users (as distinct from users of most mainstream GUI based distributions) is that they seem to have an unreasonable fixation with setting static IP addresses, and thus need to know details of interfaces, and any changes are significant to a large number of users.ShiftPlusOne wrote: ↑Tue Dec 05, 2017 10:56 amOur release notes have the more technical changes, but not the ones we get from upstream. Debian's release notes for stretch are a 42 page document, which we can't really merge with ours.
https://www.debian.org/releases/stretch ... face-names
Perhaps we should include a link to upstream release notes when applicable.
No, I thought the RaspberryPi.org was the best place to get the most current, official response. Forum posts can be duplicative or yet more misleading, and are also pulled by Google. That is why I specified "centralized". I've learned I am best off staying away from Github. Tends to be more low-level than I usually want.ShiftPlusOne wrote: ↑Tue Dec 05, 2017 10:56 amhttps://github.com/rpi-distro/repo/issues or the forum are both suitable places.PorterDon wrote: ↑Tue Dec 05, 2017 10:41 amI would advise a centralized, public issue-tracking and resolution mechanism which is meticulously monitored and maintained by technical staff. We search there first to see if a particular issue has been reported (e.g. Wifi connections under Stretch) and if a resolution has yet been sanctioned by the development team. Googling is a killer, points to every bottomless rabbit hole on the planet, so frustrating! The Foundation's Issue logs should be on the RaspberryPi.org website under the Troubleshooting or Issues Logs designation.
Did you post a thread about the problem you're having?
Noted.Milliways wrote: ↑Tue Dec 05, 2017 11:12 amOne of the problems with Raspberry Pi users (as distinct from users of most mainstream GUI based distributions) is that they seem to have an unreasonable fixation with setting static IP addresses, and thus need to know details of interfaces, and any changes are significant to a large number of users.
Raspberry Pi is not a large company, especially on the engineering side. We appreciate and rely on community support and volunteers. I think what we have (the forum and github) is a good combination of community support and direct input from the engineers who work on the hardware and software. If it was all centralised in a single issue tracker, I don't think we'd be able to keep up and get work done at the same time.PorterDon wrote: No, I thought the RaspberryPi.org was the best place to get the most current, official response. Forum posts can be duplicative or yet more misleading, and are also pulled by Google. That is why I specified "centralized". I've learned I am best off staying away from Github. Tends to be more low-level than I usually want.
Code: Select all
dnsmasq[449]: unknown interface wlan0
dnsmasq[449]: dnsmasq: unknown interface wlan0
systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
dnsmasq[449]: FAILED to start up
systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server
Code: Select all
Restart=on-failure
If you are using dnsmasq, do you also have hostapd running?saxicola wrote: ↑Tue Jan 09, 2018 7:54 pmI see:in journalctlCode: Select all
dnsmasq[449]: unknown interface wlan0 dnsmasq[449]: dnsmasq: unknown interface wlan0 systemd[1]: dnsmasq.service: Control process exited, code=exited status=2 dnsmasq[449]: FAILED to start up systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server
The problem I see is that dnsmasq is up before the wlan0 interface, so obviously it fails. I fixed this by adding:
to the [service] section of /lib/systemd/system/dnsmasq.service.Code: Select all
Restart=on-failure
Code: Select all
started disabled WiFi if country not set.
Code: Select all
pi@raspberrypi:~$ sudo -s
pi@raspberrypi:~$ export LANGUAGE=en_US.UTF-8
pi@raspberrypi:~$ export LANG=en_US.UTF-8
pi@raspberrypi:~$ export LC_ALL=en_US.UTF-8
pi@raspberrypi:~$ locale-gen en_US.UTF-8
pi@raspberrypi:~$ dpkg-reconfigure locales
Simple physics - your WiFi dongles generally have a better antenna than the one built into the PiZeroW board.No sure what the deal with the Pizero W is, it seems to have very poor range, compared to Pizero with a Wifi dongle
This work for me... But is it good idea to use this in production???tfcb wrote: ↑Thu Aug 17, 2017 10:45 pmI don't understand the wpa_supplicant subsystem at all but here is a workaround to my issue:
Rather than run the generic wpa_supplicant.service I am now running the interface specific version.
Here are the commands I used:
sudo cp wpa_supplicant.conf wpa_supplicant-wlan0.conf
sudo systemctl disable wpa_supplicant.service
systemctl enable wpa_supplicant@wlan0.service
After this I now have Wifi working across reboots. With any luck someone with actual knowledge will fill in some of the blanks.
BTW, sudo ifup wlan0 still returns ifup: unknown interface wlan0.
Ugh.
Code: Select all
#!/bin/bash
my_network='192.168.1.1' # used to ping my network router to confirm WiFi connection
# Change WiFi Country by editting /etc/wpa_supplicant/wpa_supplicant.conf
echo 'Stopping current network service'
sudo dhcpcd -k
echo 'Changing network settings (and restarting the network)'
echo 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="my_home_network"
psk="my_home_password"
key_mgmt=WPA-PSK
id_str="home"
priority=5
}
network={
ssid="my_school_network"
psk="my_school_password"
key_mgmt=WPA-PSK
id_str="school"
priority=1
}
' | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null
# Restart the network
sudo dhcpcd -n
# Change preferences for US, Central Time
# Edit keyboard in /etc/default/keyboard
echo 'Update keyboard layout to US English'
echo '# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT=us
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
' | sudo tee /etc/default/keyboard > /dev/null
# Change locale (local language used) by editting /etc/locale.gen and using locale-gen
echo 'Update locale to US English'
echo '# File generated by update-locale
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
' | sudo tee /etc/default/locale > /dev/null
sudo locale-gen en_US.UTF-8
# Change timezone with timedatectl
echo 'Updating the timezone to US Central Time'
sudo timedatectl set-timezone US/Central
# Change Interfaces by
# Add SSH
echo 'Enabling SSH'
sudo systemctl enable ssh
# Add VNC
echo 'VNC is *not* enabled yet'
# Add update alias ('up') to ~/.bashrc file to allow you to run frequent commands easily
echo 'Adding aliases'
ALIASES_FILE_PATH=$HOME/.bash_aliases
# Deleting dublicate aliases
sed -i "/alias up/d" $ALIASES_FILE_PATH
echo 'alias up="sudo dpkg --configure -a; sudo apt install --fix-broken; sudo apt update; sudo apt upgrade -y; sudo apt dist-upgrade -y; sudo apt autoremove --purge -y; sudo apt autoclean -y"' >> $ALIASES_FILE_PATH
# Loading aliases
source $ALIASES_FILE_PATH
# wait for network to be up (since it was changed) before proceeding
while ! ping -c 1 -W 1 ${my_network}; do
echo "Waiting for the network (WiFi) to come up..."
sleep 3
done
# Update a new Raspberry Pi system (using just-created 'up' alias)
up
# Netatalk -- allows Pi to be seen as a networked device on Mac OS (and Windows?)
sudo apt install netatalk -y
# Expect
sudo apt install expect -y
# Reset password from 'raspberry'
password_commands='
set timeout -1
set username "pi"
set password "a very short password"
spawn sudo passwd $username
expect "New password:"
send "$password\r"
expect "Retype new password:"
send "$password\r"
expect "passwd: password updated successfully"
'
/usr/bin/expect -c "${password_commands//
/;}"
# Python Version to be installed (here 3.6.5 - change as needed)
python_version='3.6.5'
# future: use "$ python3.6 --version" for find out the exact version, and update only if older
cd ~
sudo apt install -y gcc make libssl-dev zlib1g-dev build-essential
sudo apt install -y libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev
sudo apt install -y libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev
wget https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tar.xz
tar xJf Python-${python_version}.tar.xz
cd Python-${python_version}
./configure --enable-optimizations
make -j 8
sudo make altinstall
cd ..
sudo rm -r Python-${python_version}
rm Python-${python_version}.tar.xz*
sudo apt autoremove --purge -y
# Pipenv
sudo pip3 install pipenv
mkdir programs
cd programs
pipenv --python ${python_version}
exit
cd ~
# Re-start the Pi
sudo reboot
Code: Select all
$ cd Desktop
$ sudo chmod +x update.sh
$ ./update.sh