Help on simulation

uday kiran kaniki.uday at gmail.com
Thu Aug 11 10:50:55 EDT 2011


Thanks Jouni Malinen. I have visited the link you have referred.

When i run hostapd with the specific .conf file, i have specfied
driver=madwifi in the conf file. But it is throwing error as "Line 2:
invalid/unknown driver 'madwifi' ".

Will mac80211_hwsim run without any driver dependency ?

Thanks for your time.

-Uday

On Wed, Aug 10, 2011 at 9:30 PM, <hostap-request at lists.shmoo.com> wrote:

> Send HostAP mailing list submissions to
>        hostap at lists.shmoo.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.shmoo.com/mailman/listinfo/hostap
> or, via email, send a message with subject or body 'help' to
>        hostap-request at lists.shmoo.com
>
> You can reach the person managing the list at
>        hostap-owner at lists.shmoo.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of HostAP digest..."
>
>
> Today's Topics:
>
>   1. [PATCH] WPS: Send the credential when learning AP params in
>      registrar role (Olivier Sobrie)
>   2. Re: [ath9k-devel] DWA-556 not working as AP (sami ahokas)
>   3. Re: [ath9k-devel] DWA-556 not working as AP (sami ahokas)
>   4. Help on simulation (uday kiran)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 10 Aug 2011 00:02:02 +0200
> From: Olivier Sobrie <olivier at sobrie.be>
> Subject: [PATCH] WPS: Send the credential when learning AP params in
>        registrar       role
> To: Jouni Malinen <j at w1.fi>
> Cc: hostap at lists.shmoo.com
> Message-ID: <1312927322-11576-1-git-send-email-olivier at sobrie.be>
>
> When the supplicant acts as a registrar to learn the access point
> parameters then send the credentials to the wpa_cli interface after
> receiving the 7th message.
> When setting the option 'wps_cred_processing' to 1 or 2 in the
> wpa_supplicant.conf you should receive the credential through the
> wpa control interface.
>
> Without this patch, after the 7th message you got the WPS-CRED-RECEIVED
> notification without the credentials. This was because the cred_attr and
> cred_attr_len were not filled in in the wps structure.
>
> Signed-off-by: Olivier Sobrie <olivier at sobrie.be>
> ---
>  src/wps/wps_registrar.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
> index 2d7f632..1f964e7 100644
> --- a/src/wps/wps_registrar.c
> +++ b/src/wps/wps_registrar.c
> @@ -1592,6 +1592,29 @@ static int wps_build_ap_settings(struct wps_data
> *wps, struct wpabuf *msg)
>        return 0;
>  }
>
> +static int wps_build_ap_cred(struct wps_data *wps, struct wpabuf *msg)
> +{
> +       struct wpabuf *plain;
> +
> +       plain = wpabuf_alloc(200);
> +       if (plain == NULL)
> +               return -1;
> +
> +       if (wps_build_ap_settings(wps, plain)) {
> +               wpabuf_free(plain);
> +               return -1;
> +       }
> +
> +       wpabuf_put_be16(msg, ATTR_CRED);
> +       wpabuf_put_be16(msg, wpabuf_len(plain));
> +       wpabuf_put_buf(msg, plain);
> +       wpabuf_free(plain);
> +
> +       wps->cred.cred_attr = wpabuf_head(msg);
> +       wps->cred.cred_attr_len = wpabuf_len(msg);
> +
> +       return 0;
> +}
>
>  static struct wpabuf * wps_build_m2(struct wps_data *wps)
>  {
> @@ -2551,6 +2574,8 @@ static void wps_cred_update(struct wps_credential
> *dst,
>  static int wps_process_ap_settings_r(struct wps_data *wps,
>                                     struct wps_parse_attr *attr)
>  {
> +       struct wpabuf *msg;
> +
>        if (wps->wps->ap || wps->er)
>                return 0;
>
> @@ -2577,12 +2602,23 @@ static int wps_process_ap_settings_r(struct
> wps_data *wps,
>                 */
>                wps_registrar_pin_completed(wps->wps->registrar);
>
> +               msg = wpabuf_alloc(1000);
> +               if (msg == NULL)
> +                       return -1;
> +
> +               if (wps_build_ap_cred(wps, msg)) {
> +                       wpabuf_free(msg);
> +                       return -1;
> +               }
> +
>                if (wps->ap_settings_cb) {
>                        wps->ap_settings_cb(wps->ap_settings_cb_ctx,
>                                            &wps->cred);
> +                       wpabuf_free(msg);
>                        return 1;
>                }
>                wps_sta_cred_cb(wps);
> +               wpabuf_free(msg);
>                return 1;
>        }
>  }
> --
> 1.7.6
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 10 Aug 2011 09:30:27 +0300
> From: sami ahokas <sami.m.ahokas at gmail.com>
> Subject: Re: [ath9k-devel] DWA-556 not working as AP
> To: Pavel Roskin <proski at gnu.org>
> Cc: ath9k-devel at lists.ath9k.org, hostap at lists.shmoo.com
> Message-ID:
>        <CAL-=UpSX2v8=N8Lv7mVy=GLQWN43faBvt-rLxJxWbgihqex-oQ at mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> 2011/8/9 Pavel Roskin <proski at gnu.org>:
> > Quoting sami ahokas <sami.m.ahokas at gmail.com>:
> >
> >> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
> >> not able to set interface to master mode.
> >
> > When loading the module, use "modprobe ath_pci autocreate=ap"
> >
> > That will create an interface in AP mode. ?It's easy to get used to the
> > niceties of the kernel drivers that can change the mode of an existing
> > interface.
> >
> > --
> > Regards,
> > Pavel Roskin
> >
>
> Thanks again for your help. But now I have next problem and quick
> googling didn't give me any answers. Here is what I get from hostapd:
>
> ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
> ath0: DRIVER Error enabling WPA/802.1X!
> IEEE 802.1X initialization failed.
> ath0: Unable to setup interface.
> rmdir[ctrl_interface]: No such file or directory
>
> Why is it complaining about 802.1X? My setup is using WPA-PSK, not
> 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
> driver with wrong parameters?
>
> Sami
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 10 Aug 2011 14:41:53 +0300
> From: sami ahokas <sami.m.ahokas at gmail.com>
> Subject: Re: [ath9k-devel] DWA-556 not working as AP
> To: Pavel Roskin <proski at gnu.org>
> Cc: ath9k-devel at lists.ath9k.org, hostap at lists.shmoo.com
> Message-ID:
>        <CAL-=UpQFCKUS9X_qoB87U1ZokAkTFs829p3K2wBgJ7qe7F7PEA at mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> 2011/8/10 sami ahokas <sami.m.ahokas at gmail.com>:
> > 2011/8/9 Pavel Roskin <proski at gnu.org>:
> >> Quoting sami ahokas <sami.m.ahokas at gmail.com>:
> >>
> >>> Thanks for your reply. I chose to try the MadWifi driver, but now I'm
> >>> not able to set interface to master mode.
> >>
> >> When loading the module, use "modprobe ath_pci autocreate=ap"
> >>
> >> That will create an interface in AP mode. ?It's easy to get used to the
> >> niceties of the kernel drivers that can change the mode of an existing
> >> interface.
> >>
> >> --
> >> Regards,
> >> Pavel Roskin
> >>
> >
> > Thanks again for your help. But now I have next problem and quick
> > googling didn't give me any answers. Here is what I get from hostapd:
> >
> > ioctl[IEEE80211_IOCTL_SETPARAM]: Invalid argument
> > ath0: DRIVER Error enabling WPA/802.1X!
> > IEEE 802.1X initialization failed.
> > ath0: Unable to setup interface.
> > rmdir[ctrl_interface]: No such file or directory
> >
> > Why is it complaining about 802.1X? My setup is using WPA-PSK, not
> > 802.1X. Do I miss some modules or have I compiled hostapd or madwifi
> > driver with wrong parameters?
> >
> > Sami
> >
>
> I got that one fixed myself. Some of the kernel modules wasn't copied
> to my target and therefore those errors. So I finally got hostapd
> running but I got lot of messages about Stuck beacon:
>
> wifi0: ath_bstuck_tasklet: Stuck beacon; resetting (beacon miss count: 11)
>
> Have I understand correctly that this is a persistent bug that no one
> has managed to solve? At least at madwifi project page there is a
> story about stuck beacon problem that seems to be open.
>
> Sami
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 10 Aug 2011 17:41:39 +0530
> From: uday kiran <kaniki.uday at gmail.com>
> Subject: Help on simulation
> To: hostap at lists.shmoo.com
> Message-ID:
>        <CAOeh9Mur5CF5d+FXo6iOo_ZjvRYFAddvg7mQCajR6gCizw4Bpw at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all
>
> I am a newbie to Wi-Fi. Currently i dont have the wi-fi hardware available
> with me. So I want to try out hostapd and wpa_supplicant in some kind of
> simulation environment. Could some one please suggest me how to set up a
> simulation environment ?
>
> -Uday
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.shmoo.com/pipermail/hostap/attachments/20110810/3b401c0d/attachment.html
>
> ------------------------------
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
>
> End of HostAP Digest, Vol 100, Issue 14
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110811/98deed31/attachment-0001.htm 


More information about the HostAP mailing list