4IceG / luci-app-sms-tool-js

Simple user interface to handle SMS / USSD / AT commands via sms_tool application. (LuCI JS) | OpenWrt >= 21.02
GNU General Public License v3.0
26 stars 15 forks source link

USSD issue #17

Open kartman521 opened 4 months ago

kartman521 commented 4 months ago

Hello! There is a problem with sending USSD commands via luci-app-sms-tool-js. When I send a USSD command from the terminal (sms_tool -d /dev/ttyUSB1 ussd "*100#") I receive a response from the operator. When I try to send any command through LUCI, nothing simply happens. If you enable the checkbox in the "Sending USSD code in plain text" settings, an error is sent and returned; if the checkbox is unchecked, nothing happens at all. In the settings, the port is set to the same as when sending from the console (ttyUSB1)

Tested in Firefox 124 and Chrome 123.

kartman521 commented 4 months ago

Also, after many attempts to send a USSD command, SMS messages in LUCI stopped being displayed completely. At the same time, everything is accessible through the terminal

Screenshot 2024-04-16 at 1 57 34 AM Screenshot 2024-04-16 at 2 01 00 AM
4IceG commented 4 months ago

Hello! There is a problem with sending USSD commands via luci-app-sms-tool-js. When I send a USSD command from the terminal (sms_tool -d /dev/ttyUSB1 ussd "*100#") I receive a response from the operator. When I try to send any command through LUCI, nothing simply happens. If you enable the checkbox in the "Sending USSD code in plain text" settings, an error is sent and returned; if the checkbox is unchecked, nothing happens at all. In the settings, the port is set to the same as when sending from the console (ttyUSB1)

Tested in Firefox 124 and Chrome 123.

Hi, @kartman521 Replace the sendussd.js (\www\luci-static\resources\view\modem) file and check if it will be OK after replacing it. Remember to clear your browser cache before testing.

sendussd.zip

4IceG commented 4 months ago

Also, after many attempts to send a USSD command, SMS messages in LUCI stopped being displayed completely. At the same time, everything is accessible through the terminal

If there are no text messages, there is a bigger problem because I can't see your messages, you would have to show me the result of the sms_tool -d /dev/ttyUSB1 -j recv command, it is possible that some message destroys the json layout and therefore does not show anything.

Do you have split message merging enabled? Have you checked without and with this option?

kartman521 commented 4 months ago

If there are no text messages, there is a bigger problem because I can't see your messages, you would have to show me the result of the sms_tool -d /dev/ttyUSB1 -j recv command, it is possible that some message destroys the json layout and therefore does not show anything.

Hello! Yesterday I cleared the modem memory and disabled SMS merging, after which they began to be displayed. Message merging was enabled at the time of the crash. I'll attach a screenshot of yesterday's command execution (when there was a display problem). I will also write the text from the SMS that led to the breakdown. They are in Russian, perhaps this is due to the Cyrillic alphabet (SMS "На номере 7999хххх услуга "Доступ без настроек" отключена. Cпасибо, что Вы с нами. МТС"). Also, sometimes SMS messages come in Georgian, I don’t know how such text is encoded)

322640713-2279a79f-7e57-4a04-9160-99088540d709

Replace the sendussd.js (\www\luci-static\resources\view\modem) file and check if it will be OK after replacing it. Remember to clear your browser cache before testing.

Unfortunately it didn’t help, it breaks the SMS sending page completely)

SyntaxError Unexpected token 'if' in http://10.0.0.1/luci-static/resources/view/modem/sendussd.js?v=git-24.073.29889-cd7e519:? at http://10.0.0.1/luci-static/resources/luci.js?v=git-24.073.29889-cd7e519:179:29

4IceG commented 4 months ago

Later I will send new/fixed files for testing.

Unfortunately, I don't know how individual languages ​​are encoded, so users must remember that the sms-tool may work variously/unpredictably.

We have already a case where the language itself was displayed correctly except for one symbol that the operator decided to add to the name of the message sender. Therefore, sometimes it is worth saving such a message because maybe we will be able to prepare an sms-tool for it later.

4IceG commented 4 months ago

Hi @kartman521 Ok, USSD codes should work.

Replace the sendussd.js (\www\luci-static\resources\view\modem) file and check if it will be OK after replacing it. sendussd.zip