How are vendor IDs assigned for USB devices? - usb

I am developing the firmware for a USB-based hardware device. The USB interface protocol requires that each device be assigned a vendor ID (VID) and product ID (PID).
How do I, as a device manufacturer/designer/developer, acquire a vendor ID? It is my understanding that the USB-IF assigns and policies these; is that correct? Do I need to buy a vendor ID from the USB-IF?
What happens if, instead, I just randomly pick a vendor ID to assign to my device, or just enter 0x0000, 0xFFFF?

Vendor IDs are a scarce resource, just like OUIs (top 3 octets of MAC address) and IPv4 addresses are. They have to be allocated so others don't use IDs/addresses that collide with yours. The cost just raises the barrier to allocation, so everybody doesn't land-grab willy-nilly.
It would be nice to have a "private" range, much like RFC1918 addresses (10/8, 172.16/12, and 192.168/16), that people who don't care about collisions can use.

The only meaning of getting a vid and a pid is to ensure that your sub device will not affect other with the same vid and pid.
You could set the vid or pid you like but you get the risk of a collision and your driver or the one of the other device could stop working, or both.
Ref: http://www.usb.org/developers/usbfaq#12

One other answer that people have missed: It takes a surprising amount of money and time to run a standards body.
There are costs to host the web site and official repository for the standard. You have to setup your own server, or rent space with a hosting company.
A new standard requires marketing. If people do not hear about your standard, how are they going to adopt it and use it?
Are you going to demo the new USB standard at CES, IDF, Embedded World, or some other trade show? It costs tens of thousands of dollars to rent a booth and pay for construction at one of the big shows. It costs thousands in air travel and hotels.
Are you handing out pamphlets at the show? How much does it cost to have them printed?
Are you going to advertise your standard in a magazine? Or banners on a web site? How do you expect to pay for this?
It costs money to coordinate meetings between the various members of your standards body. If you want a face-to-face meeting, you have to rent a conference room somewhere. Are you providing snacks and coffee? If you want to do a conference call, who is paying for the phone service?
You probably have an e-mail list or discussion forum. Who is maintaining that? How are you paying for the disk space to archive everything?
Does your standards body have a mailing address? Office? PO Box? Phone Number? Fax number? How do you expect to pay for that?
Any standards body with more than 1-2 members is going to have a board of directors, bylaws, officers, etc. Who is running all of that?
At some point, you will want to incorporate your standards body so it is a "perpetual" organization, not just tied to you personally. That means you need to file a tax return. Who is paying for the attorney's fees? Do you want liability insurance?
For a "physical" standard like USB, you probably need to spend money building prototype connectors and testing them. You probably need a test lab somewhere with oscilloscopes and other equipment, not to mention PCs, cables, and other equipment. Before you build the connectors, you probably want to simulate them, both mechanically and electrically. The costs for doing this can exceed $100,000.
Are you designing the logo for the standard yourself in MS Paint? Or do you want a graphic designer to do it for you. Who's paying for it?
Do you want to register your logo as a trademark? Who is going to take pay the fees for that?
Beyond money, it takes a lot of time to run a standards body. In the beginning, you might be able to handle it in your spare time, but for a high-visibility standard like USB, you may need someone dedicated to the standards body full time. They will need a salary.
The money to run a standards body has to come from somewhere.
You can charge membership dues, but this may not be enough. You will find that only a handful of people actually want to contribute to the standard. Everyone else will simply download the spec from your web site and benefit freely from your hard work.
You can charge for Access to the Specs, but this gets the "open standards" people up in arms. It also hampers the adoption of your spec. Not to mention people will probably just share the PDF illegally.
The simple truth is that a $4,000 annual membership fee is a pittance for a USB device manufacturer. You will spend far more than that designing your product and manufacturing it. The people who balk at that cost were probably not serious about building a USB device anyway, and would just "waste" the USB vendor ID (there is a finite number of possible IDs).

I've never found an official public listing of VIDs.
Seems to me that usb.org should provide one as a general service to the USB community, and if a vendor didn't want their VID public usb.org could just list it as "private" (it could well happen that a company wants a VID for internal use only)
The best list I've found for VIDs (and many associated PIDs) is here:
http://www.linux-usb.org/usb.ids
It's updated frequently, but I have found errors, so caveat emptor.

Related

Does Allen Bradley SLC500 PLC worth to buy in 2017?

I am looking for a plc system for our brewery. I would like buy a second hand PLC with the necessary modules. I have seen the AB SLC500 1747-L542 cpu for a good price (120$) with a lot of modules, but I dont know, if it is new enough for a project. (Windows compatibilty, programming environment, etc)
Should I buy it, or it would be a bad decision? If it is not a good decision, what do you suggest for me? I have seen Siemens S7-200, Siemens ET 200 and others too.
Thank you.
If you want to go cheap, use something from automation direct or ez automation. You not only need a CPU, you need I/O cards, rack, power supply, software & HMI. That's going to be a ton of money up front. With the two vendors I mentioned, they bundle most of that for a much lower cost of entry.
Yes this is certainly new enough to use. However, you will need an entire rack. For instance, a ethernet, devicenet, or io cards to connect the processor to your components.
Also as Bill J mentioned, AB may be industry standard in America, but it is expensive. Depending on your brewery's income it my not be smart. Siemens is the same idea.
Quote from AB's website
Our Bulletin 1747 SLC™ 500 control platform is used for a wide variety of applications. Rockwell Automation has announced that some SLC 500 Bulletin numbers are discontinued and no longer available for sale. Customers are encouraged to migrate to our newer CompactLogix™ 5370 or 5380 control platforms.
link to website
So I would say, for a new project, no it's not worth bying in 2017.
Depending on how many points you need to use I would recommend going with the CompactLogix or MicroLogix from AB. The lowest CompactLogix is my favorit for all around tasks, I have standardized the whole plant to use it as the lowest level PLC for the simplest machines. Built in you get Ethernet capability, 16 inputs, and 16 outputs. You can expand the controller via different modules (up to 8 for the lowest PN), that can include additional discrete IO, analog modules etc.
Do not use a SLC as they are obsolete and even though you can get it to work without much trouble this is not a good choice for a new project.
It is hard to say what you need exactly without knowing the specifics of your project so I would recommend using the "integrated automation builder" (a free download from AB) to properly size a controller for your needs.

USB VID's exhaustion

Simply put, VID is 16 bit wide, so is there any potential issue of exhaustion (like what is happening with IPv4 ?
How far we are from this moment, where can we get the actual number of allocated VIDs ?
Yes, there is a potential issue of vendor ID exhaustion. As the maker and startup communities continue to grow, more people will want to make USB devices on a small scale.
USB vendor IDs are controlled by the USB Implementers Forum, and they currently charge $5,000 per vendor ID.
The USB-IF does not release any reports about how many vendor IDs are taken as far as I know, so we can only speculate. There is an incomplete, unofficial list of vendor IDs and a list of vendor IDs from Microsoft.
In my opinion, they should have made the vendor ID be 128 bits wide, just like the GUIDs used in many places in Microsoft Windows.
If we start to run out of vendor IDs, the USB-IF will probably issue an Engineering Change Notice allowing some way to increase the vendor ID space. For example, they might expand the size of the USB Device Descriptor or they might make a VID with a special meaning; when the host sees this special vendor ID it could run a special request to get the full vendor ID which would have more than 16 bits.

having trouble looking for the right gps

I'm looking for a GPS for a small class project. We want the smallest GPS possible and all we really need it to do is to give us longitude and latitude values when we poll it.
I tried looking at sparkfun, but since we haven't really worked with this type of hardware before, it's hard to know which kind we really want/what parts we need.
What We Need:
smallest possible
longest battery life
only need long and lat
able to be polled from some other device such as a mobile app or website
Thanks!
there are two paths to this, one is just get a bluetooth receiver, you will be able to poll it from a mobile phone or whatever. going to likely be as big as the phone, have the battery inside, etc. not sure how long it will last on one charge.
There are other solutions designed for putting in packages being shipped, better battery life, but their goal is as data loggers and not necessarily something you can cable up and poll and likely not wireless if that is what you are after.
Now if you want to build your own, and you already went to sparkfun, here is another path.
I know that leaving links in an answer at SO is bad...This was longer than a comment and will add some more info...
You want small you can go with this
https://www.sparkfun.com/products/11571
It is a GP-635T gps receiver, if you look at the picture it really is around the size of a quarter. 50 channel. Point it up the way they tell you, antenna is built in, just power it and it works.
You will need to hook up to it. It is the serial version not usb, in either case you need a cable like this.
https://www.sparkfun.com/products/10361
This link is to a cable with 6 or 8 inch pigtails, the gps receiver comes on a board with a not so uncommon connector on it, this cable allows you get at those connections, you only need three.
The datasheet on the sparkfun page or probably just search for the part number, you need to look at the UART TTL pinouts not the usb pinouts. Yo uneed 3.3 to 5.5volts to power it pin 2, pin 1 is ground. then pin 3 is txa serial out. This is where you get your data.
these are various solutions that will work
https://www.sparkfun.com/products/9873
https://www.sparkfun.com/products/718
http://jim.sh/ftx/
some soldering may be required. The above links are various solutions between $10 and $15 for ftdi usb to serial/uart break out boards. These will include 3.3v and ground and the rx pin is the receiver for the ftdi uart, you tie that to txa on the gps unit.
What you may not know and may be interested in is that almost universally gps units do their math magic and come up with the various items time, position (2d or 3d), speed, etc. And they output this data in a serial manner. search for NMEA or NMEA-0183. The data sheet for this and any other should give an indication of the default data rate (4800, 9600, 19200, etc baud) and what messages are sent. sometimes you can change the baud rate, sometimes you cant. The ftdi chips/boards are very flexible use a usb cable to plug in the board to a computer, configure your software or a dumb terminal program like minicom or hyperterm or teraterm or whatever (no parity, no hardware flow control) and the messages will appear usually once a second. Whether it is your car navigation, handheld gps, whatever, buried inside is some flavor of gps reciever (sparkfun will give you an indication of just how many different flavors there are and their selection is just scratching the surface) that outputs serial and the software in that unit is receiving that serial data and then doing its thing (mapping, navigating, etc). As with modems back in the day the ones you find in your cell phone might have some of the software/math done by the main processor in the phone to save on money, these libraries are not generally available, when you make the deal to buy thousands or millions of units they allow you to pay for the software to go with it along with your signature on a bunch of legal documents. I assume this is the case, that is how the ones in phones are down to $10 or so where these fully contained solutions are usually $50 to $100 in single quantities and likely not a lot cheaper in quantity.
Once powered, even if it says X number of seconds hot or cold to lock it doesnt always take that, sometimes if it has to search it may still take a while, the less metal you have around (like being in a building or the center of a car) the worse it is to the point it may not lock.
if you have an older garmin street pilot (that is otherwise dead I would hate to kill one of those if it is working) you can rip it apart and likely find a sirf III or other module in there, likely a 5V not 3.3 (there are 5V ftdi based breakout usb to serial. the microftx is both 5v and 3.3, note the gps receiver linked above is also 5v or 3.3) googling will be required to figure out the pinout and such, and soldering might or might not be a challenge.
you can also find old etrex or other handhelds on ebay or wherever (that work!) and for $15 or so get a serial cable, well then you need a serial to usb likely which will also need a level shifter like a max232, you dont plug this right into a ftdi break out board, it will fry it. newer ones have usb and you can power the unit from the usb and likely see the nmea data over the usb as well.
Most of the stuff you see on sparkfun in the gps area is going to be related to these various brands and models of gps recivers that output nmea data over serial. some are 5V some are 3.3, many do not have antennas and you have to buy those separately (and get the right kind, one that plugs into the connector provided, etc). I have a number of these items and they all work just fine, some do better than others around buildings or in trees, etc. Around sparkfun you will also find lipo battery solutions and bluetooth or xbee or other wireless solutions, very quickly if you need wireless, I think you will find just buying an off the shelf solution is best. I have had my eye on the garmin bluetooth thing google
Garmin GLO Portable GPS and GLONASS Receiver
it is about $99. I have not pulled the trigger yet so I dont know how good or bad it is, the el cheapo brands just look cheap.
Of course, a smart phone has both wireless and a gps and you can get a lot of used phones for cheap on ebay. Ios and android. You could "just write an android app" and put it on the phone and use one of the wireless interfaces built into the phone. It will chew through the battery yes, how fast? who knows.

How to demo examples of embeded systems?

It seems that a lot of small business people have a need for some customized embedded systems, but don't really know too much about the possibilities and cannot quite envisage them.
I had the same problem when trying to explain what Android could do; I was generally met with glazed eyes - and then I made a few demos. Somehow, being able to see something - to be able to touch it and play around with it – people have that cartoon lightbulb moment.
Even if it is not directly applicable to them, a demo starts them thinking about what could be useful to them.
The sort of person I am talking about may or may not be technical, but is certainly intelligent, having built from scratch a business which turns over millions.
Their needs are varied, from RFID or GPS asset & people tracking, to simple stock control systems, displays, communications, sometime satellite, sometimes VPN or LAN (wifi or RJ45). A lot of it needs a good back-end database with a web-site to display, query, data-mine …
So, to get to the question, I am looking for a simple project, or projects, which will cause that cartoon lightbulb moment. It need not be too complicated as those who need complicated solutions are generally tech-savvy, just something straightforward & showing what could be done to streamline their business and make it more profitable.
It would be nice it if could include some wifi/RJ45 comms, communicate across the internet (e.g not just a micro-controller attached to a single PC – that should then communicate with a server/web-site), an RFID reader would be nice, something actually happening (LEDs, sounds, etc), plus some database, database analysis/data-ming – something end-to-end, preferably in both directions.
A friend was suggesting a Rube Goldberg like contraption with a Lego Mindstorms attached to a local PC, but also controllable from a remote PC (representing head office) or web site. That would show remote control of devices. Maybe it could pick up some RFID tags and move them around (at random, or on command), representing stock control (or maybe employee/asset movement within a factory or warehouse (Location Based Services/GIS)), which cold then be shown on the web site, with some nice charts & graphs etc.
Any other ideas?
How best to implement it? One of those micro-controller starter kites like http://www.nerdkits.com/ ? Maybe some Lego, or similar robot kit, a few cheap RFID readers … anything else?
And – the $409,600 question – what's a good, representative demo which demonstrate as many functionalities as possible, as impressively as possible, with the least effort? (keeping it modular and allowing for easy addition of features, since there is such a wide area to cover)
p.s a tie with an Adroid slate PC would be welcome too
Your customers might respond better to a solid looking R/C truck which seeks RFID tags than to a Lego robot. Lego is cool, but it has a bit of a slapped-together 'kiddie' feel.
What if you:
scatter some RFID tags across the conference room.
add a GPS & wifi transmitter to your truck.
drive the truck to the tag
(manually - unless you want to invest a lot of time in steering algorithms).
have a PC drawing a real-time track of the trucks path.
every the truck gets within range of the tag, add it to an inventory list on the screen, showing item id, location, time recorded, total units so far.
indicate the position of the item on the map.
I'd be impressed.
Is it 'least effort'? I don't know, but I'd hope that if this is the type of solution you are pitching, that you already have a good handle on how to read GPS and RFID devices, how to establish a TCP or UDP connection with wifi, how to send and decode packets. Add some simple graphics and database lookup, and you are set.
Regarding hardware, I don't have any first hand experience with any of these, but the GadgetPC Wi-Fi G Kit + a USB RFID reader + a USB GPS reciever looks like a nice platform for experimenting with this.
Many chip manufactures have off-the-shelf demo boards. Microchip has some great demo boards for TCP/IP communications on an embedded system. I haven't seen one yet for RFID. Showing potential customers some of these demos could get them thinking about what is possible.

How does GPS in a mobile phone work exactly? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge?
GPS, the Global Positioning System run by the United States Military, is free for civilian use, though the reality is that we're paying for it with tax dollars.
However, GPS on cell phones is a bit more murky. In general, it won't cost you anything to turn on the GPS in your cell phone, but when you get a location it usually involves the cell phone company in order to get it quickly with little signal, as well as get a location when the satellites aren't visible (since the gov't requires a fix even if the satellites aren't visible for emergency 911 purposes). It uses up some cellular bandwidth. This also means that for phones without a regular GPS receiver, you cannot use the GPS at all if you don't have cell phone service.
For this reason most cell phone companies have the GPS in the phone turned off except for emergency calls and for services they sell you (such as directions).
This particular kind of GPS is called assisted GPS (AGPS), and there are several levels of assistance used.
GPS
A normal GPS receiver listens to a particular frequency for radio signals. Satellites send time coded messages at this frequency. Each satellite has an atomic clock, and sends the current exact time as well.
The GPS receiver figures out which satellites it can hear, and then starts gathering those messages. The messages include time, current satellite positions, and a few other bits of information. The message stream is slow - this is to save power, and also because all the satellites transmit on the same frequency and they're easier to pick out if they go slow. Because of this, and the amount of information needed to operate well, it can take 30-60 seconds to get a location on a regular GPS.
When it knows the position and time code of at least 3 satellites, a GPS receiver can assume it's on the earth's surface and get a good reading. 4 satellites are needed if you aren't on the ground and you want altitude as well.
AGPS
As you saw above, it can take a long time to get a position fix with a normal GPS. There are ways to speed this up, but unless you're carrying an atomic clock with you all the time, or leave the GPS on all the time, then there's always going to be a delay of between 5-60 seconds before you get a location.
In order to save cost, most cell phones share the GPS receiver components with the cellular components, and you can't get a fix and talk at the same time. People don't like that (especially when there's an emergency) so the lowest form of GPS does the following:
Get some information from the cell phone company to feed to the GPS receiver - some of this is gross positioning information based on what cellular towers can 'hear' your phone, so by this time they already phone your location to within a city block or so.
Switch from cellular to GPS receiver for 0.1 second (or some small, practically unoticable period of time) and collect the raw GPS data (no processing on the phone).
Switch back to the phone mode, and send the raw data to the phone company
The phone company processes that data (acts as an offline GPS receiver) and send the location back to your phone.
This saves a lot of money on the phone design, but it has a heavy load on cellular bandwidth, and with a lot of requests coming it requires a lot of fast servers. Still, overall it can be cheaper and faster to implement. They are reluctant, however, to release GPS based features on these phones due to this load - so you won't see turn by turn navigation here.
More recent designs include a full GPS chip. They still get data from the phone company - such as current location based on tower positioning, and current satellite locations - this provides sub 1 second fix times. This information is only needed once, and the GPS can keep track of everything after that with very little power. If the cellular network is unavailable, then they can still get a fix after awhile. If the GPS satellites aren't visible to the receiver, then they can still get a rough fix from the cellular towers.
But to completely answer your question - it's as free as the phone company lets it be, and so far they do not charge for it at all. I doubt that's going to change in the future. In the higher end phones with a full GPS receiver you may even be able to load your own software and access it, such as with mologogo on a motorola iDen phone - the J2ME development kit is free, and the phone is only $40 (prepaid phone with $5 credit). Unlimited internet is about $10 a month, so for $40 to start and $10 a month you can get an internet tracking system. (Prices circa August 2008)
It's only going to get cheaper and more full featured from here on out...
Re: Google maps and such
Yes, Google maps and all other cell phone mapping systems require a data connection of some sort at varying times during usage. When you move far enough in one direction, for instance, it'll request new tiles from its server. Your average phone doesn't have enough storage to hold a map of the US, nor the processor power to render it nicely. iPhone would be able to if you wanted to use the storage space up with maps, but given that most iPhones have a full time unlimited data plan most users would rather use that space for other things.
There's 3 satellites at least that you must be able to receive from of the 24-32 out there, and they each broadcast a time from a synchronized atomic clock. The differences in those times that you receive at any one time tell you how long the broadcast took to reach you, and thus where you are in relation to the satellites. So, it sort of reads from something, but it doesn't connect to that thing. Note that this doesn't tell you your orientation, many GPSes fake that (and speed) by interpolating data points.
If you don't count the cost of the receiver, it's a free service. Apparently there's higher resolution services out there that are restricted to military use. Those are likely a fixed cost for a license to decrypt the signals along with a confidentiality agreement.
Now your device may support GPS tracking, in which case it might communicate, say via GPRS, to a database which will store the location the device has found itself to be at, so that multiple devices may be tracked. That would require some kind of connection.
Maps are either stored on the device or received over a connection. Navigation is computed based on those maps' databases. These likely are a licensed item with a cost associated, though if you use a service like Google Maps they have the license with NAVTEQ and others.