Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - hirschferkel

#1
Understand, but this way I would use 2 devices instead of one... seems not the best ecologic trick. Got a feedback from the manufacturer meanwhile, and MIKROTIK cards semm to be a possible way, too. They deal with Atheros chip sets, too, but with a different series...
#2
Hi there,

I use a Varia Store APU2C4 Router with a Compex WLE200NX a/b/g/n miniPCI Wifi card (guess Atheros AR9280 Chipset). Since first installation the card produced so many problems, either because of slowness or crashes like

ath0: stuck beacon; resetting (bmiss count 8)
or ath0: device timeout

There was no way to set it up properly. So I'm considering to replace the card. Are there any recommendations, which alternativ Wifi Card would be easy to install without having to change anything regarding the OPNsense setup?

Best, hirschferkel
#3
I think you got me wrong. The Wifi is down, everything o.k it is not visible for devices anymore.
But in the Web GUI of OPNsense under Interfaces, the SSID is still marked as being active (See the screenshot)
I would have expected that it should be marked inactive, as it was switched of by the cron-job, wasn't it?

Best

Quote from: marjohn56 on September 19, 2020, 02:06:13 PM
Hence I asked in an earlier message if it was an external IF. Not sure either, but if it's built in to the gateway maybe not, as the Kernel will enable it. So test it, take the interface down and see if the SSID is still visible.
#4
:D
Quote from: marjohn56 on September 18, 2020, 11:17:17 PMJust seeing if you were awake. :)

One more question: The whole procedure was to save energy by stopping the Wifi activity while it is not being used. So I'm little bit unsure if this works this way, as the interface is down, now, but the interface still shows as being "active" in the GUI?
Any idea why it is still marked active although it was shut down by the cron job?

#5
There was a wrong set up in the files...
You named it Interface_up_down.sh


An wrote
/usr/local/etc/rc.d/interface_up_down.sh up

Now it works! Thanks for your help.
#6
Quote from: marjohn56 on September 18, 2020, 05:09:22 PM
the error you are seeing would suggest you haven't set the executable flags on the sh file, so check that.

Do you mean the 755 rights? I've set the rc.d like
drwxr-xr-x   2 root     wheel   1024 Sep 18 10:42 rc.d
and
-rwxr-xr-x  1 root  wheel    220 Sep 18 10:17 Interface_up_down.sh


# /usr/local/etc/rc.d/interface_up_down.sh down
-sh: /usr/local/etc/rc.d/interface_up_down.sh: not found

Even with the new file it does not work. I still get the 127 error?
Made a restart and
2020-09-18T19:45:00 configd.py[35743] [c0de5caa-ec09-4a6a-bc82-d7d9933daf0c] returned exit status 127

# configctl interface_up_down down
Error (127)


# /usr/local/etc/rc.d/interface_up_down.sh down
-sh: /usr/local/etc/rc.d/interface_up_down.sh: not found
#7
So the cron job is being executed, but aborted with returned exit status 127?

Quote from: marjohn56 on September 17, 2020, 10:06:59 AM
That's it, it should all work. Try and understand what's happening rather than just copy and paste, it will prove beneficial down the line if  you understand what's going on.

So i found these log entries:
2020-09-18T11:50:00 configd.py[32149] [83286599-3f93-4a5c-895d-149fcb25ad83] returned exit status 127
2020-09-18T11:50:00 configd.py[32149] [83286599-3f93-4a5c-895d-149fcb25ad83] Disabling Interface


tried to execute another test:
2020-09-18T14:14:32 configd.py[32149] [37f6a30b-8b51-41f0-8de3-fd7f528db74f] restarting cron
2020-09-18T14:14:32 configd.py[32149] OPNsense/Cron generated //var/cron/tabs/nobody
2020-09-18T14:14:32 configd.py[32149] generate template container OPNsense/Cron


same again:
2020-09-18T14:16:00 configd.py[32149] [9945d40d-1b08-47c1-b793-200f0cac8655] returned exit status 127
2020-09-18T14:16:00 configd.py[32149] [9945d40d-1b08-47c1-b793-200f0cac8655] Disabling Interface
#8
@marjohn56
I replaced the interface igb0 in the script with ath0_wlan2
e.g. ifconfig ath0_wlan2 down

Than I tried to set it up and it took me a while, as I had to enable ssh. (Did not recognize that it was not activated a while, as I was able to login ...but as I saw later connection was closed immediately afterwards)
I had to enable root, too, with ssh (Copying files did not work with admin users, which I would not have expected to fail)
I had to move the files from my home to the ssh server... was tricky to find the right way to copy from home to ssh server.
Finally I finalized all steps and created a test cron job to see if it works

   0   11   18   09   5   Test Disable   Disable Interface   
   5   11   18   09   5   Test Enable   Enable Interface

and --- it did not...
So time is 11.03 Friday 18th of September and Interface is up...

I tried a different setting:

   14   11   *   *   *   Test Disable   Disable Interface   
   15   11   *   *   *   Test Enable   Enable Interface

...11:14:30... ath0_wlan2 Interface is still up.
Doesn't work so far, too.

Rebootet.
Applied the "button"... no result. Any idea?
#9
Oh great, I'll try to set it up next days and give a feedback on it!
Thanks a lot in advance.

Best, hirschferkel
#10
No it's an OPNsense Access Point so basically the idea is right, to switch on/off a ath0 interface temporarily.
#11
Seems practicable, but where do I need to arrange the "when". Within the scripts or do I have to schedule the cron-jobs? Actually I found the reference, but it's one of those no one will ever understand. It's written for those who know how it works and don't need a description... those who need one, won't understand it.
#12
Hmm I would... if I could...
Absolutely no idea how to write such a script and how to apply it. Anny help would be really appreciated. Sounds like it would work, but as I mentioned, I have no idea how to create it...

Quote from: littlepepper on September 15, 2020, 01:41:52 PM
have you thought about writing a simple script with ifconfig <WAN interface name> down and another one for up and add it to your CRON jobs?
#13
Is there any way to activate a WAN (Wifi) and to switch it of e.g. during weekends to save energie? I was able to create a schedule, but I can only find ways to administrate services with the firewall but no way to ton on / turn of a Wifi?

Best, hirschferkel
#14
Actually all problems with

https://forum.opnsense.org/index.php?topic=7645.msg34941#msg34941
kernel       ath0: stuck beacon; resetting (bmiss count 4)

Are gone, now. So it was actually a software problem of OPNsense.

https://forum.opnsense.org/index.php?topic=13792.msg64395#msg64395
Aug 26 00:33:29 kernel: pflog0: promiscuous mode enabled
Aug 26 00:33:29 kernel: pflog0: promiscuous mode disabled
Aug 26 00:32:32 kernel: pflog0: promiscuous mode enabled


These problems are history, too... without changing anything in settings.
#15
It was a little bit laborious and time consuming, but after some failures, the bios of the APU2 was updated and OPNsense is running smooth again.

First of all you can't use the windows installer of PC Engines for APU2 which does not run TinyCore 6.4. So after running the installer you have to replace several files on the USB-stick and finally add a different bios version. If you do these steps, it should work.