Can you run a bluetooth keyboard in OPNsense?

Started by Old_Rager, November 30, 2024, 02:16:12 AM

Previous topic - Next topic
Hi Guys,

I've been having heaps of problems with my bare metal OPNsense unit when downloading files.  This results in me regularly having to reboot the NUC running OPNsense.  Once rebooted, the network comes back up.  When I reboot the device, I always have to manually plug in a USB keyboard to be able to log back on.

What would help is me being able to access the NUC via a Bluetooth keyboard, but I've done quite a few searches on the topic and have come up empty handed.  If I cannot run a Bluetooth keyboard, is there a way for it to automatically login as root without me needing to enter the username and password?  Additionally, does anyone have any thoughts on while downloading either by torrents, or very recently, it crashing about 4 times when downloading some games over Steam?!?  🤔

Any thoughts here would be greatly appreciated...  😉

What about a KVM?

https://pikvm.org/
https://jetkvm.com/
https://github.com/sipeed/NanoKVM

A relay can also remotely control the power. I use this one for a bunch of NUCs
https://thepihut.com/products/8-relay-card-v2-for-raspberry-pi

In spite of all that, OPNsense shouldn't hang that often. Check RAM, cooling, etc. and postmortem your logs.

Bart...

I have no issues with bluetooth keyboards. For instance from Logitech.


On top of that what do you mean by login as root? You need to be more precise.

Yes, it is possible to login via ssh as root. Just add a key to the user and use that key to login.

December 06, 2024, 01:08:10 AM #3 Last Edit: December 06, 2024, 01:35:55 AM by Old_Rager
Fastboot,

When the OPNsense box drops internet connection, I have to plug in a USB keyboard when I reboot the device so that I can login.  If the device automatically logged into root upon boot up, then I would not need to worry about a keyboard at all for the device as I access it from another device via MS Edge.

Bart,

I'm not sure how to view the logs post-mortem.  As I have to reboot the device each time, are not the logs wiped?  As I cannot access 192.168.1.1 when the device crashes, I cannot get to see what's going on.  When I reboot the device and I look at what I think are the logs, there are hundreds of entries.  Do you know of a link that you could point me to that might help here at all?

I seriously want to make OPNsense work for me, but I am still struggling with how to set it up.

1. Give people access to my Plex server from outside my network.
2. See my HD Homerun device that is on my network.
3. And being able to do large file downloads without crashing is vital for me.

I am kind of using a KVM device of sorts.  My TV has three inputs and my Bluetooth Logitech keyboard and mouse are able to connect to three different devices at the push of a button.  Thus why I was hoping to get Bluetooth working. In a previous post, someone said that the bottom line in the boot up script (as per the attached pic) was to do with Bluetooth - but I honestly have no idea.

I live in a small 2BR unit and as such, space is of a premium.  In fact, I'm running two PCs in one from a single Phantek Enthoo Evolv X PC case.  One being my main rig and the other being the dedicated Plex server.  The NUC is in another very tight location but can be connected to the TV by a 10m HDMI 2.1 cable run that is run through the walls and ceiling.  Thus, running Bluetooth would mean that rebooting the device would only require the push of a button.  Or, as I said to someone else, if I could get it to automatically login as root by way of a script or something, then there would be no need for a keyboard at all, yes?  Or, am I supposed to access the logs directly from the NUC using the CLI access - I.E., directly from the NUC itself?!?

Again, any help that you can provide would be greatly appreciated!!!  😉

The logs are in /var/log which you can access via SSH or option 8 on the console. They persist between reboots. I'm not sure why you want to automatically log in. Remote access is more secure and convenient.

Doing a post-mortem from the logs involves a bit of detective work. /var/log/system/latest should have some clues but it can be tricky.

If you would rather reduce the problem than analyse it, go through these:

- run a stress test on your hardware https://www.stresslinux.org/sl/
- start with a minimal OPNsense config; NAT only IPv4
- add features and run the crash trigger, i.e. your file download

These should lead you to a prime suspect, either hardware or software. Repair, replace or file a bug report.

Bart...

Hey Bart,

Thank you for that - will give it a shot over the next few days...  😉

Dave.

For the actual problem I venture a guess that the NICs are Realtek. OP can you check? If yes, can you try with the vendor's driver (plugins: os-realtek-re) ?

Hey,

I tried reaching out to my NUC manufacturer, and they didn't reply.  Have just asked question again.

Having said the above, no-one has responded as to whether OPNsense supports Bluetooth devices or not.  Does anyone know whether there is a way to get Bluetooth to work under OPNsense?!?

I have a Logitech KB that supports Bluetooth ONLY connectivity with up to 3 devices.  Unfortunately, this keyboard does not support USB.

Can we back up a bit...
Quote from: Old_Rager on December 06, 2024, 01:08:10 AMWhen the OPNsense box drops internet connection, I have to plug in a USB keyboard when I reboot the device so that I can login.
Why?

My Opnsense boxes are similarly bare metal without fripperies of screen or keyboard. This is absolutely normal. They are managed by SSH or web browser access, including on reboot. This is why there are no answers about Bluetooth keyboards -- attached/BT keyboards are superfluous. I see you manage with MS Edge, so what is your need to login as root on the NUC before logging in to Opnsense as root via SSH or browser?

Is it the case that you need to login to a NUC, rather than this being an Opnsense problem? Is Opnsense virtualised on it?
Deciso DEC697
+crowdsec +wireguard

Quote from: Old_Rager on March 03, 2025, 03:00:15 AMI tried reaching out to my NUC manufacturer
Intel sold the NUC product line to Asus. Most NUC's have a header that mirrors the power switch. https://www.intel.com/content/www/us/en/support/articles/000007309/intel-nuc.html which is what I use for remote power control.

USB keyboards are handled by the BIOS while BT usually need OS support, thus making them less suitable for emergency reboots.

Bart...