Skip to main content
flyer31
Senior
May 27, 2013
Question

USB host interface for WiFi USB adapter?

  • May 27, 2013
  • 3 replies
  • 2197 views
Posted on May 27, 2013 at 13:55

Hi,

I would like to connect an STM32 board into a WiFi network, to exchange a LOW amount of data from time to time (for control / data sampling, only some 100 Bytes per minute or so).

Concerning hardware requirements, I think the easiest solution would be to use the STM32 USB interface in host mode, and then connect a ''WiFi USB adapter'', which you get already for 15$ upwards as add-on for PC or Raspberry-Pi.

Can anybody give me some hints how to communicate with such a ''WiFi USB adapter'' (e. g. at digikey you get a ''Adapter 802.11n Wifi USB'' from ''LM Techologies''). Is this very much effort? Best of course would be, if some demo software would be available, e. g. for STM32F4Discovery or so.
    This topic has been closed for replies.

    3 replies

    Andrew Neil
    Super User
    May 27, 2013
    Posted on May 27, 2013 at 15:38

    ''Concerning hardware requirements, I think the easiest solution would be to use the STM32 USB interface in host mode''

     

     

    But the hardware part is (almost) the trivial part - the real work would be in the software  to support this!

    Even for someone experienced in USB Host development, this is not trivial - and your question suggests that you are not experienced in USB Host development?

    A specific problem with buying a cheap, consumer ''dongle'' is that you are unlikely to get any technical documentation or support - it's going to rely on your googling skills to dig-out whatever information is out there.

    I think you're more likely to get useful support by using a WiFi module that's specifically designed, documented, and supported for embedded use - there are plenty available...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Tesla DeLorean
    Guru
    May 27, 2013
    Posted on May 27, 2013 at 15:42

    Find an adapter well supported in Linux, review the driver code to quantify the implementation complexity.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sdim
    Associate II
    May 21, 2014
    Posted on May 21, 2014 at 11:52

    If you are already comfortable with the STM32 USB peripheral, read the Communications Device Class specifications and the Universal Serial Bus Communications Class Subclass Specifications for Network Control Model Devices

    http://www.usb.org/developers/docs/devclass_docs/

    It will take a while to write you own driver.

    It is a good idea to follow Clive's advice, find a linux supported WiFi USB Adapter and study it's linux driver.