Custom raspbian kernel + wifi monitoring?

wifi

#1

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

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

Matt.


#2

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 for the Raspberry Pi resinOS flavor, and don’t hesitate to get in touch if need help along the way.


#3

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

Matt.


#4

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. :pencil:

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 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.


#5

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 , 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.


#6

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), where you would add your own configuration group and enable that. This whole setup is using Yocto, in case you need some more info for how to modify these layers, etc. (is that right, @andrei?)


#7

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.