Sending SMS with some characters gives NULL NULL NULL

Started by abak, July 30, 2020, 05:54:39 pm

Previous topic - Next topic

abak

Hello Roman Novgorodov,

This occurs with French alphabet.

For exemple try on the GSMDemo to send just one character :  é  or  è  or  ù 
and you will see the problem.

How can we solve this ?
Thx.

Cheers
Zerrouki

______________________
PS: On Modem ZTE MF831
Delphi  10.3.3  Pro

Roman Novgorodov

Hello

Thank you for your information.
I need more details about this problem.
Can you post here ZIP with complete LOG file?
The log file with diagnostic info and with info during SMS sending and receiving.

Possible we will see device model and SMS encoding format in LOG file.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

abak

Thank you Roman Novgorodov,

Sorry for the delay.

Here is a link to download the log diagnostic files.

www.abaksoft.net/demo/log.zip


I joined Diagnostic for both  Sending / Receiving.

Regards
________
Zerrouki


Roman Novgorodov

Hello

Thank you for detailed information.

Please try new GSMDemo from link below.

You need to choose 7bit encoding from new combo box before send sms. Check result on remote side.

For SMS receiving you need to check HEX codes of result chars. I've added necessary code into demo.

http://nrcommlib.com/nrcomm/GSMDemo_w_encoding.zip

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

abak

Quote from: Roman Novgorodov on August 02, 2020, 07:33:59 amYou need to choose 7bit encoding from new combo box before send sms. Check result on remote side.
For SMS receiving you need to check HEX codes of result chars. I've added necessary code into demo.
Roman Novgorodov
DeepSoftware llc

Great !

Results :

1. Sending French characters : ù é û è 

- 16 bit : OK. The charcaters are well transmit. I received the good message on remote side Mobile.
- 7 bit  : Not OK.  Characters are transmit but in an other Encoding : ù é û è  gives  y i ? h
- 8 and Auto Encoding = Not OK.  Remote side Mobile Message Application Closed


2. Receiving

You will find the HEX codes in log file (as my modem ZTE is a Key USB, I can'not check the result).


Finally :
I will use your new methode (SendPduSms) with encoding 16 bits.
But I have some questions :
1. Assuming 1 SMS (< 160 char) in 16 bits encoding, will it consume more credit money ?
2. What a bout SmsSendWaitRefID (for many sms) How can we adapte it for working like SendPduSms (wich gives the encoding) ?

Thx a lot.

________
Zerrouki


www.abaksoft.net/demo/log2.zip

Roman Novgorodov

Hello

16 bit encoding is UNICODE for support multi language texts.
It takes two bytes per one char.

Therefore your SMS message contains 80 chars only or separated on several parts for longer data.

You can use overloaded method for send PDU and get RefId:

function SmsSendWaitRefID(aPDU:TnrPduSms):string;
Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

abak

Quote from: Roman Novgorodov on August 02, 2020, 12:44:38 pmHello

16 bit encoding is UNICODE for support multi language texts.
It takes two bytes per one char.

Therefore your SMS message contains 80 chars only or separated on several parts for longer data.

You can use overloaded method for send PDU and get RefId:

function SmsSendWaitRefID(aPDU:TnrPduSms):string;
Roman Novgorodov



Thx again.
Really appreciate your help and product :)