[GH-ISSUE #7] received SMS messages are out of order #5

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

Originally created by @bam80 on GitHub (Aug 11, 2023).
Original GitHub issue: https://github.com/4IceG/luci-app-sms-tool-js/issues/7

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 опла
Originally created by @bam80 on GitHub (Aug 11, 2023). Original GitHub issue: https://github.com/4IceG/luci-app-sms-tool-js/issues/7 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 опла
kerem closed this issue 2026-03-04 12:10:47 +03:00
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1674619711 --> @4IceG commented on GitHub (Aug 11, 2023): 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.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1674661630 --> @bam80 commented on GitHub (Aug 11, 2023): 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.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1674672069 --> @bam80 commented on GitHub (Aug 11, 2023): 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.
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

Did you choose an advanced algorithm?

<!-- gh-comment-id:1674675274 --> @4IceG commented on GitHub (Aug 11, 2023): Did you choose an advanced algorithm?
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

Oh, advanced algorithm helped. Thanks a lot!

<!-- gh-comment-id:1674681851 --> @bam80 commented on GitHub (Aug 11, 2023): Oh, advanced algorithm helped. Thanks a lot!
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

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

<!-- gh-comment-id:1674682345 --> @4IceG commented on GitHub (Aug 11, 2023): What modem is it? I see that it has a problem with numbering fragments of messages.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

Quectel EP06-E

<!-- gh-comment-id:1674685150 --> @bam80 commented on GitHub (Aug 11, 2023): Quectel EP06-E
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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

<!-- gh-comment-id:1674692053 --> @bam80 commented on GitHub (Aug 11, 2023): So it's not possible to apply the same algorithm for unmerged messages? It looks to me it should be technically possible.
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

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

<!-- gh-comment-id:1674703242 --> @4IceG commented on GitHub (Aug 11, 2023): There is no need to do this. Users prefer to combine longer text messages anyway for convenience of reading.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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).

<!-- gh-comment-id:1674727913 --> @bam80 commented on GitHub (Aug 11, 2023): > 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).
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1674872637 --> @4IceG commented on GitHub (Aug 11, 2023): 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.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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..

<!-- gh-comment-id:1674961361 --> @bam80 commented on GitHub (Aug 11, 2023): > 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..
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1675000181 --> @4IceG commented on GitHub (Aug 11, 2023): 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.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1675040063 --> @bam80 commented on GitHub (Aug 11, 2023): 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.
Author
Owner

@4IceG commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1675167402 --> @4IceG commented on GitHub (Aug 11, 2023): > 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.
Author
Owner

@bam80 commented on GitHub (Aug 11, 2023):

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.

<!-- gh-comment-id:1675180348 --> @bam80 commented on GitHub (Aug 11, 2023): > 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.
Author
Owner

@4IceG commented on GitHub (Aug 12, 2023):

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

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

<!-- gh-comment-id:1675899445 --> @4IceG commented on GitHub (Aug 12, 2023): @bam80 Replace this file and check if the messages are sorted without merging them. [new_readsms.zip](https://github.com/4IceG/luci-app-sms-tool-js/files/12327370/new_readsms.zip) `/www/luci-static/resources/view/modem`
Author
Owner

@bam80 commented on GitHub (Aug 13, 2023):

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

<!-- gh-comment-id:1676349439 --> @bam80 commented on GitHub (Aug 13, 2023): @4IceG many thanks, that helped! Will you do a commit?
Author
Owner

@4IceG commented on GitHub (Aug 13, 2023):

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

<!-- gh-comment-id:1676351479 --> @4IceG commented on GitHub (Aug 13, 2023): I only uploaded the file to the sources on github, I did not compile the new version.
Author
Owner

@bam80 commented on GitHub (Aug 13, 2023):

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

<!-- gh-comment-id:1676351690 --> @bam80 commented on GitHub (Aug 13, 2023): Wait, I can't reproduce the problem with the old file..
Author
Owner

@bam80 commented on GitHub (Aug 13, 2023):

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?

<!-- gh-comment-id:1676353914 --> @bam80 commented on GitHub (Aug 13, 2023): > 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?
Author
Owner

@4IceG commented on GitHub (Aug 13, 2023):

Try clearing cache in your browser.

<!-- gh-comment-id:1676355186 --> @4IceG commented on GitHub (Aug 13, 2023): Try clearing cache in your browser.
Author
Owner

@bam80 commented on GitHub (Aug 13, 2023):

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

<!-- gh-comment-id:1676356072 --> @bam80 commented on GitHub (Aug 13, 2023): Didn't help, still no issue. You code didn't change the order in the modem I suppose?
Author
Owner

@4IceG commented on GitHub (Aug 13, 2023):

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

<!-- gh-comment-id:1676358163 --> @4IceG commented on GitHub (Aug 13, 2023): Added code programmatically sorts all parts of the message, I don't touch anything in the modem.
Author
Owner

@4IceG commented on GitHub (Aug 17, 2023):

@bam80 What's not working this time?

<!-- gh-comment-id:1682348513 --> @4IceG commented on GitHub (Aug 17, 2023): @bam80 What's not working this time?
Author
Owner

@bam80 commented on GitHub (Aug 17, 2023):

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.

<!-- gh-comment-id:1682370013 --> @bam80 commented on GitHub (Aug 17, 2023): 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.
Author
Owner

@4IceG commented on GitHub (Aug 17, 2023):

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

<!-- gh-comment-id:1682662729 --> @4IceG commented on GitHub (Aug 17, 2023): If it works then ok :wink:. I will not look for the issue because I have never seen it.
Author
Owner

@bam80 commented on GitHub (Aug 17, 2023):

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

<!-- gh-comment-id:1682677133 --> @bam80 commented on GitHub (Aug 17, 2023): I still use old version to have a chance to catch the problem again
Author
Owner

@bam80 commented on GitHub (Aug 28, 2023):

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?

<!-- gh-comment-id:1695688821 --> @bam80 commented on GitHub (Aug 28, 2023): 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?
Author
Owner

@4IceG commented on GitHub (Aug 29, 2023):

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

<!-- gh-comment-id:1697340794 --> @4IceG commented on GitHub (Aug 29, 2023): I plan to update the package this week. If I have time, I'll think about whether to change it and possibly how.
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#5
No description provided.