motioneye-project / motioneyeos

A Video Surveillance OS For Single-board Computers
Other
7.9k stars 904 forks source link

wpa_supplicant for Access point #2018

Open usbrit opened 5 years ago

usbrit commented 5 years ago

Does anyone have a working wpa_supplicant file A P use on a P0W? I am struggling to understand what I should be using at the moment. Thanks

GadgetAngel commented 5 years ago

if you are trying to just use your wireless card on raspberry pi here is what I used ( but it does not work in the latest version 20190728, it will work on version 20190427):

NOTE: ensure that your Line feeds in the file are Linux type (I use the editor "notepad++" on windows to do this) Here is the text for wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US

network={ ssid="SSID NAME" psk="your password" key_mgmt=WPA-PSK }

If you think you have the correct information in your wpa_supplicant for Access Point then I suggest your try version 20190427 of motioneyeOS

usbrit commented 5 years ago

Thanks for this, but tried it and no luck. For some reason motioneyeOS doesn't see the supplicant and looks for a wired network. Used Notepad++ still get the boot loop.

GadgetAngel commented 5 years ago

Did you try a different version?

Sent from my iPhone

On Jul 30, 2019, at 8:18 AM, usbrit notifications@github.com wrote:

Thanks for this, but tried it and no luck. For some reason motioneyeOS doesn't see the supplicant and looks for a wired network. Used Notepad++ still get the boot loop.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jasaw commented 5 years ago

@usbrit You ignored the issue template and didn't provide any information on what you're trying to do and what problem you're encountering and what your hardware set up is like. Please answer all those questions and perhaps someone might be able to help you.

usbrit commented 5 years ago

Sorry, how do I do that now the thread is open? Thanks, David

On Mon, Aug 5, 2019 at 1:33 AM jasaw notifications@github.com wrote:

@usbrit https://github.com/usbrit You ignored the issue template and didn't provide any information on what you're trying to do and what problem you're encountering and what your hardware set up is like. Please answer all those questions and perhaps someone might be able to help you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ccrisan/motioneyeos/issues/2018?email_source=notifications&email_token=AMXTKQ4UFLL2WDSYA3266HTQC5YPJA5CNFSM4IHP3OAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QM7PY#issuecomment-518049727, or mute the thread https://github.com/notifications/unsubscribe-auth/AMXTKQ7LCJKEHX2URVXOCF3QC5YPJANCNFSM4IHP3OAA .

jasaw commented 5 years ago

Just answer the below questions:

usbrit commented 5 years ago

Just answer the below questions: I need to set up access point on your Pi (as described in the thread description) This is so I can access MEOS files directly WITHOUT the need for a secondary network.

What problem did you encounter? What error messages did you see? After following the instructions here: https://github.com/ccrisan/motioneyeos/wiki/WiFi-Access-Point (files created with Notepad++ with linux eol setting) I get a panic reboot at the line wpa_supplicant, since no supplicant file causes a search for a wired network that does not exist on a pi zero W.

Step by step of what you did.-As above, followed all the instructions, always reformatted and etched image each time I tried. I can join the pi zero W to a network without problems, so I know my process is good, just need to no how to circumvent the search for a wired network.

Thanks, David

jasaw commented 5 years ago

I presume you have created /boot/hostapd.conf and /boot/dnsmasq.conf by following the instructions. If you don't want the Pi to connect to an existing network, you'll need to set OS_NETWORKLESS=true in /boot/os.conf file. It's easy to miss this step in the wiki. For more info about os.conf, read this: https://github.com/ccrisan/thingos/wiki/os.conf

usbrit commented 5 years ago

OK, Thanks, didn't see that. Will give it a go.

usbrit commented 5 years ago

So... how to edit os.conf on a Pi Zero W with no network?? Can't access the boot partition from Windows or Ubuntu. Can't SSH/Putty (no network) Do I have to:

Thanks, David

jasaw commented 5 years ago

If you have a Linux machine, you can pull the SD card out and edit the /data/etc/os.conf file directly. Otherwise, connect your Pi to Ethernet and SSH into it to modify /data/etc/os.conf Last resort is to reflash the SD card and create /boot/os.conf before first boot.

usbrit commented 5 years ago

Reflashed the SD card and create /boot/os.conf before first boot.

Now boots and reports IP as 192.168.27.1/24 But can't see a network or connect to it as a hidden network from PC or android phone. Can anyone see any issues please? TIA David

Here's my hostapd.conf:

ssid=s#####1 wpa_passphrase=c######h wpa=2 wpa_key_mgmt=WPA-PSK interface=wlan0 channel=1 driver=n180211 hw_mode=n ieee80211n=1 ieee80211ac=1

Here's my dnsmasq.conf:

interface=wlan0 dhcp-range=192.168.27.50,192.168.27.150,24h dhcp-leasefile=/data/dnsmasq.leases

Here's my os.conf:

OS_DEBUG="false" OS_PRERELEASES="false" OS_TTY_LOGIN="tty1" OS_ETH="eth0" OS_WLAN="wlan0" OS_PPP="ppp0" OS_NETWORKLESS="true" OS_COUNTRY="GB" OS_FIRMWARE_METHOD="github" OS_FIRMWARE_REPO="ccrisan/thingos" OS_FIRMWARE_USERNAME="" OS_FIRMWARE_PASSWORD=""

ccrisan commented 5 years ago

@usbrit how did you end up having OS_FIRMWARE_REPO="ccrisan/thingos"? I'm not saying it has anything to do with your issue, I'm just trying to figure out where can that setting be found on motionEyeOS.

usbrit commented 5 years ago

@ccrisan I needed a clean version of the os.conf file as I could not edit the /data/etc/os.conf (no linux access), so under File Location And Role on this page: https://github.com/ccrisan/thingos/wiki/os.conf#os_networkless I found the link to os.conf and copied file from there to add it to the /boot before first boot. https://github.com/ccrisan/thingos/blob/master/board/common/overlay/etc/os.conf

Still no luck accessing as an access point. Is there something I need to do to broadcast the SSID?

Thanks

antonio-a2m commented 5 years ago

I made a motioneyeos-to-go, to use as a dashcam using rbp zeroW. After reading the comments of this hread, and some failures, I succeded. Here are the steps I followed:

That way, I was able to join my new AP and access the UI through the browser on 172.16.0.1 and configure the options available, like the timezone, and video settings. However, since I never connected to the Internet, the date was set in 1970 and so the recording files were not labeled correctly. Besides, I wasn't able to ssh to my device, since my rbp was configured as networkess (even though it became an AP). So, to fix that, I had to plug the rbp to a monitor and a keyboard and did the following:

Voilá, my homemade dashcam is working now, and I can ssh to it. I guess the same must be done in order to have samba and ftp working, but I do not need that.

I hope someone finds this info userful