The Internet of Things is attracting lots of fresh attention these days, but CalAmp  (NASDAQ:CAMP) and Sierra Wireless (NASDAQ:SWIR) have long known about the opportunities in IoT. 

Both companies have invested in creating hardware, software, and services for the machine-to-machine market, and each is looking to expand its position in the space. But which is the better buy?

Picture of two apples on a scale that balance each other out.

Image source: Getty Images.

The case for Sierra Wireless 

Sierra hasn't exactly been an investor's dream over the past two years. Its stock price plummeted 67% in 2015 and then ended an oscillating 2016 down by just under 1% more. But despite its recent turbulence, there are signs of life for this IoT play. 

The company helps connect devices, vehicles, and equipment to the Internet through its embedded wireless modules. It already has a leading position in this space, and earns about 33% of all global embedded module revenue.

Sierra currently connects more than 5 billion IoT devices, and is on track to connect 15 billion by 2021.

But Sierra realizes that recurring revenue, and not necessarily hardware sales, will be the key to a strong business model. That's why it's important to note that the company increased enterprise revenue by 27% year over year in 2016's fourth quarter, and it's working to build out its cloud and connectivity services.

If Sierra can continue growing both of these segments, it'll be able to expand its margins, increase recurring revenue, and build a solid ecosystem of IoT products for its customers.

The case for CalAmp

CalAmp recently shut down its satellite business, which means it now relies exclusively on its wireless datacom business for its revenue. That might make it sound like the company lacks diversified revenue streams, but don't be fooled. 

CalAmp's revenues are split between selling machine-to-machine (M2M) hardware to industrial companies and other business, and selling software and services that connect that equipment to analytics software and cloud computing services. For example, companies like Caterpillar purchase rugged wireless routers from CalAmp to track their equipment, but also use its software to analyze how well machinery is running, and then store that information in CalAmp's server cloud. 

While the majority of the company's revenue comes from hardware sales, the other segments are growing quickly. The company's software-as-a-service (SaaS) revenue jumped 51% year over year in its fiscal 2017 third quarter, and it now can count 621,000 software and services customers.

CalAmp is making smart investments as well, including its purchase last year of LoJack, which has helped boost the company's software revenues.

The verdict 

I don't like doing this when comparing two stocks, but I'd have to say that this contest is too close to call. Both companies have a lot of potential to profit from the coming $7 trillion Internet of Things market, and both are smartly focusing on recurring software and services revenue. 

Sierra's stock-price run-up of 80% since the beginning of this year might make it the more enticing pick for some investors, but I believe both companies are equally well-positioned to ride the IoT growth wave, and are worth a look from long-term investors.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.