An aspiring entrepreneur recently asked me how to win as a consumer hardware company. My advice? Don't do it.

Most investors want nothing to do with hardware. It's expensive, has lower margins than software, and production and iteration cycles take longer.

A few years ago it looked like the consumer hardware industry was staging a comeback. But lately it seems the industry outlook is less optimistic. A number of companies the world expected to win big -- including Coin, Jawbone and Pebble -- are struggling, shutting down or fire-selling.

Yet crowdfunding sites -- which take a slice of every dollar start-ups raise on their platforms -- are clamoring for more. Kickstarter announced its "Hardware Studio" in May, which aims to help hardware startups figure out how to acquire the right components, find manufacturers and set the best price. IndieGogo advises builders of tech gadgets to "build a prototype" and "be open to change." It's a bit like taking violin lessons as your cruise ship slowly sinks.

With all that said, building a hardware business is worth pursuing if you understand why some companies fail and others succeed. Here are a few critical things I learned while building Tile:

1. Keep innovating and solving new problems

In the consumer hardware business, as soon as you ship a new product, you need to start planning what's next. Two startups best illustrate this: Jawbone and Pebble.

Jawbone raised $930 million before liquidating in July, making it the most expensive consumer electronics startup shutdown of all time, according to CB Insights. Business Insider pegged its downfall to a combination of flawed production and testing, and a failure to stay ahead of competitors.

Pebble, the smartwatch company that had crowdfunding investors swooning, reportedly received acquisition offers as high as $740 million in 2015. Last year it sold to FitBit for an estimated $40 million -- barely enough to cover its debts. What went wrong? Reviewers thought Pebble stopped evolving its product and lost its edge to newcomers such as FitBit and the Apple Watch.

2. Sell some razor blades

Every entrepreneur knows the maxim about razors and razor blades. There's a reason Gillette is a case study for success: Selling replacement parts are akin to subscription businesses, which are more predictable, have steadier revenue and lower churn rates.

Subscriptions can also be a winning strategy for tech hardware companies. Dollar Shave Club sells razor subscriptions as low as $1 a month and was bought by Unilever for $1 billion. Dropcam charged $10 per month for a service that lets you control its security cameras with your smart phone and access video from the cloud. That additional services revenue stream attracted Nest/Google, which purchased the company for $555 million. The company has since added even more subscription based products.

3. Tie your gadget to a critical service

In tight markets, nice-to-have solutions get crushed. Instead, build a must-have service that solves a critical problem. Ring makes a doorbell with a camera built inside, which it sells for $199. The real value is in its app and service, which allows you to answer your door through your smartphone for $3 a month. People are willing to pay for the monthly service fee because it gives them peace of mind.

4. Create a network effect

A network effect is when a service gets better as more people use it, drawing more people in. At Tile, our devices use Bluetooth to help people find misplaced items nearby. But when their items have moved from the last place seen, people can tap the global community of Tile users to help them out. Whenever a person with a Tile app walks past a Tile device, it sends an anonymous ping to our network so that they can find their things even halfway around the world. The more people who use Tile, the more anonymous heroes there are -- that's the power of network effects, and that's the part of our vision that our investors are most excited about.

If all you're doing is building a gadget, don't expect a lot of VC interest. If you want to win in the big leagues of Silicon Valley, wrap your product in a business model with a recurring revenue stream and a valuable service.