Image source: Getty Images.

Both InvenSense (INVN) and Sierra Wireless (SWIR) have taken a beating over the past year, with their stock prices down 20% and 33%, respectively. But both companies still have lots of potential in their respective markets.

Let's look at the problems facing both companies and what they're doing to fix them, and decide which company might be the better buy for investors.

SWIR, INVN data by YCharts.

The case for Sierra Wireless

Sierra Wireless' stock hasn't exactly been an easy one to watch. In the second quarter of this year the company beat Wall Street's estimates, but posted a quarterly decline of 1.1%. That's not all that great, of course, and revenue for the company's OEM solutions unit (its main revenue driver) fell by 4% year over year.

Part of the decline from OEM was from investments in new customers that should pay off down the road. Management said on the second-quarter earnings call that two new design wins in the China OEM market, along with new wins in transportation, smart metering, networking and industrial segments, will help long-term growth. But the company also added that OEM revenue may still be weak in the short term.

Additionally, Sierra Wireless increased revenue from its second-biggest business segment, Enterprise Solutions, by 10% year over year. Part of this growth came from sales of two new products, the RV50 industrial gateway router and the MP70 rugged mobile router. The company also said new products are launching in the second half of this year that should continue to grow enterprise revenue.

Another bright spot for Sierra Wireless comes from its recent purchase of GenX Mobile. The company believes the purchase will not only help it scale some of its enterprise products, but could also lead to more sales in the company's cloud and connectivity segment by bundling GenX Mobile devices with cloud services.

And despite its overall revenue losses, Sierra Wireless continues to hold onto its dominant position in revenue market share (currently 33%) of the embedded machine-to-machine (M2M) module business.

The case for InvenSense

InvenSense's story is one full of possibilities, but also not without its pitfalls. The company is best known for making motion sensors (gyroscopes and accelerometers) for the mobile market, and boasts both Apple (AAPL -1.22%) and Samsung as customers.

That was all well and good when both smartphone makers were seeing sky-high device sales, but the overall smartphone market has cooled as of late.

Smartphone shipments were flat in the first quarter of this year, rising just 0.2% year over year compared to growth of 16.7% in the first quarter of 2015. According to IDC, first-quarter 2016 growth was the smallest year-over-year smartphone growth on record, and it's not expected to get much better. IDC expects growth to drop to just 0.2% between 2015 and 2020 in developed smartphone markets.

InvenSense receives 46% of its total revenue from Apple, and with iPhone sales seeing consecutive year-over-year declines (16.3% in Q2 2016 and 15% in Q3) that dependence has hurt InvenSense. In fiscal Q1 2017, InvenSense's revenue came in at $60.6 million, representing a 43% drop year over year.

The company knows better than anyone that it can't continue to rely on Apple for such a large chunk of its revenue. That's why InvenSense is diversifying some of its revenue away from its mobile segment. A year ago, InvenSense brought in 72% of total revenue from component sales from its mobile segment, but that's since fallen to 63%. Meanwhile, its "Internet of Things and other" segment has grown from 12% to 25% of total revenue.

Selling components to other markets outside of mobile will be the key to the company's future stability. Smartphone sales could bounce back, of course, and if Apple pulls off blockbuster sales of its new iPhones, then InvenSense should definitely benefit. But diversifying its customer portfolio is certainly on the top of InvenSense's to-do list.

The verdict

I think Sierra Wireless' dominant M2M embedded module position and its growth from its enterprise and cloud services segments -- along with new customer growth in its OEM business -- are putting that company in a very strong position.

Between Sierra and InvenSense, Sierra's business appears to be much more stable. Its revenues are growing faster than InvenSense's, and the company has no customers that account for as large a percentage of revenue as Apple does at InvenSense. For now, Sierra gets my pick.