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

Support for Raspberry Pi 3 #11

Open
MkLHX opened this issue Jan 6, 2020 · 17 comments
Open

Support for Raspberry Pi 3 #11

MkLHX opened this issue Jan 6, 2020 · 17 comments

Comments

@MkLHX
Copy link

MkLHX commented Jan 6, 2020

Hi there!
I forked the repo to make some test with this script.
https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP

I have some troubles on RPI3A who run raspbian buster, when i run the configure.sh script with args after reboot i can see the AP ssid and i can use it! But if i reboot the RPI, il loose the AP mode and i can't access on the RPI through ssh.
It's look like in second state....
Then i have to reboot the RPI a second time and the AP reappears.

EDIt: find something

On boot hostapd can't start and give an error. So i chech journalctl -ex and hostapd give:

-- L'unité (unit) hostapd.service a commencé à démarrer.
janv. 07 16:19:32 timelapse hostapd[1340]: Configuration file: /etc/hostapd/hostapd.conf
janv. 07 16:19:32 timelapse hostapd[1340]: ctrl_iface exists and seems to be in use - cannot override it
janv. 07 16:19:32 timelapse hostapd[1340]: Delete '/var/run/hostapd/ap0' manually if it is not used anymore
janv. 07 16:19:32 timelapse hostapd[1340]: Failed to setup control interface for ap0
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: Unable to setup interface.
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: interface state UNINITIALIZED->DISABLED
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: AP-DISABLED
janv. 07 16:19:32 timelapse hostapd[1340]: ap0: CTRL-EVENT-TERMINATING
janv. 07 16:19:32 timelapse hostapd[1340]: hostapd_free_hapd_data: Interface ap0 wasn't started
janv. 07 16:19:32 timelapse hostapd[1340]: nl80211: deinit ifname=ap0 disabled_11b_rates=0
janv. 07 16:19:33 timelapse systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE

So i'm looking for any explaination about the errors :
"ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/hostapd/ap0' manually if it is not used "
So i have to find where put the command: sudo rm -rf /var/run/hostapd/ap0
when interface exist cause when i delete it, the hostapd service start.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@lukicdarkoo
Copy link
Owner

This script works only for Raspberry Pi Zero W. I failed to make it work on Raspberry Pi 3, but if you managed to run AP+client mode simultaneously please share the steps with me and I will integrate into the script.

@MkLHX
Copy link
Author

MkLHX commented May 11, 2020

Hi @lukicdarkoo

Just see my forked project to make it works on rpi3 b+ and rpi3 a+
https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP

@lukicdarkoo
Copy link
Owner

Cool! You brought it to another level!

I am not sure whether is a good idea to integrate the changes or just to redirect the users. I guess, for now, all users who need support for Raspberry Pi 3 should check your fork.

@lukicdarkoo lukicdarkoo changed the title get some troubles Support for Raspberry Pi 3 May 11, 2020
@lukicdarkoo lukicdarkoo pinned this issue May 11, 2020
@lukicdarkoo
Copy link
Owner

I renamed and pinned the issue, so users can find it more easily.

@moinologics
Copy link

@lukicdarkoo is there any script for raspberry pi 4B???

@MkLHX
Copy link
Author

MkLHX commented Oct 25, 2020

hi @Programmingplanet did try this on RPI4B ? => https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP

I don't have any RPI4 to test it. If you can it will be great to know if it's work on it.

@moinologics
Copy link

ok, I will reply after testing it.

also, I suggest working on this on an exiting project called raspap-webgui if possible

@MkLHX
Copy link
Author

MkLHX commented Oct 25, 2020

@Programmingplanet lol i've tested raspap and this not work well (for me) and i just need shell script for my use case. So you can provide my repo on raspap project to give altenative ;-)

Good test.

@moinologics
Copy link

getting this -----------

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Populate /etc/udev/rules.d/70-persistent-net.rules

Populate /etc/dnsmasq.conf

Populate /etc/hostapd/hostapd.conf

Populate /etc/default/hostapd

Populate /etc/wpa_supplicant/wpa_supplicant.conf

Populate /etc/network/interfaces

Populate /bin/manage-ap0-iface.sh

Create hostapd ap0 error monitor crontask
no crontab for root

----- no success

@MkLHX
Copy link
Author

MkLHX commented Oct 26, 2020

as you can read at the end. You need cron on your server and we assume you have an existing crontab .

EDIT:
@Programmingplanet you can test last 1.1 release i changed dependencies check.

@FunkyKwak
Copy link

Hi,

Thanks a lot for your work and for the share !

I am trying to make this work on a fresh RPI3B+ with RPI OS Lite.

I was getting the exact same error as @Programmingplanet. So I simply created a crontab using sudo crontab -e, and added a comment in there.
Now I don't have the message no crontab for root anymore, but I still have this one Create hostapd ap0 error monitor crontask.

Thanks a lot for your help !

@MkLHX
Copy link
Author

MkLHX commented Jan 20, 2021

hi @FunkyKwak
that not an error, maybe bad english sentence but not an error
https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP/blob/master/ap_sta_config#L315

@ImanolGo
Copy link

ImanolGo commented Mar 4, 2021

@MkLHX I've just tested it on the Raspberry Pi 4B, running the Raspbian GNU/Linux 10 (buster) Lite and it's running smoothly.
However, I had the same issue as @FunkyKwak to edit the cron file manually using "sudo crontab -e". For some reason using I cannot use "sudo crontab -l" to add directly a line. Have you encountered the same problem?

@MkLHX
Copy link
Author

MkLHX commented Mar 16, 2021

@ImanolGo
Sorry for late answer.

I never get this kind of issue.

What's happened when you edit crontab -e?
And then get crontab -l ?

What version of code are you using?

@ImanolGo
Copy link

@MkLHX so the main problem is calling the script as super user using "sudo". "crontab -l" complains "no crontab for root".
However editing manually with "sudo crontab -e" works.

@MkLHX
Copy link
Author

MkLHX commented Mar 27, 2021

@MkLHX so the main problem is calling the script as super user using "sudo". "crontab -l" complains "no crontab for root".
However editing manually with "sudo crontab -e" works.

The script need to be run with sudo rights. So that use the sudo crontab and need the crontab exists.

Maybe there is a solution to automate it. I haven't time to search and test it for now...

@MkLHX
Copy link
Author

MkLHX commented May 19, 2021

hi there i've just push a release 1.7 who fix the crontab error
and i open issues on the repo, i don't know why they're closed untill today.

https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP/releases/tag/1.7.2

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

5 participants