SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Sun May 19, 2024 20:08
SMSTools3 Community » Help and support Bottom

[solved] Problems with receiving sms using E169 Huawei modem

  This topic is locked

Page:  1

Author Post
Member
Registered:
Nov 2009
Location: Finland
Operating system name and version: Mandriva 2009.1
Version of smsd: 3.1.5
Smsd installed from: sources (with libmm for stats)
Name and model of a modem / phone: Huawei E169
Interface: USB

Hello,

I'm doing a little project related to sms-gateway running on linux and sms tools seems the right tool for the job. However i've run into some problems with my Huawei gsm/gprs modem. The modem is detected by kernel and gives three serial usb ttys to /dev/ttyUSB0 - 2. By using minicom serial application i've been able to send and read received messages just fine.

Yesterday I started to experiment with smstools3 and the configuration and setting a simple test enviroment was quite easy. Sending messages works very nicely but then i realized that it doesn't react to received sms messages at all.

First i suspect that there is something wrong with the modem settings, but then again, as this is pretty much the first time i'm dealing with a gsm device using AT commands i'm not fully sure how it's supposed to work.

**** AT and Modem **********************

The default settings seem to be fine as the modem uses SM as AT+CPMS message storage and all the rest of init commands seem to be ok as well. The new message indicator AT+CNMI might be one culprit as it's set to 0,0,0,0,0 by default. I've tried numerous combinations like 2,1,0,1,0 / 1,1,0,2,0 / 1,1,0,0,1 and so on. AT+CNMI=? gives a result: (0,1,2),(0,1,2,3),(0,2),(0,1,2),(0,1).

The second value of +CNMI as 1 seems to be related to what i'm looking for: "1: If SMS-DELIVER is stored into ME/TA, indication of the memory location is routed to 1 the TE using unsolicited result code: +CMTI: <mem>,<index>".

However, despite the CNMI settings the modem seems to be keeping sms messages as its own knowledge. I can't get any kind notification from received sms even when using minicom. Listing "REC UNREAD" (or 0 in pdu mode) messages with AT+CMGL works.

I wonder if AT+CNMA has something to do with this as it doesn't quite work as it should according to manual. All the AT+CNMA, AT+CNMA?, AT+CNMA=n (0-2) commands give me "+CMS ERROR 500" (unknown error) in pdu mode. AT+CNMA=? gives: (0,1,2) and in text mode AT+CNMA gives "OK" but the rest is same.

I've also tried to adjust AT+CSMP as the default was: ,,0,0 to 17,167,0,0 / 49,167,0,0 without any difference.

**** SMS Tools *************************

Okay, here's my tiny smsd.conf file:



It seems that the memory slots start from 0 as AT+CMGL lists the first entry as 0. I've tried all the memory check methods without any result. The part which makes me worried is that I tried pdu_from_file with memory check 0 / 1 and it didn't seem to work. The files in pdutest folder aren't handled and it doesn't do anything even if I point it to a file. It's quite strange as sending messages works fine like i mentioned earlier.

I presume that the other memory check methods would use some kind of polling mechanism, but as i haven't yet studied the sources carefully i'm not sure (C isn't quite my strongest point).

****************************************

I've tried to search info concerning the modem and AT configuration but no tweaks/tricks that i've tried have worked so far.

And thanks for all the help in advance.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Kulma wrote
I'm doing a little project related to sms-gateway running on linux and sms tools seems the right tool for the job.

Thank's for choosing Smstools3.

Two users in this community has reported this device as a working device with smstools3, but there is no information if any additional settings were required.

Kulma wrote
By using minicom serial application i've been able to send and read received messages just fine.

With Minicom, when you are not running smsd, and surely have at least one message received in the memory of a device, what is the response for a command AT+CPMS? ?
There should be count 1 or more listed, is there?

When there is for example 1,20 listed, a command AT+CMGR=1 or AT+CMGR=0 should work and read the message. Did you get any error message with those commands?

Kulma wrote
**** AT and Modem **********************
...

The setting AT+CNMI is usually required only with status reports. Setting AT+CNMA is not usually used at all. AT+CSMP is not required, because it's for text mode and smstools3 uses only PDU mode.

Kulma wrote
It seems that the memory slots start from 0 as AT+CMGL lists the first entry as 0.

Ok, but there is a bug in the smsd with this method and value, check this post for details if necessary (if default check_memory_method really does not work).

Kulma wrote
The part which makes me worried is that I tried pdu_from_file with memory check 0 / 1 and it didn't seem to work. The files in pdutest folder aren't handled and it doesn't do anything even if I point it to a file.

I'll check this later. After smsd got more methods for checking and reading a memory, this feature was limited to methods 0 and 1 only, and should work with those methods unless there is a bug...

What do you mean with "pointing"?

Kulma wrote
I presume that the other memory check methods would use some kind of polling mechanism, ...

Any method uses polling.


Unsolicited result codes from a modem are not officially used, but the latest version will detect those and will report those as an "unexpected input". Some input is still processed, but generally taken there should be no input from a modem is nothing was asked.

You have a manual (of AT command set) for this device? I did not find it with fast googling. If you like, you could sent it to me via email.

With your smsd.conf shown in the post, I think that receiving should work without init string. Can you show a piece of the log when there is a message but smsd cannot read it? You can use Private tags to protect your data, if necessary.

Member
Registered:
Nov 2009
Location: Finland
Topic owner
Okay,

As I said earlier i wasn't quite sure how the AT message receiving is exactly supposed to work. I guess it makes things whole lot easier if no reports from modem via AT are required in incoming messages.

keke wrote
With Minicom, when you are not running smsd, and surely have at least one message received in the memory of a device, what is the response for a command AT+CPMS? ?
There should be count 1 or more listed, is there?

First I deleted the modem memory with AT+CMGD=0,4, and it returned OK. Now AT+CPMS gives:
+CPMS: "SM",0,30,"SM",0,30,"SM",0,30

After sending sms to the modem AT+CPMS? gives:
+CPMS: "SM",1,30,"SM",1,30,"SM",1,30

keke wrote
When there is for example 1,20 listed, a command AT+CMGR=1 or AT+CMGR=0 should work and read the message. Did you get any error message with those commands?

AT+CMGR=1 gives now OK and AT+CMGR=0:
+CMGR: 0,,47
07915***rest of the message in PDU***************************************************


keke wrote
Ok, but there is a bug in the smsd with this method and value, check this post for details if necessary (if default check_memory_method really does not work).

Tried to modify it according to the thread replies, and it compiled nicely:



I did a tiny test and let sms tools run while sending sms to the modem. After that I tried sending sms using the outgoing queue. The test was done with following configuration:



Here's the log file of the test (with possibly sensitive data masked out):



I sent the sms to the modem between the 10:39 and 10:50 and smstools didn't respond to it in any manner. However the message I sent from smstools worked very nicely as seen in log.

keke wrote
I'll check this later. After smsd got more methods for checking and reading a memory, this feature was limited to methods 0 and 1 only, and should work with those methods unless there is a bug...

What do you mean with "pointing"?

Ehh, I guess just using a filename instead of directory as the syntax seems to hint that one can either use directory or plain file for pdu_from_file setting:

pdu_from_file = filename / directoryname/

At least I know the setting is checked as if I give a bogus directory the smstools will exit with error:

pdu_from_file directory /var/spool/pdutest_bogus cannot be opened.
There was 1 major problem found.



keke wrote
You have a manual (of AT command set) for this device? I did not find it with fast googling. If you like, you could sent it to me via email.

Well, to be honest i don't have manual for the device either. Closest thing I could find was "Huawei GTM900 Wireless Module AT Command Reference". At least the basic commands I tested worked as documented there but I have no idea of the overall accuracy of it in case of E169 though. (so maybe I shouldn't have referred it as a "manual" but instead as "some related Huawei documentation")

keke wrote
With your smsd.conf shown in the post, I think that receiving should work without init string. Can you show a piece of the log when there is a message but smsd cannot read it? You can use Private tags to protect your data, if necessary.

It really starts to seem more and more like smstools wouldn't even try to read the messages. As it can be seen from the logs it doesn't react or even give any errors on arrival of a message. I really wonder if this is "check the cables" type of a problem after all...


« Last edit by Kulma on Mon Nov 16, 2009 11:54, 176 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Everything looks fine, but...

Kulma wrote
It really starts to seem more and more like smstools wouldn't even try to read the messages.

Oops :oops:

Sorry, I had not noticed this from your first post even though I should have. You have not defined incoming = yes (or incoming = high) for the modem. This is why smstools does not try to read the messages. The log in your latest post says: "Will only send messages.", which is not clear enough :(. It also talks about check_memory_method, which is not relevant when messages are not read. The next version will fix this later message.


The patch is only needed when using GMGL. You could use CPMS for memory checking.

The feature pdu_from_file will work after incoming = yes is defined.

Member
Registered:
Nov 2009
Location: Finland
Topic owner
keke wrote
Sorry, I had not noticed this from your first post even though I should have. You have not defined incoming = yes (or incoming = high) for the modem. This is why smstools does not try to read the messages. The log in your latest post says: "Will only send messages.", which is not clear enough :(. It also talks about check_memory_method, which is not relevant when messages are not read. The next version will fix this later message.

The patch is only needed when using GMGL. You could use CPMS for memory checking.

The feature pdu_from_file will work after incoming = yes is defined.

Hey,

Guess what? It really works! :D

But to be honest, this is also pretty embarassing as I thought I had carefully read the configuration documentation and the sms tools log files... :oops:

(The log entry informing about the "message only" mode just nicely splits with 80 character wide textmode so that it's really easy to miss)

But anyway, thanks for the help!

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Ok, I have now changed the message to it's own line in the next version. Also the F.A.Q. is updated.

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.