Interfacing with a usb wifi dongle from microcontroller

Did you see a new gadget or toy and start brimming with ideas? See something that has tons of potential? Discuss these thoughts here.

Interfacing with a usb wifi dongle from microcontroller

Postby roel » June 26th, 2012, 7:39 am

Hello hackers,

What do you think: would it be infeasible or near-infeasible to interface with a usb wifi dongle from an atmega or whatever your favourite uC might be?

I think that it would be awesome to just add a usb port to your pcb / breadboard, plug in a cheap dongle (< 5 eur / usd), and have a connection. I know, there are things like xbee. Way too expensive I think. And there are those 433.92MHz (I don't know the name of the US equivalent) radios. Cheap, at least the ones from China, but not reliable (again, the ones from China). And such things require additional hardware to connect to your pc/mobile devices as well. Not very elegant. But on the other hand, everyone has a wifi infrastructure at home, right? Access points (which cost next to nothing), tablets, mobile phones, etc.

So, I believe that if it is feasible to create something like this, it is a lot of work. Being an USB host, talking to wifi dongle, speaking 802.11, tcp/ip, etc. But most (if not all) of those things are already open source, for different platforms though.

So, what do you think?

Regards.

PS. And yes, I know that there are wifi modules ready for uC usage. They cost 10x the time of a single wifi dongle.
roel
 
Posts: 2
Joined: June 26th, 2012, 7:25 am

Re: Interfacing with a usb wifi dongle from microcontroller

Postby Colecago » June 26th, 2012, 8:49 am

You either pay for time or ready made components. Whatever you end up doing, you probably want to go with a 32bit micro and a real time OS as those tend to have robust TCP/IP and USB protocols built in or available. Still you have to know a lot about USB and the dongle to be able to do this, you are basically rewriting the drivers on an embedded platform.

I'd say not worth it, you save a few bucks, but you spend it in time and it's not like writing embedded drivers for one dongle will work on every cheap ass dongle people find out there.

If your end goal is to connect to tablets, phones, computers, why not bluetooth? The modules are half the price of the wify modules and you don't have to screw around with USB.
User avatar
Colecago
 
Posts: 245
Joined: January 27th, 2011, 9:34 am

Re: Interfacing with a usb wifi dongle from microcontroller

Postby Quin » June 26th, 2012, 5:27 pm

https://courses.cit.cornell.edu/ee476/F ... index.html

Yes, you can use a Mega32 as a USB host. But you'll want to know whether that cheap USB wifi dongle has a whole TCP/IP stack in it, of if it is just a USB chip and an antenna; which would leave you to write the stack in your code.
Quin
 
Posts: 44
Joined: February 24th, 2012, 9:17 am

Re: Interfacing with a usb wifi dongle from microcontroller

Postby roel » June 27th, 2012, 4:03 am

Thanks for the comments.

Sure, for my own purposes it wouldn't justify the amount of work. But I'm sure the community would like it a lot, wouldn't you?

I forgot to mention Bluetooth indeed, a good one. But still it is not as convenient as wifi. For example, to control devices from the web with Bluetooth one would need some intermediate step (like a server) to translate things to Bluetooth. It's less plug and play.

Anyway, I took a look at the linux driver for my wifi dongle. Its totally intimidating. I guess I'll have to wait until the moment that raspberrypi's (clones, derivatives) cost next to nothing, and use less energy, and plug my dongle simply into such a platform.
roel
 
Posts: 2
Joined: June 26th, 2012, 7:25 am


Return to The new gadget brainstorm pit

Who is online

Users browsing this forum: No registered users and 3 guests