I have never done any USB development, I'm experienced with programming PIC, AVR micro-controllers and C programming on windows (not windows programming). I want to learn how to develop embedded devices and device drivers that can communicate with PC, Not via serial port emulator in USB hardware.
I like to have some points and resources on who should I approach it.
What software and hardware should I have to start leaning that?
Read this fantastic book: USB Complete by Jan Axelson. Also in his site are comprehensive informations too.
Related
I would like to use a windows machine as a USB488/USBTMC device. USB488/USBTMC is a reimplementation of the good old GPIB/IEEE-488 on USB rails. But most articles on the topic refer to a Windows machine as a host/controller. The Windows USB stack is not well suited for USB device/USB OTG modes. However, if you look at some of the high-end gear like oscilloscopes and spectrum/network analyzers, it is well known that they are often Windows machines inside with some additional hardware. So, how it is done?
To some background: it is a project to retrofit a very old SEM microscope with new hardware. The current one is a 68k custom system with a CRT that uses a GPIB interface for comm with a PC. Things like sample spectroscopy are done as a BASIC program running on a pc and communicating through that gpib port. The plan is to replace that 68k junk with a modern day windows pc with an FPGA on a PCIe bus. For compatibility reasons, it would be nice to have a usb488 port in the new PC. Though I have no idea of how to do it properly. The only solution I have so far is to have some cheap USB-capable micro hanging on the SPI bus on the FPGA facing side and a USBTDM class on the USB side. But maybe Im missing something and there is a specific thing or chip that exists that can do it that Im not aware of.
I can only speculate how high-end oscilloscopes achieve it. The most likely option is that they use a dedicated chip like a MAX3420E. It is connected via SPI. Part of the USB protocol is implemented by the chip, part of it will be implemented by the oscilloscope software.
Most USB controllers chips found in PCs can operate as the host only. And even if they could do a role swap, Windows (for Desktop) has not supported device/peripheral mode until recently. It now does. See USB Dual Role Driver Stack Architecture. But I don't fully understand it to tell you what hardware you would need to purchase where this feature is enabled.
Role swapping is very common on smartphones. It is also implemented in Linux (search for "Linux USB gadget"). Many Apple Macs can run in Target Disk Mode, which is a USB device/peripheral mode as well.
I'm wondering if Firefox OS handsets could be useful as a platform for DIY hardware projects. Hence my question: Can Firefox OS apps read out USB pins?
Compared with Arduino it would be obviously be overpowered, but the handsets have decent battery life and all connection stuff like wifi already built in.
Not right now, but we are working on USB support as part of the WebAPI work. The bug to monitor is here: https://bugzilla.mozilla.org/show_bug.cgi?id=737153
Just as the question states, the goal is to reverse engineer the protocol used by a device.
Let's say you have a webcam, an Arduino and an Arduino USB Host shield. You want to talk to that webcam, from which you don't know the protocol. Can it be done by monitoring USB data packets and by analyzing the driver installed for that device?
It would be a really interesting project.
Thanks in advance.
I often use a serial spy program to look at the conversation between two devices. In windows you can pay for it...
http://www.sinnovations.com/htdocs/serial-port-monitor.htm
In Linux it's free...
http://www.cyberciti.biz/faq/howto-monitor-data-on-a-serial-port-in-linux/
I am fairly new to linux world, I have to develop an application on embedded linux which sends data over internet. I have to choose a USB 3G modem with a SIM card holder. I would appreciate if anyone can help me choosing a USB 3G modem which works successfully or is supported on embedded linux.
Thanks
Emby
I use Pantech modems with Debian ARM linux for real-time vessel tracking.
Linux can use the cdc_acm and ppp kernel modules to drive many of the USB modems on the market. You may need to compile these modules depending on how stripped your embedded platform is. Alternatively, you can use a turnkey system like a Raven or MultiTech, but they draw much more power.
Avoid USB modems that have additional hardware such as SD cards. These modems require specialized drivers (many unavailable in open source) to peel away the non-modem hardware layers before exposing the actual modem.
Use a modem that is supported by ModemManager, an OpenSource project that is in many major Linux distro's, no need to reinvent the wheel!
Supported Modem:
https://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/
Project Source:
https://www.freedesktop.org/wiki/Software/ModemManager/
I'm looking to control a bunch of LEDs from my computer, with a TI MSP430 or similar.
My computer is a Macbook Air, and so it looks like the only port I can communicate with is USB. The MSP430 has a USB port, but I can't find any information about using the USB port for anything besides programming the chip. Is there a way around this, to use USB to communicate with the board?
Thanks!
If you are using one of the processors with built in USB hardware then you should look at this Texas Instruments Page which describes the capabilities of the MSP USB. It includes links to the USB software stack that you will need to implement an HID class device.
I see two more options here. You can also use:
a) USB <-> LPT adapter to control the LEDs directly — in this case the schematics are extremely simple. See how it's done;
b) USB <-> COM or USB <-> RS232 adapter to communicate with the controller via RS232 — in this case you'll have to implement some simple protocol for communication with the controller, but the whole solution would still be much simpler than the one with USB.
The MSP430 Series 5 and Series 6 micro controllers (i.e. MSP430x6xx and MSP430x5xx) have built in USB modules that allow communication from PC and could be used to control the MSP430 via USB. Download the MSP430 USB Developers package here: http://www.ti.com/tool/msp430usbdevpack and use the USB CDC or HID API stacks to develop an application as per your requirements. In case you are using CDC(COM port) you may use a Terminal program to send the commands to control LEDs or if you use the HID stack, you may use the hidDemo PC software included in the Developers package to send/receive commands.