Giter VIP home page Giter VIP logo

Comments (8)

tomchy avatar tomchy commented on August 15, 2024
  1. How do you switch into UCS2 encoding?
  2. It is always worth checking if you are using the correct library (with -new suffix) and the latest release (0.12).

from python-gsmmodem.

TishSerg avatar TishSerg commented on August 15, 2024
  1. Your library switches it automatically when fails to encode text using GSM-7 coding. File pdu.py, lines 299-307:
    # Encode message text and set data coding scheme based on text contents
    try:
        encodedTextLength = len(encodeGsm7(text))
    except ValueError:
        # Cannot encode text using GSM-7; use UCS2 instead
        encodedTextLength = len(text)
        alphabet = 0x08 # UCS2
    else:
        alphabet = 0x00 # GSM-7
  1. Of course, library version is correct (v0.12 w/ -new suffix)

from python-gsmmodem.

TishSerg avatar TishSerg commented on August 15, 2024

Sorry. I've misclicked.

from python-gsmmodem.

tomchy avatar tomchy commented on August 15, 2024

Could you dump produced PDUs?

After line 919 of modem.py add:

self.log.error("Debug PDUs.---\nMessage: {0}\n---\n---PDU: ---\n".format(text))
for p in pdus:
    self.log.error(str(codecs.encode(p.data, 'hex_codec')).upper())
self.log.error("---")

from python-gsmmodem.

TishSerg avatar TishSerg commented on August 15, 2024

Sorry, at this time I don't have that hardware. When I will be able to do this, I'll let you know.

from python-gsmmodem.

babca avatar babca commented on August 15, 2024

@TishSerg Any update on this? :-)

from python-gsmmodem.

TishSerg avatar TishSerg commented on August 15, 2024

Oops. I've completely forgotten about it.
Now, I'm not working with hardware anymore, so cannot reproduce this :(
Sorry.

from python-gsmmodem.

babca avatar babca commented on August 15, 2024

Anyone up and running any modem with this library? Could you try to send the text/code from the first post (above) in SMS?

@TishSerg it could be a generic issue, let's see. Thanks for the prompt reply. :-)

from python-gsmmodem.

Related Issues (20)

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.