[GH-ISSUE #29] USSD response-reply sessions #23

Closed
opened 2026-03-04 12:10:59 +03:00 by kerem · 4 comments
Owner

Originally created by @stefand on GitHub (May 15, 2025).
Original GitHub issue: https://github.com/4IceG/luci-app-sms-tool-js/issues/29

For Telcos in Africa it is quite common to have a deeply nested menu behind USSD codes. sms_tool (and mmclI) can handle that on the command line, but I noticed luci-app-sms-tool-js interprets every entry as a new session and complains that the replies are malformed. These USSD sessions offer a lot of services, with purchasing data bundles being the most important one for routers.

To give an example of what this looks like on the command line:

# sms_tool -d /dev/ttyUSB2 -R -r ussd "*149*01#"
1. North Offers
2. Just for You
3. Cheka,SMS&Pindua
4. Internet
5. RED Relax
6. NipigeTafu
7. Simba&Lifestyle
8. Tuzo
9. Roaming & International
10. Self Service
# sms_tool -d /dev/ttyUSB2 -R -r ussd "4"
1. Daily
2. Weekly
3. Monthly
4. Social+Video Bundles
5. 5G Bundles
6. 5G Home Internet
7. Buy for a friend
8. Showmax
9. Buy me a Bundle
10. Next
00 back
# sms_tool -d /dev/ttyUSB2 -R -r ussd "3"
1. Kasi/30 Days
2. Tsh 10000 = 4920MB
3. Tsh 20000 = 9800MB
4. Tsh 35000 = 17240MB
5. Tsh 50000 = 24600MB/60days
00 back
99 Main

It might be enough to relax the input validation, although it would be nice to have some information from sms_tool if it is going to interpret the ussd command as a follow-up response or a new command. (mmcli by comparison has --3gpp-ussd-initiate, --3gpp-ussd-respond and --3gpp-ussd-status)

Originally created by @stefand on GitHub (May 15, 2025). Original GitHub issue: https://github.com/4IceG/luci-app-sms-tool-js/issues/29 For Telcos in Africa it is quite common to have a deeply nested menu behind USSD codes. sms_tool (and mmclI) can handle that on the command line, but I noticed luci-app-sms-tool-js interprets every entry as a new session and complains that the replies are malformed. These USSD sessions offer a lot of services, with purchasing data bundles being the most important one for routers. To give an example of what this looks like on the command line: ``` # sms_tool -d /dev/ttyUSB2 -R -r ussd "*149*01#" 1. North Offers 2. Just for You 3. Cheka,SMS&Pindua 4. Internet 5. RED Relax 6. NipigeTafu 7. Simba&Lifestyle 8. Tuzo 9. Roaming & International 10. Self Service # sms_tool -d /dev/ttyUSB2 -R -r ussd "4" 1. Daily 2. Weekly 3. Monthly 4. Social+Video Bundles 5. 5G Bundles 6. 5G Home Internet 7. Buy for a friend 8. Showmax 9. Buy me a Bundle 10. Next 00 back # sms_tool -d /dev/ttyUSB2 -R -r ussd "3" 1. Kasi/30 Days 2. Tsh 10000 = 4920MB 3. Tsh 20000 = 9800MB 4. Tsh 35000 = 17240MB 5. Tsh 50000 = 24600MB/60days 00 back 99 Main ``` It might be enough to relax the input validation, although it would be nice to have some information from sms_tool if it is going to interpret the ussd command as a follow-up response or a new command. (mmcli by comparison has --3gpp-ussd-initiate, --3gpp-ussd-respond and --3gpp-ussd-status)
kerem closed this issue 2026-03-04 12:10:59 +03:00
Author
Owner

@4IceG commented on GitHub (May 16, 2025):

Hi,
I only maintain the user interface for LuCI, not for the sms-tool package itself. New version of package will include the missing functionality.

Image

<!-- gh-comment-id:2886684287 --> @4IceG commented on GitHub (May 16, 2025): Hi, I only maintain the user interface for LuCI, not for the sms-tool package itself. New version of package will include the missing functionality. ![Image](https://github.com/user-attachments/assets/53e520e9-39ba-4e1a-8287-d6c61d2a82e5)
Author
Owner

@stefand commented on GitHub (May 17, 2025):

I can confirm that it works. Thanks a lot!

I ran into issues with stale files in my browser cache, so if anyone else updates and still gets the old behavior: Clear your browser cache.

<!-- gh-comment-id:2888565733 --> @stefand commented on GitHub (May 17, 2025): I can confirm that it works. Thanks a lot! I ran into issues with stale files in my browser cache, so if anyone else updates and still gets the old behavior: Clear your browser cache.
Author
Owner

@4IceG commented on GitHub (May 23, 2025):

I have updated the package, the USSD menu should be even easier to use.

<!-- gh-comment-id:2905588367 --> @4IceG commented on GitHub (May 23, 2025): I have updated the package, the USSD menu should be even easier to use.
Author
Owner

@stefand commented on GitHub (May 24, 2025):

Thanks, the newest-first order of longer sessions is indeed helpful

<!-- gh-comment-id:2906919448 --> @stefand commented on GitHub (May 24, 2025): Thanks, the newest-first order of longer sessions is indeed helpful
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/luci-app-sms-tool-js#23
No description provided.