USB device detected, but no USB port assigned – Ubuntu

This issue, where a USB device is detected, but no USB port assigned has taken me a lot of effort to solve on several occasions, because I forgot the fix each time, so hopefully this post might help you!

In short if you connect a ‘new’ USB device and it does not ‘work’, but dmesg reports something like below and the device number increments on every dis/reconnect:
usb 4-2: new full speed USB device number 11 using uhci_hcd

The issue is that no USB port has been assigned, as seen below in this successful connection:
usb 4-2: new full speed USB device number 12 using uhci_hcd
cdc_acm 4-2:1.0: ttyACM0: USB ACM device

The following fix has worked for me on three, maybe four, systems:
sudo modprobe cdc_acm

The systems it definitely fixed were the Dangerous Prototypes OLS, a USnooBie and just this week, an Arduino UNO v2.0. Plus it probably fixed a Dangerous Prototypes BusBlaster, but my notes don’t document and it almost certainly would have fixed the very long saga I had with the Dangerous Prototypes IRToy, but it went a different, painful process, that I won’t be able to reproduce, but the root issue seemed the same.

While three of these systems are all from Dangerous Prototypes, ALL five have a different hardware USB implementation! The Arduino and Dangerous Prototypes devices are also all very popular.

Two references that helped were 1 and 2. The second, Gentoo link, talks about modprobe cdc_acm and interestingly modprobe ftdi_sio, which I have not used, but am trying to burn into my brain for the next issue I have. I must have used other sites – but apologies to them as I forgot to record the sources šŸ™

Possibly relevant background information:

I only use the one Ubuntu laptop, so have not run into this on any other systems! The build started with 10.10 and took all upgrades up to 11.10. These devices all worked on Windows XP Pro, with only a couple of minor issues.

I have successfully used lots of other devices on the same Ubuntu laptop, including an Arduino Deumilanove, a DP BusPirate, a DP USB LCD Backpack, and three different types of USB to TTL (FTDI) convertors.

Highly relevant background information = I break stuff – lots of stuff, just by touch and sometimes it seems just by looking.

How to ‘Instantly turn your project into a ā€œkitā€’

Promotion of this idea has focussed so far on the creators or builders of projects creating and publishing a shopping cart from the BOM to create the easy purchase kit. This is very challenging for anyone not experienced in electronics and sourcing of parts! Here are a few snippets of people talking about this issue.

Ihsan, Littlewire project wrote:

Being a full time researcher/student and preparing an OSHW product is so exhausting …

Bunnie has several very interesting posts on part sourcing issues. Bunnie, Mitch Altman and others often travel overseas to the manufacturer and especially check on parts. Even fledgling projects like MCHCK travel overseas trip trying to get cost from $5.85 to $5 ($7 if use someone to sell/support).

Maybe once you have done it ‘many’ times and restrict yourself to a fairly standard process and parts, it gets easier, but for most of us, those first big hurdles remain. Even very experienced project designers have challenges, and as Bunnie has posted, this is an issue for commercial companies.

Ian from DangerousPrototypes has almost 24 products totalling almost 1900 items (not counting Tshirts) in stock at his MAIN supplier (retail value $US40,000) said:

… evidently Seeed was plagued with these problems in the beginning and now they swear by the broker. ….. Seeed has more experience than I will ever have sourcing parts, and this is how they do some of it, so I thought it was an interesting meeting to share. Iā€™ll probably never buy a bulk lot of chips ever.

There other ways than doing it ALL yourself, to turn a projects BOM into a shopping cart, or even a full kit. These alternate approaches can be especially helpful to those with little experience in sourcing.

One partial step in this direction is the just announced Club Jameco. Yes this is commercial, and no, I have no affiliation of any kind. From an open source view, the design agreement (contract) and the return that starts at “5% of Net Sales” are limiting, but Jameco have allowed designer to keep intellectual rights. Jameco also reserves the rights to sell the project any way it can but that does NOT prohibit the Designer from selling his/her own designs to others. For some people, especially those just getting into design, this might be a good way to go!

But this Jameco approach once again demonstrates again the worth of the basic idea – your project can be turned into a kit that many others will buy!Ā  The reality of hardware open or closed is that most of the parts need to come from a commercial source!

If you are not keen on going this way, then publish your own PCB designs and a good BOM, and everyone can then take their own approach to building. Publishing your project is the key first step, then easing the pain of sourcing with good BOMs is a critical next step, even if you just publish how you sourced or scavenged and then encourage others to SUBMIT how they sourced, so you can publish for them.

There are existing commercial vendors who will review and might publish and sell your project, Sparkfun is one. Some only manufacture and do not provide any sourcing assistance, for example SeeedStudios, so that approach is harder – you need the expertise to source and supply, the where the Jameco approach does most of this for you!

Another approach is via electronics magazines, either as formal circuits, or as brief, less formal circuit ideas and then hope that one of the kit supplier companies will stock and sell the kit! Disadvantage is that magazines require a very high standard of projects and also there is only a small number of magazines publishing a small number of projects, so competition would be very high if many people tried this approach.

Hackerspaces already help members develop skills to do this and some directly assist members sell projects, so you may want to check out your local space!

An approach that does not yet seem readily available to hobbyists is use of professional services to help with PCB design rules, gerbers, part selection, price management, best production/distribution/support approach, before project is sent toĀ  manufacturing companies like Seeed, or Mitch Altmans manufacturer Etonnet. So this is a shout out to for someone to create such a business!

Instantly turn your project into a ā€œkitā€

This previous post discussed some of the reasons why this is such a great idea.Ā  Here are some examples of projects that are actually doing this!

Sqonk really gets’ the idea that published BOMs help others build his project. He has posted about building a

40-pin LPC1343 breakout board with 12 MHz crystal, USB Connect detection and disconnect, MicroBuilder’s single-button ISP, ISP Header and the standard LPCXpresso user LED. I added proper USB ESD/EMC handling, all this on a 5×2 cm board. All parts where purchased at Digi-Key, but I am working on the BOM to be able to order the parts from other online distributors that are easier to work with in Europe (Farnell, RS…).

He is taking the excellent step of creating carts with multiple suppliers including with the LOCAL branches to help minimise the dreaded shipping fees and hassles of customs and taxes!

It is this extra step of providing one or more shopping carts transforms a project plus BOM into an ‘instant kit’ and reduces the effort from finding and verifying every single part and balancing the multiple suppliers and delivery fees to just one or two simple purchases!

In this exampleĀ SARduino644 v0.1 BOM at Mouser, Stan has seen a project he liked, created a shopping cart and very generously offered it for publication. This is a great way to build up many carts and also to get feedback on the how the parts went in the actual build!

Vinciduino is an open hardware project, a clone of the forthcoming Arduino Leonardo.” The project has blogged that: “Transparency in costs is something required when speaking about ā€œopen hardwareā€ and there is a community working altruistically on it.” They also said that:

“it must be possible to go to a distributor of electronic components and order the component list, where, with a mouse click we get all the necessary components. Anyone who are not an expert in electronics will not know how to select the components for mounting the board, so if we want a total spread of the board, a component list must be provided, while this action is also useful to know the cost of the board.”

MC HCK is not only building a project using community input, but one of the key goals is a very low price point, so the sourcing and pricing of parts is a key part of the project work and discussion. This project has published the BOM, but not yet published any carts. Understandably that is not a priority when they need bulk purchasing to hit the $5 price, but it would be an useful to publish carts for those who want it ‘now’ and especially helpful to start building the momentum and refinement of this project before mass production!

Dangerous Prototypes have many BOMs with carts and also often discuss pricing and pricing approaches in some detail.

Of course these carts won’t return any % of sales to the projects creator, but that is no different for the “pure” open source process. Hopefully this will change in the not too distant future, once suppliers realise the benefit in providing easy ‘one click’ purchase will drive up their sales, I am confident they will offer, or the community can negotiate % of sales to ‘registered – recognised – or some terminology’ projects!

One really easy way that the suppliers could offer significant % of sales to project creators when they make that first sale, is to gather the parts for two, or five kits in the ONE SINGLE STEP. While this might add a tiny cost over the cost of gathering parts for one kit and does add a bit of inventory cost, it makes a huge saving on labour for gathering the parts for the next sale(s)! This process could even be a stepping stone into 10+ pricing for the project parts!

There are many additional ways that projects could work with suppliers to drive down project kit costs with this sort of partnership between project creators and part suppliers. For example, a project creator could provide funds to enable up front bulk purchase parts for say 100 kits, to drive down the cost, and of course encourage the supplier by reducing their risk! This situation suits pre-sale approaches ranging from a commitment to buy, to a dollar commitment.

So think about creating carts for your projects, or for a project you like, encouraging others to create carts and even pushing suppliers to provide this service!

Tools, parts and bedding in.

To help progress some projects and also to explore CPLD and FPGAs some CPLD breakout boards, a Bus Blaster and Open Logic Sniffer have been purchased from DangerousProtoypes (via SeeedStudio). To get started on the project ‘list’ some ATtiny85s, ATtiny2313As (pico power), ATMEGA328s and a Boarduino kit with have been purchased via the good folks at Xinchejian.

Unfortunately the Part Tester board, anĀ ATXMEGA32A4U and some AtTiny’sĀ  sent via two generous contributors in theĀ DangerousProtoypes forums have taken the long way and not arrived after many months.

As often happens it is taking ‘a while’ to get all the new toys bedded in! Here are just some of the things that consumed lots of time:

  • Reinstalling a 2003 vintage Windows XP computer that did not like all the new USB devices and fatally blue screened.
  • On the main Linux development laptop, it has taken weeks learn how to get past the coms port not being installed for the Logic Analyser (a simple modeprobe did the trick!).
  • Some very puzzling issues trying to load firmware into the new Atmega 328s, where the new chips can be programmed via ISP in an Arduino but not on a bread board ISP circuit, yet older 328 chips already on hand do work in the same breadboard circuit!
  • Along the way, a misread resistor value on the reset line and incorrect jumper cabling on the coms port slowed things down as well!

Lots of times recently I pulled out my BusPirate to do things and I keep thinking just how good it is! Not only is it an excellent protocol analyser, but it has so many EXTRA uses, including ISP programmer, general purpose break out, logic analyser, serial pass through/FTDI, LCD driver, and even as a PC controlled power supply (on/off and select 3.3 or 5V – but hey when you are working away from your own desk – that is fantastic to have!)

The Open Logic Sniffer is now already proving it’s value by helping with debugging theĀ Boarduino kit build and code on my current “pet” project.

MC HCK – Five dollar microcontroller!

The MC HCK five dollar micro controller project is now getting more publicly active, with a forum thread started and some mailing list traffic.

Why am I so keen on this board? Well it is small,Ā  cheap, can be used on breadboard, is more powerful than many common systems, has a good number of I/O pins and a reasonable computer build chain.

Now before the comments are flooded with “so what – plenty like that around” – take note of the target price of $5, yes FIVE DOLLARS.Ā  As the forum post says:

“you all know the drill — $20 makes you stingy (“frugal”)…… Low price fosters creativity”

When this hits the streets it will be affordable to have several projects on the go at once and even keep in use permanently! You can more risk instead of being overprotective of your precious chips.

All that is fantastic, but the implications actually go a LOT further. There are huge numbers of people who have little or no access to this type of technology, but the MC HCK could change that!

Imagine 10s or 100s of thousands of these devices, maybe used with the slowly spreading OLPC (Australia just announced OLPC funding).

This site exists to inspire the individuals in the varied communities and help remove restrictions to accessing this technology as described in the UsableDevices About page:

“unrestricted access is to increase access to these devices/projects for those in developing countries or other socially and financially restricted groups by promoting really cheap and accessible, but useful projects. ie people can source parts easily worldwide, or scavenge local parts or substitutes, as well as access to the tools and techniques to build the projects”

So it is really exciting to support ideas like the MC HCK !

Communities artistic, creator, DIY, social, maker, hacker, …

One goal of this site is to help bridge and bring together the many different communities that can help and learn from each other. An alternate perspective is to broaden the view of makers and hackers to see the rest of the world šŸ™‚Ā  So it is very pleasing to see that there are many others who have similar goals. This previous post highlighted some of the routine activity at Xinchejian last weekend, but it did not highlight the activities contributing to this goal where diverse community members come together.

Communities seen at Xinchejian last weekend were Breesee, Makesense and GoodtoChina.

Breesee‘s business card slogan “creative community” fits in with this sites goal. Breesee aims “to be a bridge connects different types of creators in the world. Whether they are artists, designers or engineers, we will try to encourage them cooperate and make more innovation happen”. Their site has some very nice content – it is worth a visit!

Makesense were also present, several of their members have close relationship Xinchejian. See this previous post for an introduction to their very good work worldwide.

In addition to the “drop in’s” Xinchejian is sharing the new space with GoodtoChina with a very co-operative open plan and shared facilities arrangement!Ā  “GoodtoChina inspires and supports sustainable living through environmental projects, social initiatives and consulting projects”.

XinchejianĀ are also setting up a kitchen in their new space for hacking cooking, there is already a post on Sous Vide, Xinchejian is active in the Space program, see this mailing list, and host extremely popular popular processing classes to help anyone with an artistic leaning to create computer art, are into hydroponics and also have active relationships with Dorkbot Shanghai and Xindanwei.

All that is pretty amazing on top of all the making and hacking already reported!

Lophilo, Swarm Robots and R2D2

Xinchejian hackerspace is still settling in to their new space, but there was a lot of activity on the weekend!

Things that I noticed included many active projects undergoing design work, coding and assembling a quadcopter (commiserations on the maiden flight crash) and first timers playing with Arduino.

Highlights for me were:

  • getting hands on a real Lophilo – this development hardware looks extremely professional, flexible, and is not “vapourware”… can’t wait to own one!
  • Swarm Robots meeting – lots of really interesting ideas
  • R2D2 was at the swarm meeting – just too cute not to give a special mention

 

How much code can be “stuffed” into an Arduino?

In a quest to see how much code can be “stuffed” into an Arduino the Autonomous robot project has grown to several thousand lines of code.

The compiled code is currently about 16kB when all of the debug functions are included. This is only about half of what an Arduino with an ATMEGA328 can handle. To give some meaning to this, here is the call graph I generated with Doxygen, a marvellous code documentation tool:

Autonomous robot Main loop - Doxygen call graph.

Autonomous robot Main loop – Doxygen call graph.

 

 

This actually only gives a very tiny view of Doxygen’s full capability. But the real Arduino memory size limitation is not usually the code size, but the variables used, and typically the strings. Posts on using Doxygen with Arduino code and tips and utilities to help Arduino memory management are “coming soon”.

More inspirations (than you can poke a stick at)!

There are truly so many really interesting projects around, it is getting hard to stop reading, and hard to stop buying and it is becoming a challenge to make time to progress my own projects!

There is a LOT of really interesting activity in the ‘large power’ board space – ie run an operating system and have access to the IO. There has been a lot of work put into the openWRT project and supporting a wide range of off the shelf hardware. Other groups are creating new hardware and development environments, some examples are:
Just announced this week was the Lophilo, it looks to beat the Olinuxino board to market. There is an interesting discussion about theĀ the Olinuxino and rPi (now delivering the boards!) in the DangerousPrototypes forums and of course there is also the DangerousPrototypes Web Platform. Microsoft have already released their open source Gadgeteer and in recent days even Intel announced they are about to release a system in this space.

Other things that caught my attention include:-