Giter VIP home page Giter VIP logo

sms's People

Contributors

kharry5 avatar warthog618 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sms's Issues

Issue when emoji is located on boundary between two segments?

xxxxx xx x x xx xx xx xxx xxx xxx xxx xxxx xxxx xxxxx xxx xxx xxx xx👋xxxxx xx x x xx xx xx xxx xxx xxxxxxxx xx x x xx xx xx xxx xxx 👋cc cscdz cds cds cdsc sdcdscdscdsccds cds cds cdsc cdscds cds cdsc

I think this message should fit within 3 segments, but are encoded as 4 using sms.Encode() without any extra parameters.
Compared against two other independent sources which both suggest 3.

Output:

{1 65 {0 } 0 1 0 0 {0 } {0 } DCS|UDL 0001-01-01 00:00:00 +0000 0001-01-01 00:00:00 +0000 0 0 0x08 UCS-2 {Not Present 0001-01-01 00:00:00 +0000 0s 0} [{0 [1 4 1]}] [0 120 0 120 0 120 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 32 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120]}

{1 65 {0 } 0 2 0 0 {0 } {0 } DCS|UDL 0001-01-01 00:00:00 +0000 0001-01-01 00:00:00 +0000 0 0 0x08 UCS-2 {Not Present 0001-01-01 00:00:00 +0000 0s 0} [{0 [1 4 2]}] [0 120 216 61 220 75 0 120 0 120 0 120 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 32 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 120 0 120 0 120 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 32 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 32 0 120 0 120 0 120 0 32 0 120 0 120 0 120 0 32]}

{1 65 {0 } 0 3 0 0 {0 } {0 } DCS|UDL 0001-01-01 00:00:00 +0000 0001-01-01 00:00:00 +0000 0 0 0x08 UCS-2 {Not Present 0001-01-01 00:00:00 +0000 0s 0} [{0 [1 4 3]}] [216 61 220 75 0 99 0 99 0 32 0 99 0 115 0 99 0 100 0 122 0 32 0 99 0 100 0 115 0 32 0 99 0 100 0 115 0 32 0 99 0 100 0 115 0 99 0 32 0 115 0 100 0 99 0 100 0 115 0 99 0 100 0 115 0 99 0 100 0 115 0 99 0 99 0 100 0 115 0 32 0 99 0 100 0 115 0 32 0 99 0 100 0 115 0 32 0 99 0 100 0 115 0 99 0 32 0 99 0 100 0 115 0 99 0 100 0 115 0 32 0 99 0 100 0 115 0 32 0 99 0 100 0 115]}

{1 65 {0 } 0 4 0 0 {0 } {0 } DCS|UDL 0001-01-01 00:00:00 +0000 0001-01-01 00:00:00 +0000 0 0 0x08 UCS-2 {Not Present 0001-01-01 00:00:00 +0000 0s 0} [{0 [1 4 4]}] [0 99]}

Moving both emojis a couple of characters will make it encode as 3.

Receiving multiple SMS at once

Hi,

thanks for great library. I'm using it for receiving sms. My usecase if I can receive at same time like 70 sms at once. Does library will handle it asynchronously (have some internal buffer or how it is done please)? Also do I need to delete received SMS (I juts know if from older phones that they refuse to receive is some number of SMS is received). Thanks.

tpdu: error decoding SmsDeliver.ud.sm at octet XX: overlength

Ran into this trying to decode a message from AT&T. This message is a response to a balance inquiry USSD command.

PDU#1:
07912180958739F144038102F100001211304113338A940608041E96020141AA890A32CACB6550737ED6298675B9BCECA683C46176D83D2EEB4002980B065340C3F976D94D0791EB6510394C2FEB40B1D84B367BC9620A64FA8C6ECDE1E53219440ED3C32079B91D4EBBD3EEB30E5473C160A0A350410DB3D72013885EC6D375A0AA9B9D6EA7E965B2E258A683C8657A38CD9E83C26E32A80D

PDU#2:
07912180958739F144038102F100001211304113338A2F0608041E9602026177F85C06E5DF7539283C1EBFEB6E3A284C0785E974D7F8DD7EB5F37079191E4E9341

1st PDU is decoded ok, but 2nd one trips the "overlength" check here:
https://github.com/warthog618/sms/blob/master/encoding/tpdu/tpdu.go#L912

I'm not sure why...

Wrong encoding

Hello. Thank you for a great project.
I faced with a problem. I'm trying to encode tpdu sms to send it from sim800l GSM module and got an error. While SMS encoded with online tool https://www.smsdeliverer.com/online-sms-pdu-encoder.aspx module sending fine.
Result tpdu:
From online tool (length 26) - 0011000B919730171111F10008FF0C041F04400438043204350442
From this package (length 25) - 01010b919730171111f100080c041f04400438043204350442
Vise versa I can't decode tpdu with online tool https://www.smspdu.be/ while the first (decoded online) tpdu works fine.

Also tpdu mentioned in a Readme file of this project - 010105912143f500000bc8329bfd06dddf723619 can't be decoded with online tool https://www.smspdu.be/

My code:

	var number, msg = "+79037111111", "Привет"
	options := []sms.EncoderOption{sms.To(number)}
	pdus, err := sms.Encode([]byte(msg), options...)
	if err != nil {
		log.Println(err)
		return
	}
	for i, p := range pdus {
		b, _ := p.MarshalBinary()
		fmt.Printf("Submit TPDU %d (len %d):\n%s\n", i+1, len(b), hex.EncodeToString(b))
	}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.