This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Beaglebone Black Packet Sniffer application, Promiscuous Mode possible?

Hello, I have been working with the Starterware examples and got the Echo and HTTP server applications working fine.  However, I am looking to use the Beaglebone as a packet sniffer and log all network traffic.  I don't see anything in the code about promiscuous mode, as this is often referred to as.  What modifications do I need to make to go from a client or listener to something that can receive all network packets?

Thanks in advance,

  • Hello Gregg,

    BBB uses the AM335x series of processors.For the promiscuous mode of operation u have bypass the address lookup Engine(ALE) .This option is available in the ALE_CONTROL Register.u have to play around the buffer descriptors to find the actual data.For my observation if the BYPASS mode is on,the CRC also coming with the data.U mention that logging is required,please note that starterware is bare metal software that dont have any file system for logging files. 


    cheers

    Rama Krishna

  • Thanks for the information, and to clarify, I have built the examples and ran them standalone and also imported them into our custom RTOS, which does have a file system for logging data.  I will look into bypassing the ALE and see what progress I can make.  If there are any code examples that would show an implementation of something like this it would be very appreciated.  

  • I have bypassed the ALE but what else needs to happen to allow all packets to make it to the ISR?

  • Hello Gregg,

                          As i tested on EVMSK Board in Dual MAC mode,After bypassing the ALE all packets are coming  with CRC as a payload and the bit for CRC in receive descriptor are also set. I simply discard the last four bytes by decreasing the packet length by 4.

    what else needs to happen to allow all packets to make it to the ISR?

    As of my concern no changes are required in the code.

    ALE Bypass code is as follows.

    baseaddr is ALE_SUBSS

    #define CPSW_ALE_CONTROL_ALE_BYPASS 0x10

    #define CPSW_ALE_CONTROL  0x8

    void CPSWALEBypassEnable(unsigned int baseAddr)
    {
        HWREG(baseAddr + CPSW_ALE_CONTROL) |= CPSW_ALE_CONTROL_ALE_BYPASS;
    }

     

     

    Cheers

    Rama Krishna

  • Thank you Rama for the advice.  I have successfully set the bypass bit in that register.  I do it after initial setup and right before it asks for the Switch Configuration while loop.  However, I am only getting getting ISR's for packets sent out in broadcast mode or addressed directly to me.  There must be something else that has to be done.  I know that there is lots of activity on the network because I am running WireShark and can see the different nodes talking to each other every little bit.  

    I have put a printf in the ISR and that only shows up on the console output when I get a broadcast packet or when I directly ping it.  

    Would you be able to zip together the working project where you did this with the EVMSK? Perhaps we could compare the fundamental differences and see what is different.

    Thanks,

  • I am supplying the zipped project folder that has the project in question in hopes somebody will take a look at it. All I have read is that ALE needs to be bypassed, but apparently there is something more that need to happen to send the packet on. Here is the link. dropbox.com/s/fznycn85xb68374/EnetExample.zip?dl=0 – user2744063