aragats said:
I couldn't find a way to read/set rfkill switch in FreeBSD. Is it possible? Does anybody know?
Having relied on it in the past, I truly believed something like
rfkill actually existed for FreeBSD, but your post suggested me to go checking out, so I discovered I was wrong. Since I assume the button is connected to some gpio pin (isn't it?), what I was thinking it could be done is using
gpioctl() no enable it. Maybe something like this:
Code:
gpioctl -lv
gpioctl -f /dev/gpioc0 -c *pin* OUT
gpioctl -f /dev/gpioc0 *pin* 1
However I doubt the system would recognize the gpio chip in the first place; probably running
sysctl -a
may provide an answer. Then you could try recompiling the kernel with the correct device using the gpio bus system. If you remember
Phishfry is a true adept on the topic and opened many threads regarding gpio driver support for some chips through
nctgpio(github) -
nctgpio(BugZilla)kernel module, to which he seems to have contributed, as well as Gonzo's
bytgpio driver. Gonzo appears to have also developed some
wrappers. I do not know if ever this work could be applied to your case, as I do not not much about this kind of hardware, but I hope I provided some sorta hint. Anyway Phishfry might be really helpful in working this out.
Best regards