ussd-notify error in OsmoMSC: "An active connection and local MSC-A role is required"

Hello everyone,

I’m having issues using the ussd-notify feature of OsmoMSC.

When executing the command subscriber imsi XXXXXXXXXXXXXXX 0 Hello through the OsmoMSC VTY interface, I receive an error: “An active connection and local MSC-A role is required for subscriber imsi XXXXXXXXXXXXXXX”. This is puzzling because the device is in fact connected to the network, and other services like SMS, voice calls, and USSD codes are functioning without issues.

Despite reviewing the Osmocom manuals and double-checking my setup, I haven’t been able to find out what’s wrong. For context, I’ve prepared a programmable SIM card, ensuring it has the correct Ki and PLMN codes. I’ve set the network to require authentication, manually registered the subscriber via the OsmoHLR VTY, and ensured the mobile device is successfully subscribed to the network. I’ve based my configurations on the following sample setup, performing only minimal changes (e.g. enabling authentication): h2hc-rfvillage/osmobts at main · racerxdl/h2hc-rfvillage · GitHub.

Any insights or guidance on how to resolve this issue would be immensely appreciated. Thank you in advance for your support!

Possibly you are mistaking being attached for having an active connection.

When a phone registers on a network, it does so with a short active connection.
Then it idles without an active connection, i.e. radio resources are left inactive.

When a call is made, it starts an active connection. When the call is done, the radio resources are released again.

Also when you send an SMS, you’ll have an active connection for a few seconds until the SMS is through and then go back to idling.

The ‘ussd-notify’ VTY command is not really a proper feature, but more of a debugging / testing tool.
What it would have to do is: page the subscriber, wait for it to connect, and then dispatch the USSD.
We don’t implement that.

When you issue this command while a voice call / SMS negotiation / USSD conversation is ongoing, then this command will find an active connection with an active MSC-A role.

Maybe you can first describe why you need this USSD notification.
To notify from the CN to the subscriber, it is a much better idea to use SMS, not USSD.

2 Likes

the proper way to do USSD in Osmocom CNI is by using the EUSE (External USSD Entity) fature of osmo-hlr, see its related user manual. However, it assumes that the USSD session is initiated by the MS/UE (mobile originated). I’m not sure if mobile-terminated USSD is possible in general. You would have to write the related code to support it, if it is a feature supported in the 3GPP specs.

1 Like

Thank you both for the answers!

I tested it as a call was ongoing and it did work, just as described.

As for why I need it, to be honest, I really don’t. I’m new to cellular communication protocols in general, so I was just exploring and trying to understand how this worked. :slightly_smiling_face:

cool, have fun!

(btw we’re also on IRC at libera.chat #osmocom)

1 Like