At a time when Research in Motion needs to sex itself up, the Canadian smartphone maker is in talks with the four largest record companies about launching a new music service to run on top of BlackBerry Messenger, the company's instant-messenger service, multiple sources with knowledge of the negotiations told CNET.

T-Mobile

RIM has signed a deal with at least one of the top-four record companies and is close to signing at least two others, the sources said, adding that a test version of the service could be rolled out within the next few weeks.

The BlackBerry Messenger (BBM) service is an instant-messaging service that enables owners of BlackBerry phones to chat instantly via the Internet with one another. Details about how RIM's new music service would work with BBM are few and a RIM spokesperson was not immediately available for comment.

The major labels, Universal Music Group, Sony Music Entertainment, Warner Music Group, and EMI Music, are eager to see new retail services and to continue being part of mobile devices, especially smartphones. Yesterday, pre-paid carrier MetroPCS Communications announced that Android phone owners who subscribe to the company's $60-per-month rate plan can receive access to the music-subscription service Rhapsody.

For RIM, the deal marks the latest attempt to grow beyond its roots as a stodgy tool of the corporate world and into a more full-fledged entertainment device worthy of consumer attention. Over the past few years, the company has worked to improve its BlackBerry line's music and media players, and worked to associate itself with hip bands such as U2 with varying success.

RIM is linking its music service to BBM because it remains one of BlackBerry's last critical assets. The messenger service acts as a social network keeping people on their BlackBerrys, and has been a valuable tool in retaining and adding overseas customers and younger consumers in North America.

To better improve the performance of its BBM service, RIM opened it up to developers last month, allowing deeper integration with separate applications such as video games and social check-in programs like Foursquare.

Plans for the music service emerge as RIM prepares for the widest--and arguably most important--launch of BlackBerrys in the company's history. The company is banking that its line-up, which includes the flagship BlackBerry Bold, and a full-touchscreen and slider keyboard variations of the Torch, will be enough to restart the company's growth.

A successful launch is critical because the current devices are meant to bridge the gap between its aging Blackberry operating system and the next-generation QNX software, which powers the PlayBook tablet and new smartphones coming out next year. The current line-up of devices represent the first new BlackBerrys in roughly a year.

RIM's march into the consumer world, which got off to a fantastic start with the blockbuster BlackBerry Pearl phone first launched five years ago, was curtailed by Apple's iPhone and the rise of smartphones using Google's Android software. Over the past few years, RIM has seen its growth drop dramatically.

In the second quarter, RIM's share of the global smartphone market slipped to just under 12 percent from nearly a fifth of the total market a year ago, according to a study by Gartner. At the same time, players such as Apple and heavy Android supporters Samsung Electronics and HTC have made large strides.

RIM's recent pricing strategy suggests that it is easing off the consumer pedal, with carriers selling its flagship BlackBerry Bold phone for $249.99 to $299.99 with a multi-year service contract. That price point is more likely to attract businessmen than normal consumers. Still, RIM is offering cheaper alternatives, including a $49.99 BlackBerry Torch for AT&T.

Music, meanwhile, has played an increasingly important role as the players in the wireless industry seek to differentiate their services and features.

While traditionally carriers have delivered these kinds of services to their customers, the handset vendors are increasingly working to build their own relationship with users. For RIM, the BBM music service would be another reason to buy a BlackBerry, regardless of the carrier. When music service Spotify launched last month, Motorola Mobility touted itself as the exclusive launch partner, and that its customers would get "coveted early access."