All in a day’s work!

My friend Nirav Uchat and I got an excellent experience of what happens if are trying to modify parts of code while we do not know anything about some other dependent parts. As a part of our MTech project, we are modifying some drivers. The part of the driver that communicates with the underlying hardware, called HAL code, was a black box for us until today morning. We wanted to add a functionality in the driver and had been struggling with the known parts of the driver for about a month now, without making any progress.

Today morning, we got the news that the HAL code has now been released by the manufacturers. After we got access to the HAL code, it took us only a few hours to find out what needed to be done to successfully add the required functionality. We were also relieved to know that we could have never found out the solution without either the HAL code, or knowing about some hardware register details. The solution did not exist in the parts that were accessible to us for the past month.

In case you are interested in what we are doing, I will briefly describe it. We are using wifi cards and madwifi driver to enable TDMA communication instead of CSMA in wifi. We did not have access to the Atheros HAL. We wanted to get SWBA beacon interrupts from the HAL to define slot boundaries in TDMA. The HAL timer is much more accurate than the kernel timers (we are not using a real-time kernel).

Advertisement

Tags: ,

2 Responses to “All in a day’s work!”

  1. Kaladhar Musunuru Says:

    Hi Ashutosh,
    I am trying to implement TDMA time slot based protocol instead of CSMA using madwifi drivers. I had read lot of information on this site towards that direction. Could you please give me your valuable inputs to accomplish my goal.

    Thanks,
    -Kaladhar.

  2. Ashutosh Dhekne Says:

    Hi Kaladhar,

    We are ourselves figuring out how to use the hardware timers to use it in TDMA. What we have been able to do up till now is the following:
    1. Disable CSMA by turning off hardware ack and hardware ack expectations. Disabled backoff by using a cwin window of 0. Used monitor mode to send and receive packets.
    2. Read the hardware time by using the gettsf64 function (not the exact function name).
    3. Set the hardware timers that we got from looking at the beacon functions in the HAL code. You may find the description of how to do that from our posts to the madwifi mailing lists.

    Hope this helps you. We have not completed our tasks yet, and hence our knowledge is also in a state of constant flux. Please confirm any observations that we have made before going ahead.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.