Stuck at "Starting AP in a screen"
See original GitHub issueHey there,
I tried to run start_flash.sh
but the script always gets stuck at Starting AP in a screen
.
I am running a fresh Raspbian Buster Lite on a Raspberry Pi Zero W.
Contents of smarthack-wifi.log
Attempting to stop wpa_supplicant
Configuring AP interface...
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlan0...
Configuration file: hostapd.conf
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:d5:5a:06 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: AP-STA-CONNECTED c0:ee:fb:d2:23:77
wlan0: AP-STA-DISCONNECTED c0:ee:fb:d2:23:77
wlan0: AP-STA-CONNECTED c0:ee:fb:d2:23:77
Attempting to stop wpa_supplicant
Configuring AP interface...
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlan0...
Configuration file: hostapd.conf
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:d5:5a:06 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: AP-STA-CONNECTED c0:ee:fb:d2:23:77
Attempting to stop wpa_supplicant
Configuring AP interface...
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlan0...
Configuration file: hostapd.conf
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:d5:5a:06 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
Attempting to stop wpa_supplicant
Configuring AP interface...
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlan0...
Configuration file: hostapd.conf
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr b8:27:eb:d5:5a:06 and ssid "vtrust-flash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
Log of ./start_flash.sh
Checking for network interface wlan0... Found.
Checking UDP port 53... Occupied by dnsmasq with PID 477.
Port 53 is needed to resolve DNS queries
Do you wish to terminate dnsmasq? [y/N] Y
Attempting to stop dnsmasq.service
Checking UDP port 67... Available.
Checking TCP port 80... Available.
Checking TCP port 443... Available.
Checking UDP port 6666... Available.
Checking UDP port 6667... Available.
Checking TCP port 1883... Occupied by mosquitto with PID 462.
Port 1883 is needed to run MQTT
Do you wish to terminate mosquitto? [y/N] y
Attempting to stop mosquitto.service
Checking TCP port 8886... Available.
======================================================
Starting AP in a screen....
Log of bash -x start_flash.sh
Show
++ tput bold + bold='' ++ tput sgr0 + normal='' ++ cut -d . -f 2 ++ screen --version + screen_minor=06 + '[' 06 -gt 5 ']' + screen_with_log='sudo screen -L -Logfile' + . ./config.txt ++ WLAN=wlan0 ++ AP=vtrust-flash ++ GATEWAY=10.42.42.1 + ./stop_flash.sh + pushd scripts + . ./setup_checks.sh ++ . ../config.txt +++ WLAN=wlan0 +++ AP=vtrust-flash +++ GATEWAY=10.42.42.1 ++ check_eula ++ '[' '!' -f eula_accepted ']' ++ check_config ++ iw list ++ grep -q '* AP' ++ echo -n 'Checking for network interface wlan0... ' Checking for network interface wlan0... ++ '[' -e /sys/class/net/wlan0 ']' ++ echo Found. Found. ++ check_port udp 53 'resolve DNS queries' ++ protocol=udp ++ port=53 ++ reason='resolve DNS queries' ++ echo -n 'Checking UDP port 53... ' Checking UDP port 53... +++ sudo ss -Hlnp -A udp 'sport = :53' +++ head -n1 +++ grep -Po '(?<=pid=)(\d+)' ++ process_pid=477 ++ '[' -n 477 ']' +++ ps -p 477 -o comm= ++ process_name=dnsmasq ++ echo 'Occupied by dnsmasq with PID 477.' Occupied by dnsmasq with PID 477. ++ echo 'Port 53 is needed to resolve DNS queries' Port 53 is needed to resolve DNS queries ++ read -p 'Do you wish to terminate dnsmasq? [y/N] ' -n 1 -r Do you wish to terminate dnsmasq? [y/N] y++ echo++ [[ ! y =~ ^[Yy]$ ]] +++ ps -p 477 -o unit= +++ grep .service +++ grep -Ev ‘^user’ ++ service=dnsmasq.service ++ ‘[’ -n dnsmasq.service ‘]’ ++ echo ‘Attempting to stop dnsmasq.service’ Attempting to stop dnsmasq.service ++ sudo systemctl stop dnsmasq.service ++ sleep 1 ++ check_port udp 67 ‘offer DHCP leases’ ++ protocol=udp ++ port=67 ++ reason=‘offer DHCP leases’ ++ echo -n 'Checking UDP port 67… ’ Checking UDP port 67… +++ sudo ss -Hlnp -A udp ‘sport = :67’ +++ grep -Po ‘(?<=pid=)(\d+)’ +++ head -n1 ++ process_pid= ++ ‘[’ -n ‘’ ‘]’ ++ echo Available. Available. ++ check_port tcp 80 ‘answer HTTP requests’ ++ protocol=tcp ++ port=80 ++ reason=‘answer HTTP requests’ ++ echo -n 'Checking TCP port 80… ’ Checking TCP port 80… +++ grep -Po ‘(?<=pid=)(\d+)’ +++ head -n1 +++ sudo ss -Hlnp -A tcp ‘sport = :80’ ++ process_pid= ++ ‘[’ -n ‘’ ‘]’ ++ echo Available. Available. ++ check_port tcp 443 ‘answer HTTPS requests’ ++ protocol=tcp ++ port=443 ++ reason=‘answer HTTPS requests’ ++ echo -n 'Checking TCP port 443… ’ Checking TCP port 443… +++ sudo ss -Hlnp -A tcp ‘sport = :443’ +++ head -n1 +++ grep -Po ‘(?<=pid=)(\d+)’ ++ process_pid= ++ ‘[’ -n ‘’ ‘]’ ++ echo Available. Available. ++ check_port udp 6666 ‘detect unencrypted Tuya firmware’ ++ protocol=udp ++ port=6666 ++ reason=‘detect unencrypted Tuya firmware’ ++ echo -n 'Checking UDP port 6666… ’ Checking UDP port 6666… +++ head -n1 +++ sudo ss -Hlnp -A udp ‘sport = :6666’ +++ grep -Po ‘(?<=pid=)(\d+)’ ++ process_pid= ++ ‘[’ -n ‘’ ‘]’ ++ echo Available. Available. ++ check_port udp 6667 ‘detect encrypted Tuya firmware’ ++ protocol=udp ++ port=6667 ++ reason=‘detect encrypted Tuya firmware’ ++ echo -n 'Checking UDP port 6667… ’ Checking UDP port 6667… +++ grep -Po ‘(?<=pid=)(\d+)’ +++ sudo ss -Hlnp -A udp ‘sport = :6667’ +++ head -n1 ++ process_pid= ++ ‘[’ -n ‘’ ‘]’ ++ echo Available. Available. ++ check_port tcp 1883 ‘run MQTT’ ++ protocol=tcp ++ port=1883 ++ reason=‘run MQTT’ ++ echo -n 'Checking TCP port 1883… ’ Checking TCP port 1883… +++ sudo ss -Hlnp -A tcp ‘sport = :1883’ +++ grep -Po ‘(?<=pid=)(\d+)’ +++ head -n1 ++ process_pid=462 ++ ‘[’ -n 462 ‘]’ +++ ps -p 462 -o comm= ++ process_name=mosquitto ++ echo ‘Occupied by mosquitto with PID 462.’ Occupied by mosquitto with PID 462. ++ echo ‘Port 1883 is needed to run MQTT’ Port 1883 is needed to run MQTT ++ read -p 'Do you wish to terminate mosquitto? [y/N] ’ -n 1 -r Do you wish to terminate mosquitto? [y/N] y++ echo
++ [[ ! y =~ ^[Yy]$ ]] +++ ps -p 462 -o unit= +++ grep -Ev ‘^user’ +++ grep .service ++ service=mosquitto.service ++ ‘[’ -n mosquitto.service ‘]’ ++ echo ‘Attempting to stop mosquitto.service’ Attempting to stop mosquitto.service ++ sudo systemctl stop mosquitto.service ++ sleep 1 ++ check_port tcp 8886 ‘run MQTTS’ ++ protocol=tcp ++ port=8886 ++ reason=‘run MQTTS’ ++ echo -n 'Checking TCP port 8886… ’ Checking TCP port 8886… +++ sudo ss -Hlnp -A tcp ‘sport = :8886’ +++ grep -Po ‘(?<=pid=)(\d+)’ +++ head -n1 ++ process_pid= ++ ‘[’ -n ‘’ ‘]’ ++ echo Available. Available.
- echo ====================================================== ======================================================
- echo -n ’ Starting AP in a screen’ Starting AP in a screen+ sudo screen -L -Logfile smarthack-wifi.log -S smarthack-wifi -m -d ./setup_ap.sh
- ping -c 1 -W 1 -n 10.42.42.1
- printf . .+ ping -c 1 -W 1 -n 10.42.42.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
I am now officially the stupidest person alive. Of all my messing around I’ve forgot that I’m connected to the Pi with SSH… No wonder it’s losing its connection… Sorry for wasting your time.
But
wlan0: Could not connect to kernel driver
might be a bug withhostapd
.That’s exactly what happened to me. I do everything on Raspberries via SSH. Had to buy a keyboard for flashing. Thank you for pointing this out.