I'm currently trying to simulate bad signal/traffic in a wireless environment by trying to randomly flip bits in a packet. Specifically, I am trying to flip the bits in the data section of a TCP packet (maybe.. flip 1 bit every 5 packets?) I know this will make the router non-functional but the whole point of this is to have a simulation of a environment where the router is not transmitting properly for some reason.

With that, there are no packages in OpenWRT that are able perform what I am trying to do. With the only exception of Airpwn (however the wireless driver is not supported by Airpwn).

With nowhere else to look, my search has extended into the wireless drivers of the Raspberry Pi 3B, otherwise known as brcmfmac. However as I cannot find much information about the program flow of the wireless driver, I would like seek help from the community if anyone knows how will I be able to edit the way the router transmit the bits?

1 Answer 1


Not an answer to the question as it stands, but why not use simulation tools for lossy WLAN that are already available?

With the mac80211_hwsim module, you can simulate an arbitrary number of virtual WLAN interfaces that can talk to each other via a "virtual ether", and on top of that you can snoop the transmitted frames on an additional interface.

wmediumd builds on this and allows to simulate frame loss and delay, so you can see how the higher level algorithms behave. (No bit flipping, though).

As for the original question, I guess there's nothing to do but read kernel code (a lot of it). Also, if you bit flip you'll have to deal with the checksums on the various levels, which may either error correct or just throw the frame away (so the result is identical to what wmediumd does).

  • Thanks a lot for your suggestion. However this experiment deals with the physical environment instead of a virtualized one, therefore capturing the packets within a virtual interface is not enough to show any useful results. I appreciate your input.
    – Alan
    Commented Aug 2, 2018 at 23:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .