6

In my country (Nigeria) we have very few wireless hotspots, most people connect to the internet via private USB dongles.

I was wondering if it is possible to use these dongles to allow an embedded system connect to the internet.

I know that involves knowing some form of USB protocol with which these devices communicate with a system, but I don't know if there is some standard for that or something to make it generic.

Toby Jaffey
  • 28,836
  • 19
  • 98
  • 150
TiOLUWA
  • 783
  • 1
  • 9
  • 23

3 Answers3

4

Wireless USB Internet dongles come in two flavours.

  • A wifi dongle connects to a 2.4GHz 802.11 network (but, I don't think you mean these?)
  • A GSM modem dongle connects via the cell phone network.

Like a modem for the fixed line telephone network, many GSM modems have RS232 and Hayes (AT) commands.

The easiest GSM dongle to interface to an embedded system is one which exposes an AT command set. If you are lucky then you will be able to attach directly to a UART. But, you may need to implement a USB host with support for CDC/serial devices.

Interfacing any other dongle will be considerably harder. In the best case, you might identify chips and find an open source Linux driver to port. In the worst case, you will need to reverse engineer the Windows-only binary USB driver then clone it into your embedded firmware. If you're really unlucky then you'll need to implement a TCP/IP stack too.

I recommend the AT command route, if you can.

Toby Jaffey
  • 28,836
  • 19
  • 98
  • 150
  • yes i'm referring to the GSM modem dongle, i'm thinking i can use a usb port sniffer software to find out what data is transmitted between the dongle and a system? – TiOLUWA Apr 28 '12 at 22:43
  • Yes. If your embedded system has USB host support, reverse engineering then reimplementing the driver is possible. But, not easy. – Toby Jaffey Apr 28 '12 at 22:46
2

I've looked into this and the other answers are correct. In most cases you'll need a microcontroller with USB host support. Most of the newer USB GSM/3G/4G dongles support a common USB-PPP driver so one driver could probably support many devices. You'd still have to port the diver from linux which would be hard work unless you were planning to sell loads.

If you were planning to sell loads it'd be much cheaper/quicker to buy a GSM module specifically for designed for embedded systems. These leave out the USB interface which is just an unneeded complication. If you're only planning a one off or a couple, your money (and time) will be much better spent on a small Linux board (eg. Raspberry Pi) with a consumer USB GSM dongle.

Tim
  • 359
  • 2
  • 12
1

If your embedded system contains something like a single board computer that can run a operating system with a network stack, USB, and where you can install a driver for the USB dongle, then it should be possible.

Otherwise it is effectively not possible. The microcontroller would have to be capable of being a USB host, which some are. However, you'd have to know the protocol of the dongle over the USB, which you are unlikely to get. In effect, you are limited to systems the manufacturer has already written a driver for.

Olin Lathrop
  • 313,258
  • 36
  • 434
  • 925
  • In actuality, for many of the dongles sufficient information is known, as evidenced by the existence of open-source Linux drivers. My impression is that there's a unique command or two to get it into a sane made and then it uses some standard interface type such as CDC-ACM. If documentation was not provided, likely someone originally figured this out by packet sniffing the windows driver. – Chris Stratton Aug 17 '13 at 15:15