faucamp / python-gsmmodem

Python module to control a GSM modem attached to the system: send/receive SMS messages, handle calls, etc
GNU Lesser General Public License v3.0
384 stars 302 forks source link

Unable to send unicode sms #32

Open ibrahimgha opened 10 years ago

ibrahimgha commented 10 years ago

Is there a way to tell the sendSms function that it should send unicode text? I am trying to send arabic text which I am reading from a file but the sending process fails with error code 304. please help

faucamp commented 10 years ago

python-gsmmodem should be able to send arabic text using UCS-2 encoding when in PDU mode. GSM error 304 means "invalid PDU mode parameter" - what modem are you using? Some Motorola modems have a bug that prevent them from being able to send any messages that include UDH (User Data Header).

Could you please paste your script and/or the the SMS text you are attempting to send, so I can check if the PDU is being created properly?