Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi Connect not displaying login credentials page on Raspberry Pi 3B+ (on-board wifi) #309

Closed
rscottcarson opened this issue Aug 21, 2019 · 1 comment

Comments

@rscottcarson
Copy link

I am setting up Wifi Connect on a Raspberry Pi 3B+ as part of our docker image.

We are successfully able to start wifi-connect (we can tell by the logs and the AP is active). However, when we connect to the Wifi Connect network on a mobile device, the "Sign in to network" notification shows, but when it is pressed we are brought to a blank page instead of the login credentials portal. If the user attempts to navigate to a webpage (i.e. www.google.com), we are not redirected to the login credentials portal either. It seems as though the webpage is not being served properly, or we have simply misconfigured something.

I have included our Dockerfile.template and start.sh script below:

Dockerfile.template:

FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:latest

RUN sudo apt-get -y update && \
    sudo apt-get -y install bluez build-essential cmake git libglib2.0-dev dnsmasq network-manager openjdk-8-jdk pkg-config sqlite3 wireless-tools && \
    sudo apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
ENV DBUS_SYSTEM_BUS_ADDRESS unix:path=/host/run/dbus/system_bus_socket

WORKDIR /usr/src/wifi-connect
RUN curl https://api.github.com/repos/balena-io/wifi-connect/releases/latest -s \
    | grep -hoP 'browser_download_url": "\K.*%%BALENA_ARCH%%\.tar\.gz' \
    | xargs -n1 curl -Ls \
    | tar -xvz -C /usr/src/wifi-connect/

WORKDIR /app
COPY ./gateway.tar ./
RUN tar -xvf gateway.tar
COPY ./start.sh ./
CMD ./start.sh

start.sh:

#!/usr/bin/env bash

# 2. Is there Internet connectivity?
nmcli -t g | grep full

if [ $? -eq 0 ]; then
  printf 'Skipping WiFi Connect\n'
else
  printf 'Starting WiFi Connect\n'
 ../usr/src/wifi-connect/wifi-connect
fi

./gateway-1.0-SNAPSHOT/bin/gateway
@rscottcarson
Copy link
Author

Closed due to problem being solved. Documentation should emphasize that wifi-connect must be run from it's own directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant