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

received SMS messages are out of order #7

Closed bam80 closed 1 year ago

bam80 commented 1 year ago

If incoming message spans over multiple SMS, they usually come disordered. In this sample, the right messages order is numbered on the left:


1.  | YOTA | 2022-09-19 01:15 | Пакет 0 мин и 50 Гб не может быть продлен. Доступ в интернет заблок
3.  | YOTA | 2022-09-19 01:15 | чиваются поштучно. Пожалуйста, обратитесь к сотруднику вашей компан
4.  | YOTA | 2022-09-19 01:15 | ии, управляющему услугами связи. Команда Yota для бизнеса
2.  | YOTA | 2022-09-19 01:15 | ирован. Исходящие вызовы оплачиваются поминутно. Исходящие SMS опла
4IceG commented 1 year ago

I have no influence on how the SMS arrives and how it is divided. Some modems make sorting even more difficult by saving SMS in random order.

If you want to have beautiful text messages, turn on merging split messages. only there I sort their content, without merging only the date is sorted.

bam80 commented 1 year ago

I enabled the merging split messages but still they are merged in the same wrong way. Please reopen the issue, it's definitely a problem.

bam80 commented 1 year ago

For the same OP messages, I've got following with the merge enabled:

YOTA | 2022-09-19 01:15 | Пакет  0 мин и 50 Гб не может быть продлен. Доступ в интернет заблокчиваются  поштучно. Пожалуйста, обратитесь к сотруднику вашей компании,  управляющему услугами связи. Команда Yota для бизнесаирован. Исходящие  вызовы оплачиваются поминутно. Исходящие SMS опла

You can see it's just merging the messages in the same wrong order.

4IceG commented 1 year ago

Did you choose an advanced algorithm?

bam80 commented 1 year ago

Oh, advanced algorithm helped. Thanks a lot!

4IceG commented 1 year ago

What modem is it? I see that it has a problem with numbering fragments of messages.

bam80 commented 1 year ago

Quectel EP06-E

bam80 commented 1 year ago

So it's not possible to apply the same algorithm for unmerged messages? It looks to me it should be technically possible.

4IceG commented 1 year ago

There is no need to do this. Users prefer to combine longer text messages anyway for convenience of reading.

bam80 commented 1 year ago

If you want to have beautiful text messages, turn on merging split messages. only there I sort their content, without merging only the date is sorted.

Could we try to apply the chosen sorting algorithm even without merging, please? At least as an option, if needed (but I just don't see the need to make it optional). Otherwise, the issue does not look quite solved for me. It's not obvious for users the advanced sorting works only for merged messages, they don't even see the sorting algorithms before they switch on the merging (which is really confusing).

4IceG commented 1 year ago

At the moment, I do not plan to introduce it, I also do not have enough free time to sit on the package.

That is why the application has a configuration panel so that the user can adjust the operation of the package according to his needs and his modem, this is how it should work.

Unfortunately, nowadays people do not read, do not want to read. Options appear when user turn them on, logical, user just have to be willing to read them.

bam80 commented 1 year ago

Options appear when user turn them on, logical, user just have to be willing to read them.

That's actually a problem itself. Logically, the sorting algorithm shouldn't depend on whether the messages are merged or not. They should just equally be sorted according to the sorting option which should always be available.

As a workaround, could we maybe make that sorting option visible all the time, and only have it clickable when merging is enabled? In the other times, it will be grayed out. That way users will always see there is such an option at least, and the algorithm is Simple by default. That will be a clue they need to change some other options (merging in this case) to get access to the sorting algorithm.

Anyway, could we keep the issue open until it solved one way or another please? Reporting problems is hard work itself, and closing unsolved issues undermines the efforts..

4IceG commented 1 year ago

My package has been downloaded 9,000 times and you are the only user who doesn't like my logic and needs to be changed. You still require my package to fix modem fw bugs.

It's not a problem, everything works as I planned and tested. Unless you noticed, I don't ask the user whether the text messages are to be sorted, I only do it to the extent that I need it.

Another thing is that the modem has fw bugs and cannot arrange the messages correctly. All modems that I have do it correctly.

I guess it's time to stop making packages now that there are smarter users and they know better how my package is supposed to work.

bam80 commented 1 year ago

I'm just the first one who reported it, others didn't bother. But the problem still persists.

You still require my package to fix modem fw bugs.

In case it's really a fw bug. Are you sure modems must do that? Is there any spec requiring it? Anyway, for some reason you made a fw workaround for merged messages but not for split ones. Whereas it's equally important in the both cases.

Is it really hard to implement or you just don't have time currently? As I see it, instead of "Merge algorithm" dropdown menu there should be a global "Fix sorting" tick, with the explanation why it might be needed.

PS: I just got an idea that maybe it depends on the order the messages are sent and they are just stored in this order. In that case it's not a fw bug but just a operator-specificity.

4IceG commented 1 year ago

In case it's really a fw bug. Are you sure modems must do that? Is there any spec requiring it?

If the modem doesn't have to do it, why do I have to?

Anyway, for some reason you made a fw workaround for merged messages but not for split ones.

I made such an option because I didn't see it anywhere else.

Whereas it's equally important in the both cases.

Is it really hard to implement or you just don't have time currently? As I see it, instead of "Merge algorithm" dropdown menu there should be a global "Fix sorting" tick, with the explanation why it might be needed.

I don't have a problem with sms, so for me it's a complete waste of time. You still don't understand. The sorting of sms is done without the user's knowledge. The user only has the choice of whether he wants the split messages to be merged or not.

Is it really hard to implement or you just don't have time currently?

Both. I don't have that much free time now, the second thing is that I don't need it at all (I always have the merge of split text messages on), the third thing is it's not that easy to add, I remember how much time I spent adding what is there now.

In that case it's not a fw bug but just a operator-specificity.

I don't have another SIM card, so I won't check how it works with different operators.

bam80 commented 1 year ago

If the modem doesn't have to do it, why do I have to?

Because it's you who presents the messages to user. Modem just provides the data. And also because you can. Whereas we don't have access to the modem's fw.

Anyway, I see the discussion leads us nowhere. So all I'm asking for now is to keep this issue open. Because obviously it's still an issue from a user's POV.

4IceG commented 1 year ago

@bam80 Replace this file and check if the messages are sorted without merging them.

new_readsms.zip /www/luci-static/resources/view/modem

bam80 commented 1 year ago

@4IceG many thanks, that helped! Will you do a commit?

4IceG commented 1 year ago

I only uploaded the file to the sources on github, I did not compile the new version.

bam80 commented 1 year ago

Wait, I can't reproduce the problem with the old file..

bam80 commented 1 year ago

Wait, I can't reproduce the problem with the old file..

I even reinstalled the package, but still have no problem now. Do you know the reason?

4IceG commented 1 year ago

Try clearing cache in your browser.

bam80 commented 1 year ago

Didn't help, still no issue. You code didn't change the order in the modem I suppose?

4IceG commented 1 year ago

Added code programmatically sorts all parts of the message, I don't touch anything in the modem.

4IceG commented 1 year ago

@bam80 What's not working this time?

bam80 commented 1 year ago

Did I tell something isn't working? I still couldn't reproduce original issue for some reason, so I can't test your change. Thanks for dealing anyway.

4IceG commented 1 year ago

If it works then ok :wink:. I will not look for the issue because I have never seen it.

bam80 commented 1 year ago

I still use old version to have a chance to catch the problem again

bam80 commented 1 year ago

OK there is update from me - I was able to reproduce the problem on the old version and can confirm the new one helps. Thank you!

I'm not sure why I wasn't able to reproduce it earlier though..

As an other note, it still looks awkward when one switches on "Merge split messages" and the messages become out of order suddenly. Could we make Advanced for "Merge algorithm" by default maybe to mitigate that?

4IceG commented 1 year ago

I plan to update the package this week. If I have time, I'll think about whether to change it and possibly how.