|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Thu Nov 21, 2024 23:03 |
Login and Post Reply
Page: 1 2 Next
Author |
Post |
|
#1 Sat Oct 09, 2010 15:40, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
|
Hello, I have GSM gateway with 2 SIM modules. Modem works but needs "prefix" before AT command. It looks like: at&g0=AT+CMGF=1, where "at&g0=" selects first SIM or at&g1=AT+CMGF=1, where "at&g1=" selects second SIM.
I can send this way SMS either from minicom or bash command line.
What shouls I do to use my device with smstools?
Best regards, bakai
|
|
#2 Sat Oct 09, 2010 16:06, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Those kind of devices are not currently supported.
Each modem process will handle single SIM only. If we think that "g0" would be GSM1 and "g1" would be GSM2, it will not work because two or more processes cannot use the same port. Some kind of an external "driver" is required to provide independent port for each SIM. This driver could then add prefixes to the strings to modem, and remove prefixes from the strings received from modem and give the answer to the appropriate port.
What is your gateway exactly, the name and model? Do you have a manual (AT Commands) for it and can you provide a link to it?
|
|
#3 Mon Oct 11, 2010 06:32, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
My device is: 2N gateway Enterprise ISDN BRI GSM (2xBRI + 2xTC35). Here is manual http://www.2n.cz/download/9/0/bri-enterprise-user-guide.pdf (AT commands are at the end). My device is without ethernet interface. I'm very novice in sending SMS. I don't need to use both modules, I'll be happy, when I can use one module. Is it possible to change some commands in source to achive my needs? Whose?
|
|
#4 Mon Oct 11, 2010 10:45, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
I have created a private version of smsd for you. It uses single SIM only. Use the loglevel = 7, and in the modem section define mux_out_prefix = at&g0=Try to send and receive some SMS and show the log file here. I would like to see how the modem gives the answers. Download link is in the private block: Hidden private text.
|
|
#5 Mon Oct 11, 2010 13:34, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
|
|
#6 Mon Oct 11, 2010 13:40, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Thanks. I will check in next few of hours what should be done for the responses.
I need another log. In the global part of smsd.conf, define: log_read_from_modem = yes. Then restart and post a new log. It will include exact data from the modem as a hex dump and I can see line ends.
|
|
#7 Mon Oct 11, 2010 13:45, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
Thanks for fast response. Log below:
|
|
#8 Mon Oct 11, 2010 15:13, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Your package is now updated. It's still using the previous filename.
New version should fix the registration problem.
|
|
#9 Mon Oct 11, 2010 17:47, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
Thanks, registration is OK now, I think. But,
|
|
#10 Mon Oct 11, 2010 17:59, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
This modem looks quite slow. Try again with a modem setting: read_timeout_cmgs = 4.
|
|
#11 Mon Oct 11, 2010 18:10, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
Still the same. Mayby modem is slow but when I send SMS from bash 1 second wait is OK and its works.
|
|
#12 Mon Oct 11, 2010 18:21, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
You restarted smsd after changing the configuration, right?
With Bash (or Minicom) you have used ASCII mode, I assume. Perhaps there is a difference between ASCII and PDU mode. You could try manually with PDU mode too.
From the log we can see that smsd was waiting for the prompt (>) 10 seconds after CMGS was sent. With a new configuration the time for waiting was 20 seconds, and still the prompt was not received. Can you confirm that there surely was 20 seconds of waiting in the log?
|
|
#13 Mon Oct 11, 2010 18:28, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
As far as I can understood timeout is 20 sek. But what means: Incorrect answer, put_command expected???
|
|
#14 Mon Oct 11, 2010 19:04, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Yes, the timeout was changed to 20 seconds.
"Incorrect answer" means, that something was received, but not that what was expected. I have to check if there is some issue or bug in the code. I cannot do it right now, so I'll be back tomorrow...
|
|
#15 Tue Oct 12, 2010 08:45, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Can you try sending with PDU mode using Minicom? Especially notice do you get the prompt ">" right after CMGS line is sent, or do you need to press Enter more than once.
|
|
#16 Tue Oct 12, 2010 08:47, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
I don't know how. Can you send me instructions?
|
|
#17 Tue Oct 12, 2010 08:52, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
In Minicom send those strings: at&g0=AT+CMGF=0 (Enter) at&g0=AT+CMGS=16 (Enter) A line containing " -->g00 >" should be received. at&g0=001100099106368895F00000FF0372B91C (Ctrl-Z)
|
|
#18 Tue Oct 12, 2010 09:27, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
at&g0=AT+CMGF=0 <++g00 AT+CMGF=0 -->g00 OK
OK at&g0=AT+CMGS=16 <++g00 AT+CMGS=16 (long wait, about 20s)
OK at&g0=001100099106368895F00000FF0372B91C (crt+z not works, so Enter was pressed).
ERROR
|
|
#19 Tue Oct 12, 2010 09:53, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
What happens if you press Enter twice after the CMGS line?
Ctrl-Z is not shown and has only effect when PDU is sent after the prompt, which now was missing.
|
|
#20 Tue Oct 12, 2010 09:55, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
Only "OK". Nothing else.
|
|
#21 Tue Oct 12, 2010 09:59, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
But, when I type longer number: at&g0=AT+CMGS=606388590 <++g00 AT+CMGS=606388590 -->g00 +CMS ERROR: 500
|
|
#22 Tue Oct 12, 2010 10:10, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
The log shows that the prompt is received, but too late every time. Probably this is the last try: Edit a file smsd.c and locate the following line: Change it to: Now there is \n after \r. Save, recompile and try once again. Can you also show "device details" from the log, it may be interesting to see because this device is not very usual.
|
|
#23 Tue Oct 12, 2010 10:43, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
SMS sending log: Device log:
|
|
#24 Tue Oct 12, 2010 11:33, 171 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Too bad , but I do not know how this problem can be fixed. Perhaps a different baudrate could be tried, for example 57600, but probably this will not help because other commands are working well. Have you tried using another module, g1? Do you know if there are any possibilities to upgrade the firmware for those modules? Does the manufacturer or reseller provide any support for your device? Sorry, lot of questions, but there is not much to do when a prompt is missing after CMGS...
|
|
#25 Tue Oct 12, 2010 13:55, 171 months ago.
|
Member
Registered: Oct 2010
Location: Poland
Topic owner
|
Below answers form polish hardware reseller&support:
No, baud rate is OK, but answer is unexpected by minicom - containing additional prefix before oryginal modem response, prefix as '-->gxx > ' where xx are module number.
> > Have you tried using another module, g1? > > Do you know if there are any possibilities to upgrade the firmware for > those modules?
No possiblities, for upgrade modules will be removed from device and insert to dedicated service box. > > Does the manufacturer or reseller provide any support for your device?
Both
> > Sorry, lot of questions, but there is not much to do when a prompt is > missing after CMGS...
For send SMS via 2N gateway is necessary send different commands - special macro commands to gateway, not to module. As described below:
;catch SMS controlling to interface who sending command (serial port in this case)
AT!G=A6 expected responses: OK or BUSY - if busy other interface have SMS steering. for release SMS on interface command is AT!G=55 is possible force release on all interfaces by command AT!G=99
for check received sms: AT^SX=# where # is module number from 0 to 31 (depending to gateway type) or in newest firmwares: AT^SX=#,mem where memory type 0- SIM card 1- TE 2 - both
response: *smserr: #,code - any error *smsinc: #,idx[,mem] - sms found on module # at index idx into memory mem (0 or 1)
for receive sms AT^SR=#,idx[,mem] response *smspdu: #,idx,PDU *smserr: #,code
for delete AT^SD=#,idx[,mem] response *smsdel: #,idx *smserr:#,code
for send AT^SM=#,Len,PDU,chk where Len are length in bytes of PDU minus 1 eg. '00000000' - are 4 bytes length and len is 3. chk - is normal checksum modulo 256 and must be put in hex, not decimal
responses: *smsout: #,sms_no *smserr: #,code
|
Login and Post Reply
Page: 1 2 Next
Time in this board is UTC.
|
|
|
|
|
|
|