# Custom raspbian kernel + wifi monitoring?

**URL:** <https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796>\
**Category:** Product support\
**Tags:** wifi\
**Created:** [April 17, 2017, 2:58pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796 "2017-04-17T14:58:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![qmnonic](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/qmnonic/32/361_2.png) [@qmnonic](https://forums.balena.io/u/qmnonic)\
**Post date:** [April 17, 2017, 2:58pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/1 "2017-04-17T14:58:03Z")

</div>

Anyone have any insight into whether it’s possible to create a custom raspbian kernel with wifi monitoring enabled, via resin ?

For example, this is how i would do it on a normal raspberry pi zero (or CM3) deploy - [https://raspberrypi.stackexchange.com/questions/36747/enable-monitoring-mode-for-rtl8188cus-via-usb-on-raspbian](https://raspberrypi.stackexchange.com/questions/36747/enable-monitoring-mode-for-rtl8188cus-via-usb-on-raspbian)

I would love to do the same via resin, but not sure if it’s possible.

Matt.

---

<div class="post-metadata">

**Author:** ![jviotti](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jviotti/32/220_2.png) [@jviotti](https://forums.balena.io/u/jviotti)\
**Post date:** [April 17, 2017, 3:59pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/2 "2017-04-17T15:59:32Z")

</div>

Hey there!

resinOS is an open source project, so you can re-build it for a particular board to add any customization you might need. Check [https://github.com/resin-os/resin-raspberrypi](https://github.com/resin-os/resin-raspberrypi) for the Raspberry Pi resinOS flavor, and don’t hesitate to get in touch if need help along the way.

---

<div class="post-metadata">

**Author:** ![qmnonic](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/qmnonic/32/361_2.png) [@qmnonic](https://forums.balena.io/u/qmnonic)\
**Post date:** [April 21, 2017, 7:06pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/3 "2017-04-21T19:06:56Z")

</div>

Awesome - is there an example of how to modify/change the resin-raspberrypi (or other) OS? I’m not sure where to start…

Matt.

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [April 22, 2017, 6:17pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/4 "2017-04-22T18:17:50Z")

</div>

Hi, looking at the current kernel (4.4.8) in the `2.0.0+rev3` release of resinOS, it comes with the `rtl8192cu` driver enabled - that’s the part that you wanted to add? Or is there any other thing that you needed to change? Have you gave that version of resinOS a try?

What exact changes / steps would you need monitoring to be enabled? The StackOverflow question is quite old, and would be good to have a specific list to see how to facilitate that for you. ✏

If you still need to modify the image, the repository above have the information how to build it in the README. The kernel info you would need to change in the `meta-raspberrypi` layer. In [`meta-raspberrypi`](https://github.com/agherzan/meta-raspberrypi) you’d need to change the settings within relevant files in the `recipes-kernel/linux/` directory. That’s some work with Yocto, the build system we use, but should be able to find many resources online on how to work with that.

---

<div class="post-metadata">

**Author:** ![qmnonic](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/qmnonic/32/361_2.png) [@qmnonic](https://forums.balena.io/u/qmnonic)\
**Post date:** [May 11, 2017, 3:20pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/5 "2017-05-11T15:20:26Z")

</div>

I actually need the rtlwifi modules enabled and the rtl8192cu drivers disabled. The rtlwifi drivers include monitoring capabilities, the other drivers do not.

I outlined the process for enabling this on an older version of raspbian here - [http://stackoverflow.com/questions/32703715/enable-monitoring-mode-for-rtl8188cus-via-usb-on-raspbian](http://stackoverflow.com/questions/32703715/enable-monitoring-mode-for-rtl8188cus-via-usb-on-raspbian) , which involves recompiling the kernel (enabling/disabling modules in the KConfig and makefiles). Not sure how to apply these same steps to the resin way of doing things.

Any help would be greatly appreciated.

Thanks,

Matt.

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [May 11, 2017, 4:30pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/6 "2017-05-11T16:30:09Z")

</div>

We have some development planned that would help with this quite abut, but it’s not yet ready, unfortunately (will keep you posted for sure)

In the meantime probably you would need to dig into `resin-raspberrypi` and check the readme there how to compile things. The configurations are usually in recipes, so would think you would need to change the kernel configuration in the relevant layers/recipes, e.g in (I think) `/layers/meta-resin-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend` ([this](https://github.com/resin-os/resin-raspberrypi/blob/master/layers/meta-resin-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%25.bbappend)), where you would add your own configuration group and enable that. This whole setup is using [Yocto](https://www.yoctoproject.org/), in case you need some more info for how to modify these layers, etc. (is that right, @andrei?)

---

<div class="post-metadata">

**Author:** ![qmnonic](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/qmnonic/32/361_2.png) [@qmnonic](https://forums.balena.io/u/qmnonic)\
**Post date:** [May 18, 2017, 2:16pm UTC](https://forums.balena.io/t/custom-raspbian-kernel-wifi-monitoring/796/7 "2017-05-18T14:16:27Z")

</div>

I will admit, I’m a little unsure how to work with the configs you referenced to get a non-standard driver working.

I’d love to figure this out - manually maintaining hundreds of units is a real pain!

Matt.
