Advice needed on implementation strategy (mainly protocol)

cancel
Showing results for 
Search instead for 
Did you mean: 

Advice needed on implementation strategy (mainly protocol)

45 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Fri Jun 13 17:22:57 MST 2014
I'm thinking about making a small device, which is plugged into a computer's USB-port like a USB-stick.
It has a couple of output wires.

The job of the device would be to receive a text-file, parse it, and output a bitstream.
I'm imagining that it will work like copying a file from the computer onto a USB-stick; the difference is just that the storage is "limitless", and the file is not "saved".

In other words, it would behave like a "write-only" device, something similar to /dev/null ;)

How would you suggest to implement this the best way ?
-I'm completely new to USB (I've always avoided it, because I thought it was overwhelming), but I've read a bit about it, so I know there are different types of protocols, but I don't know which would suit my needs the best.
I wonder if it's best to "identify" as a storage device.

I haven't seen anyone do this before. What would be the right way to do something like this ?

Note: I'll probably be using a Cortex-M3 based device, perhaps the LPC134x or LPC175x/6x, maybe even a Cortex-M0; but definitely a Cortex-M device with USB support.
Labels (1)
0 Kudos
5 Replies

39 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Fri Jun 27 05:48:43 MST 2014
Are you implementing this from scratch? I'm interested in your progress and the code  ;-)

I've started learning USB a few days ago (LPC176x/5x device) and use libusb-1.0 (Linux, |USB host) to get a feeling for it.

Marc
0 Kudos

39 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Sat Jun 14 05:27:41 MST 2014
Thank you very much for this information. You've just saved me a lot of time. :)
0 Kudos

39 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Jun 14 05:24:19 MST 2014
No, it is a serial device, not a mass storage device. You would use copy or cp to copy a file to the device, just like you would with the null device.
0 Kudos

39 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Sat Jun 14 05:18:23 MST 2014
Thank you for the quick reply. :)

I will have a look at the CDC example.

Would such a USB serial device allow me to insert the device as a USB-stick, without writing a driver for the host computer and then drag a file onto it ?
0 Kudos

39 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Jun 14 01:30:30 MST 2014
Sounds like a serial device (tty) and nothing like a mass storage device. NXP provide an example for a USB serial device (CDC - communications device class). Look at LPCOpen for the device you are going to use.
0 Kudos