simbabarry / smslib

Automatically exported from code.google.com/p/smslib
0 stars 0 forks source link

Huawei E220 #438

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm trying to use a Huawei E220 for reading and sending SMS. When I try to read 
I receive no error but no messages are found in inbox, even it is not empty. 
When trying to send a SMS, the logs look like this:

18265 [main] DEBUG smslib  - GTW: modem.com4: Sending Pdu: 
07910427894639F011000B910427894639F00000FF07EDF9995EC6D301
18265 [main] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGS=21(cr)
18467 [main] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
19467 [main] DEBUG smslib  - GTW: modem.com4: SEND 
:07910427894639F011000B910427894639F00000FF07EDF9995EC6D301
21530 [main] DEBUG smslib  - GTW: modem.com4: BUFFER: +CMS ERROR: 500

21532 [main] DEBUG smslib  - GTW: modem.com4: RECV :+CMS ERROR: 500(cr)
21532 [main] WARN  smslib  - GTW: modem.com4: CMS Error 500: Retrying...
22548 [QueueManager [modem.com4]] DEBUG smslib  - Running...
24532 [main] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGS=21(cr)
24733 [main] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
25733 [main] DEBUG smslib  - GTW: modem.com4: SEND 
:07910427894639F011000B910427894639F00000FF07EDF9995EC6D301
27548 [QueueManager [modem.com4]] DEBUG smslib  - Running...
27870 [main] DEBUG smslib  - GTW: modem.com4: BUFFER: +CMS ERROR: 500

27871 [main] DEBUG smslib  - GTW: modem.com4: RECV :+CMS ERROR: 500(cr)
27871 [main] WARN  smslib  - GTW: modem.com4: CMS Error 500: Retrying...
30034 [WatchDog] DEBUG smslib  - Running...
30077 [CNMIEmulatorProcessor [modem.com4]] DEBUG smslib  - Running...
30871 [main] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGS=21(cr)
31072 [main] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
32072 [main] DEBUG smslib  - GTW: modem.com4: SEND 
:07910427894639F011000B910427894639F00000FF07EDF9995EC6D301
32548 [QueueManager [modem.com4]] DEBUG smslib  - Running...
34078 [main] DEBUG smslib  - GTW: modem.com4: BUFFER: +CMS ERROR: 500

34078 [main] DEBUG smslib  - GTW: modem.com4: RECV :+CMS ERROR: 500(cr)
34079 [main] ERROR smslib  - GTW: modem.com4: CMS Error 500: Quit retrying, 
message lost...
34079 [main] INFO  SmsServer  - << Finished sending message.

Do you have any ideea what could go wrong?
I already set the smscNumber for both reading and sending SMS. I don't know if 
it matters but I'm using Windows Vista as OS.

Thanks a lot,
Iulia

Original issue reported on code.google.com by iulia.ri...@gmail.com on 30 Oct 2011 at 8:12

GoogleCodeExporter commented 9 years ago
I will add the logs for reading messages here:

18064 [main] INFO  SmsServer  - Begin reading messages!
18065 [main] DEBUG smslib  - GTW: modem.com5: SEND :AT+CPMS="ME"(cr)
18072 [main] DEBUG smslib  - GTW: modem.com5: BUFFER: +CPMS: 0,255,0,10,0,10
OK

18073 [main] DEBUG smslib  - GTW: modem.com5: RECV :+CPMS: 
0,255,0,10,0,10(cr)OK(cr)
18073 [main] DEBUG smslib  - GTW: modem.com5: SEND :AT+CMGL=4(cr)
18078 [main] DEBUG smslib  - GTW: modem.com5: BUFFER: OK

18078 [main] DEBUG smslib  - GTW: modem.com5: RECV :OK(cr)
18082 [main] DEBUG smslib  - GTW: modem.com5: SEND :AT+CPMS="SM"(cr)
18089 [main] DEBUG smslib  - GTW: modem.com5: BUFFER: +CPMS: 0,10,0,10,0,10
OK

18089 [main] DEBUG smslib  - GTW: modem.com5: RECV :+CPMS: 
0,10,0,10,0,10(cr)OK(cr)
18090 [main] DEBUG smslib  - GTW: modem.com5: SEND :AT+CMGL=4(cr)
18095 [main] DEBUG smslib  - GTW: modem.com5: BUFFER: OK

18095 [main] DEBUG smslib  - GTW: modem.com5: RECV :OK(cr)
18095 [main] DEBUG smslib  - GTW: modem.com5: SEND :AT+CPMS="SR"(cr)
18101 [main] DEBUG smslib  - GTW: modem.com5: BUFFER: +CPMS: 0,10,0,10,0,10
OK

18101 [main] DEBUG smslib  - GTW: modem.com5: RECV :+CPMS: 
0,10,0,10,0,10(cr)OK(cr)
18101 [main] DEBUG smslib  - GTW: modem.com5: SEND :AT+CMGL=4(cr)
18106 [main] DEBUG smslib  - GTW: modem.com5: BUFFER: OK

18106 [main] DEBUG smslib  - GTW: modem.com5: RECV :OK(cr)
18106 [main] DEBUG smslib  - GTW: modem.com5: CheckMpMsgList(): MAINLIST: 0
18106 [main] INFO  SmsServer  - End reading messages

Original comment by iulia.ri...@gmail.com on 30 Oct 2011 at 8:45

GoogleCodeExporter commented 9 years ago
Hi,

Huawei modems usually create two virtual com ports.
Locate the two ports and try both in order to check which one works.

Original comment by T.Delenikas on 30 Oct 2011 at 8:58

GoogleCodeExporter commented 9 years ago
Hi,

You are right. There are 2 virtual ports created. I checked the 2 ports and try 
with both buy I had the same result. 
Anyway I found something interesting. The modem comes with a software. I 
installed it and start the application. I think this was the problem. I was 
sending SMS, and the application was reading it, before my Java program did. 
So, theoretically, I didn't have any messages to read. 
I stopped the application, start the Java program and I sent an SMS. The 
inboundNotification process was called and after that the readMessages() method 
showed me the message.
Please, correct me if I'm wrong :D

Thanks for the quick answer,
Iulia

Original comment by iulia.ri...@gmail.com on 3 Nov 2011 at 6:38

GoogleCodeExporter commented 9 years ago
Yes, you are correct.
You shouldn't run any modem software, except (needed in some case) from plain 
modem drivers.

I happen to have an E220 and works ok with SMSLib.

So I guess everything is OK. :)

Original comment by T.Delenikas on 3 Nov 2011 at 7:01