SMS Server Tools 3
 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. The forum is currently read-only, but will open soon. Thu Nov 21, 2024 09:24
SMSTools3 Community » Feature requests Bottom

Commissioning support for a new device

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Nov 2011
Location: United Kingdom
Hi,

We're a UK company that specializes in IP phone systems and I'd like to commission work to be done to support a new device with SMSTools3, this can be paid either to you or as a donation to the project.

The device is a PORTech MV-372 which is essentially two Siemens TS35i modules (two SIM cards in total) housed in a black box with ethernet ports. You can connect to it via SIP to send/receive calls and also connect to it over telnet to send/receive SMS over a mobile network.

I realise the Siemens TS35/TS35i have good support in SMSTools3 already, but after connecting with telnet SMSTools3 has issues logging in to the device before it can access the TS35i module directly.

I have one of these devices ready and a dedicated server with SMSTools3 3.1.14 installed anyone would like a try at this.

Details on how the telnet connection works can be found on page 36 of the manual for this device below. This works when using telnet manually, just not through SMSTools3.
http://www.portech.com.tw/data/MV-370%20user%20manual.pdf

Other people on the forum have had similar issues, such as the final post of this thread. This is partly why I am seeking someone to literally look at the issue directly as the forum holds no answers and the question has already been asked.
http://smstools3.kekekasvi.com/topic.php?post=3851#post3851

Any input you may have would be most appreciated, we intend to put SMSTools3 in to our phone system distribution and then convert SMS to XMPP (Jabber) allowing our customers to send/receive SMS to their customers or employees using a standard Instant Messaging client.

Naturally we prefer using Ethernet enabled GSM modems as our phone systems are mostly hosted virtually so serial or USB is out of the question.

Please reply below if your interested.

Member
Registered:
Apr 2011
Location: Kupchino, Russian Federation
I have no such a modem, but I took a look at smsd behaviour during telnet negotiation using netcat as a telnet server and I see that smsd continuously sends telnet_login if there is no enough delay between login and password prompt.

So the session looks like:
smsd> AT
telnet> login:
smsd> <telnet_login>
telnet> Password:
smsd> <telnet_login>
telnet> anything else
smsd> <telnet_login>

This patch seems to fix this, but probably break something else ;-)



And, of course, per the user manual you referenced to you need a configuration like the following:

telnet_login_prompt = username:
telnet_password_prompt = password:
init = module1
 
'smsdconf' Syntax Highlight powered by GeSHi



« Last edit by unterwulf on Thu Dec 08, 2011 05:27, 157 months ago. »
Member
Registered:
Nov 2011
Location: United Kingdom
Topic owner
Hey, Thanks for writing that patch - I've only just got around to trying it. Here are my results...



Clearly there is still something off with what is send/received or the timings of the events when speaking to this device.

If anyone is interested in some paid work writing a fix for this I'm all ears - I can provide a server to work on that has access to one of these devices. It's probably something small really.

Steven

Member
Registered:
Apr 2011
Location: Kupchino, Russian Federation
As per your log it looks like the device echoing data characters it receives. (The seaquake is a login, isn't it?) If so, it is strange that it has not negotiated this feature (if it has there would be something like "Telnet: Got WILL for 1 (0x01), answering DONT." in the log).

Nevertheless, smsd doesn't care about any telnet options, so I see the two options here:
1) Somehow force the device not to use telnet echoing (probably some settings via GUI)
2) Implement echoing support in smsd :-)

Not sure if I can help here, but who knows. At least I am interested in identifying the root cause of the issue, so drop me a gmail (the same login as on this forum) if you can provide access to the device.

Member
Registered:
Apr 2011
Location: Kupchino, Russian Federation
For those who still interested in using smsd with PORTech modems here is a patch that adds a new functionality required for that.

It introduces a number of new smsd.conf options, namely:
* telnet_crlf
* telnet_cmd
* telnet_cmd_prompt

Their meaning is quite straightforward. Here is a config that is known to work with at least PORTech MV-372:

[GSM1]
device = @<your_modem_IP>:23
telnet_crlf = yes
telnet_login = <your_login>
telnet_password = <your_password>
telnet_login_prompt = username:
telnet_password_prompt = password:
telnet_cmd_prompt = module1, module2, state1, state2, info.
telnet_cmd = module1
init = ATV1
'smsdconf' Syntax Highlight powered by GeSHi


Note, the init = ATV1. It is required to switch the device into verbose result code format mode, so it answers OK and ERROR instead of 0 and 4. It is required as smsd doesn't understand numeric codes. As an option you can store settings in the user profile via telnet like

ATV1
AT&W

and the use init = ATZ to restore these settings.



Member
Registered:
Mar 2012
Location: Australia
unterwulf wrote
I have no such a modem, but I took a look at smsd behaviour during telnet negotiation using netcat as a telnet server and I see that smsd continuously sends telnet_login if there is no enough delay between login and password prompt.

So the session looks like:
smsd> AT
telnet> login:
smsd> <telnet_login>
telnet> Password:
smsd> <telnet_login>
telnet> anything else
smsd> <telnet_login>

Hi,

I've applied the full patch that you included below this, and I'm still getting this same behaviour (smsd is continually re-sending the username....)

See tcpdump output:
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 3:13, ack 4, win 12672, length 10
0x0000: 4500 0032 003d 0000 4006 f526 c0a8 020c E..2.=..@..&....
0x0010: c0a8 0206 0017 e9bd 453f 3215 014e 34f8 ........E?2..N4.
0x0020: 5018 3180 70a3 0000 7573 6572 6e61 6d65 P.1.p...username
0x0030: 3a20 :.
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 13, win 5840, length 0
0x0000: 4500 0028 89be 4000 4006 2baf c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34f8 453f 321f .........N4.E?2.
0x0020: 5010 16d0 7c28 0000 P...|(..
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [P.], seq 4:10, ack 13, win 5840, length 6
0x0000: 4500 002e 89bf 4000 4006 2ba8 c0a8 0206 E.....@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34f8 453f 321f .........N4.E?2.
0x0020: 5018 16d0 8583 0000 766f 6970 0d0a P.......voip..
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [.], ack 10, win 11088, length 0
0x0000: 4500 0028 003e 0000 4006 f52f c0a8 020c E..(.>..@../....
0x0010: c0a8 0206 0017 e9bd 453f 321f 014e 34fe ........E?2..N4.
0x0020: 5010 2b50 67a2 0000 0000 0000 0000 P.+Pg.........
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 13:14, ack 10, win 12672, length 1
0x0000: 4500 0029 003f 0000 4006 f52d c0a8 020c E..).?..@..-....
0x0010: c0a8 0206 0017 e9bd 453f 321f 014e 34fe ........E?2..N4.
0x0020: 5018 3180 eb68 0000 7600 0000 0000 P.1..h..v.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 14, win 5840, length 0
0x0000: 4500 0028 89c0 4000 4006 2bad c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3220 .........N4.E?2.
0x0020: 5010 16d0 7c21 0000 P...|!..
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 14:15, ack 10, win 12672, length 1
0x0000: 4500 0029 0040 0000 4006 f52c c0a8 020c E..).@..@..,....
0x0010: c0a8 0206 0017 e9bd 453f 3220 014e 34fe ........E?2..N4.
0x0020: 5018 3180 f267 0000 6f00 0000 0000 P.1..g..o.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 15, win 5840, length 0
0x0000: 4500 0028 89c1 4000 4006 2bac c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3221 .........N4.E?2!
0x0020: 5010 16d0 7c20 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 15:16, ack 10, win 12672, length 1
0x0000: 4500 0029 0041 0000 4006 f52b c0a8 020c E..).A..@..+....
0x0010: c0a8 0206 0017 e9bd 453f 3221 014e 34fe ........E?2!.N4.
0x0020: 5018 3180 f866 0000 6900 0000 0000 P.1..f..i.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 16, win 5840, length 0
0x0000: 4500 0028 89c2 4000 4006 2bab c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3222 .........N4.E?2"
0x0020: 5010 16d0 7c1f 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 16:17, ack 10, win 12672, length 1
0x0000: 4500 0029 0042 0000 4006 f52a c0a8 020c E..).B..@..*....
0x0010: c0a8 0206 0017 e9bd 453f 3222 014e 34fe ........E?2".N4.
0x0020: 5018 3180 f165 0000 7000 0000 0000 P.1..e..p.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 17, win 5840, length 0
0x0000: 4500 0028 89c3 4000 4006 2baa c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3223 .........N4.E?2#
0x0020: 5010 16d0 7c1e 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 17:19, ack 10, win 12672, length 2
0x0000: 4500 002a 0043 0000 4006 f528 c0a8 020c E..*.C..@..(....
0x0010: c0a8 0206 0017 e9bd 453f 3223 014e 34fe ........E?2#.N4.
0x0020: 5018 3180 545a 0000 0d0a 0000 0000 P.1.TZ........
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 19, win 5840, length 0
0x0000: 4500 0028 89c4 4000 4006 2ba9 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3225 .........N4.E?2%
0x0020: 5010 16d0 7c1c 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 19:29, ack 10, win 12672, length 10
0x0000: 4500 0032 0044 0000 4006 f51f c0a8 020c E..2.D..@.......
0x0010: c0a8 0206 0017 e9bd 453f 3225 014e 34fe ........E?2%.N4.
0x0020: 5018 3180 5991 0000 7061 7373 776f 7264 P.1.Y...password
0x0030: 3a20 :.
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 29, win 5840, length 0
0x0000: 4500 0028 89c5 4000 4006 2ba8 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 322f .........N4.E?2/
0x0020: 5010 16d0 7c12 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 29:30, ack 10, win 12672, length 1
0x0000: 4500 0029 0045 0000 4006 f527 c0a8 020c E..).E..@..'....
0x0010: c0a8 0206 0017 e9bd 453f 322f 014e 34fe ........E?2/.N4.
0x0020: 5018 3180 3759 0000 2a00 0000 0000 P.1.7Y..*.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 30, win 5840, length 0
0x0000: 4500 0028 89c6 4000 4006 2ba7 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3230 .........N4.E?20
0x0020: 5010 16d0 7c11 0000 P...|...
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [P.], seq 10:16, ack 30, win 5840, length 6
0x0000: 4500 002e 89c7 4000 4006 2ba0 c0a8 0206 E.....@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 34fe 453f 3230 .........N4.E?20
0x0020: 5018 16d0 8583 0000 766f 6970 0d0a P.......voip..
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [.], ack 16, win 11088, length 0
0x0000: 4500 0028 0046 0000 4006 f527 c0a8 020c E..(.F..@..'....
0x0010: c0a8 0206 0017 e9bd 453f 3230 014e 3504 ........E?20.N5.
0x0020: 5010 2b50 678b 0000 0000 0000 0000 P.+Pg.........
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 30:31, ack 16, win 12672, length 1
0x0000: 4500 0029 0047 0000 4006 f525 c0a8 020c E..).G..@..%....
0x0010: c0a8 0206 0017 e9bd 453f 3230 014e 3504 ........E?20.N5.
0x0020: 5018 3180 3752 0000 2a00 0000 0000 P.1.7R..*.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 31, win 5840, length 0
0x0000: 4500 0028 89c8 4000 4006 2ba5 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3231 .........N5.E?21
0x0020: 5010 16d0 7c0a 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 31:32, ack 16, win 12672, length 1
0x0000: 4500 0029 0048 0000 4006 f524 c0a8 020c E..).H..@..$....
0x0010: c0a8 0206 0017 e9bd 453f 3231 014e 3504 ........E?21.N5.
0x0020: 5018 3180 3751 0000 2a00 0000 0000 P.1.7Q..*.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 32, win 5840, length 0
0x0000: 4500 0028 89c9 4000 4006 2ba4 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3232 .........N5.E?22
0x0020: 5010 16d0 7c09 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 32:33, ack 16, win 12672, length 1
0x0000: 4500 0029 0049 0000 4006 f523 c0a8 020c E..).I..@..#....
0x0010: c0a8 0206 0017 e9bd 453f 3232 014e 3504 ........E?22.N5.
0x0020: 5018 3180 3750 0000 2a00 0000 0000 P.1.7P..*.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 33, win 5840, length 0
0x0000: 4500 0028 89ca 4000 4006 2ba3 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3233 .........N5.E?23
0x0020: 5010 16d0 7c08 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 33:34, ack 16, win 12672, length 1
0x0000: 4500 0029 004a 0000 4006 f522 c0a8 020c E..).J..@.."....
0x0010: c0a8 0206 0017 e9bd 453f 3233 014e 3504 ........E?23.N5.
0x0020: 5018 3180 374f 0000 2a00 0000 0000 P.1.7O..*.....
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 34, win 5840, length 0
0x0000: 4500 0028 89cb 4000 4006 2ba2 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3234 .........N5.E?24
0x0020: 5010 16d0 7c07 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 34:36, ack 16, win 12672, length 2
0x0000: 4500 002a 004b 0000 4006 f520 c0a8 020c E..*.K..@.......
0x0010: c0a8 0206 0017 e9bd 453f 3234 014e 3504 ........E?24.N5.
0x0020: 5018 3180 5443 0000 0d0a 0000 0000 P.1.TC........
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 36, win 5840, length 0
0x0000: 4500 0028 89cc 4000 4006 2ba1 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3236 .........N5.E?26
0x0020: 5010 16d0 7c05 0000 P...|...
IP 192.168.2.12.23 > 192.168.2.6.59837: Flags [P.], seq 36:65, ack 16, win 12672, length 29
0x0000: 4500 0045 004c 0000 4006 f504 c0a8 020c E..E.L..@.......
0x0010: c0a8 0206 0017 e9bd 453f 3236 014e 3504 ........E?26.N5.
0x0020: 5018 3180 379b 0000 6261 6420 7573 6572 P.1.7...bad.user
0x0030: 6e61 6d65 206f 7220 7061 7373 776f 7264 name.or.password
0x0040: 2121 210d 0a !!!..
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [.], ack 65, win 5840, length 0
0x0000: 4500 0028 89cd 4000 4006 2ba0 c0a8 0206 E..(..@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3253 .........N5.E?2S
0x0020: 5010 16d0 7be8 0000 P...{...
IP 192.168.2.6.59837 > 192.168.2.12.23: Flags [P.], seq 16:22, ack 65, win 5840, length 6
0x0000: 4500 002e 89ce 4000 4006 2b99 c0a8 0206 E.....@.@.+.....
0x0010: c0a8 020c e9bd 0017 014e 3504 453f 3253 .........N5.E?2S
0x0020: 5018 16d0 8583 0000 766f 6970 0d0a P.......voip..

I'm using a portech MV-370.

My config file has this:
[portechmv370]
device = @X.X.X.X:23
telnet_crlf = yes
telnet_login = voip
telnet_password = 1234
telnet_login_prompt = username:
telnet_password_prompt = password:
telnet_cmd_prompt = module1, module2, state1, state2, info.
telnet_cmd = module1
init = ATV1


The log file shows this:
2012-03-16 16:59:49,5, portechmv370: Modem handler 0 has started. PID: 20314. Will only send messages.
2012-03-16 16:59:49,6, portechmv370: Checking if modem is ready
2012-03-16 16:59:49,7, portechmv370: -> AT
2012-03-16 16:59:49,7, portechmv370: Command is sent, waiting for the answer
2012-03-16 16:59:59,7, portechmv370: put_command expected (OK)|(ERROR), timeout occurred. 1.
2012-03-16 16:59:59,7, portechmv370: <- username: voip password: ***** bad username or password!!! exit...
2012-03-16 16:59:59,7, portechmv370: -> .
2012-03-16 16:59:59,7, portechmv370: Command is sent, waiting for the answer
2012-03-16 17:00:04,7, portechmv370: put_command expected (OK)|(ERROR), timeout occurred. 2.
2012-03-16 17:00:04,7, portechmv370: <-
2012-03-16 17:00:05,7, portechmv370: -> AT
2012-03-16 17:00:05,7, portechmv370: Command is sent, waiting for the answer


Any assistance or hints that you can offer would be greatly appreciated.

Regards,
Adam

Member
Registered:
Feb 2012
Location: Copenhagen, Denmark
Hi Adam,

Wondered if you still have problems, I have setup a SC-495 which (as far as I can read) is similar to the portech 574. I also applied the patch, and it's working fine.

I had one small problem that required a change in the source code, we are setting up a 'send-only' SMS server, and after a while the command interface times out, and it needs an extra 'moduleX' command to get into command mode again.

I have not included a patch, since it needs cleanup .. and we are not done implementing yet :)

Member
Registered:
Oct 2012
Location: United Kingdom
Hi

Do you think you could let me have your source code modifications pleae? I've bene trying to get this to work with a Portech MV-374 and with the patch applied I can send the first SMS but nothing after that. I get this error in the log:



So looks like it's not handling the timeout of Module1 correctly, or something. My smsd.conf looks like this:



Any help in getting this working would be greatly appreciated otherwise I'm going to have to buy another modem for my alerting.

Thanks


« Last edit by slink on Fri Oct 19, 2012 08:38, 147 months ago. »
Member
Registered:
Feb 2012
Location: Copenhagen, Denmark
Hi slink,

This was the exact same problem we had, I'll clean up the code some time during the weekend and produce a diff file (if I can figure out how), and then post it here :)


Regards
Peter

Member
Registered:
Oct 2012
Location: United Kingdom
that would be brilliant if you could, thanks!

Member
Registered:
Feb 2012
Location: Copenhagen, Denmark
These are the changes I made, and they where made to the source including the patch from this forum - I believe that is where you are right now :)

--
diff -rupN smstools3.norberg1/src/modeminit.c smstools3.norberg2/src/modeminit.c
--- smstools3.norberg1/src/modeminit.c 2012-10-22 08:27:36.438510611 +0200
+++ smstools3.norberg2/src/modeminit.c 2012-10-22 08:59:58.870484409 +0200
@@ -1254,6 +1254,11 @@ int initmodem(char *new_smsc, int receiv
// To avoid error messages, first send AT and read the answer if it's available.
if (DEVICE.needs_wakeup_at)
{
+ //Portech doesn't alway respond properly to AT commands
+ writelogfile0(LOG_ERR, 1, tb_sprintf("Device wake up needed...") );
+
+ put_command( DEVICE.portech_module_name, 0, 0, 1, 0);
+ usleep_until(time_usec() + 100000);
put_command("AT\r", 0, 0, 1, 0);
usleep_until(time_usec() + 100000);
read_from_modem(answer, sizeof(answer), 2);
diff -rupN smstools3.norberg1/src/smsd_cfg.c smstools3.norberg2/src/smsd_cfg.c
--- smstools3.norberg1/src/smsd_cfg.c 2012-10-22 08:28:15.270510069 +0200
+++ smstools3.norberg2/src/smsd_cfg.c 2012-10-22 08:32:22.930506732 +0200
@@ -1677,6 +1677,9 @@ int readcfg()
if (strcasecmp(name,"telnet_cmd_prompt")==0)
strcpy2(NEWDEVICE.telnet_cmd_prompt, ask_value(NEWDEVICE.name, name, value));
else
+ if (strcasecmp(name,"portech_module_name")==0)
+ strcpy2(NEWDEVICE.portech_module_name, ask_value(NEWDEVICE.name, name, value));
+ else
if (strcasecmp(name,"signal_quality_ber_ignore")==0)
{
if ((NEWDEVICE.signal_quality_ber_ignore = yesno_check(ask_value(NEWDEVICE.name, name, value))) == -1)
diff -rupN smstools3.norberg1/src/smsd_cfg.h smstools3.norberg2/src/smsd_cfg.h
--- smstools3.norberg1/src/smsd_cfg.h 2012-10-22 08:28:26.710509912 +0200
+++ smstools3.norberg2/src/smsd_cfg.h 2012-10-22 08:32:16.570506814 +0200
@@ -233,6 +233,7 @@ typedef struct
int verify_pdu; // 3.1.14.
int loglevel_lac_ci; // 3.1.14.
int log_not_registered_after; // 3.1.14.
+ char portech_module_name[8];
} _device;

// NOTE for regular run intervals: effective value is at least delaytime.
--

I added a cfg option called portech_module_name, if the portech sits a long time without any activity, the telnet 'session' times out, and it has to receive the modulename you want to contact, before you can send it any more AT commands.

This is a copy of my cfg for one of the devices
---
[GSM1SIM1]
device = @10.0.0.51:8023
telnet_crlf = yes
incoming=no
telnet_login = mylogin
telnet_password = mypassword
telnet_login_prompt = username:
telnet_password_prompt = password:
telnet_cmd_prompt = module1, module2, state1, state2, info.
telnet_cmd = module1
init = ATV1

needs_wakeup_at=yes
portech_module_name=module1
hangup_incoming_call = yes
rtscts=no
---

The telnet_cmd_prompt I is from my testing but didn't work, so it can be skipped, but somehow it survived - so I left it there. The most important is the 'nedds_wakeup_at' and 'portech_module_name'

I have not succeded in using 2 sims per module, so we only have 2 sims - one per module. Maybe if the need arises for us, I'll look into it ..

Good luck :)

Member
Registered:
Aug 2013
Location: Australia
Sorry to dig up an old thread but I am having issues applying the second patch to the source code (trying to get an MV-372 working, sends first SMS but timeout after).

The patch file contains:

--
diff -rupN smstools3.norberg1/src/modeminit.c smstools3.norberg2/src/modeminit.c
--- smstools3.norberg1/src/modeminit.c 2012-10-22 08:27:36.438510611 +0200
+++ smstools3.norberg2/src/modeminit.c 2012-10-22 08:59:58.870484409 +0200
@@ -1254,6 +1254,11 @@ int initmodem(char *new_smsc, int receiv
// To avoid error messages, first send AT and read the answer if it's available.
if (DEVICE.needs_wakeup_at)
{
+ //Portech doesn't alway respond properly to AT commands
+ writelogfile0(LOG_ERR, 1, tb_sprintf("Device wake up needed...") );
+
+ put_command( DEVICE.portech_module_name, 0, 0, 1, 0);
+ usleep_until(time_usec() + 100000);
put_command("AT\r", 0, 0, 1, 0);
usleep_until(time_usec() + 100000);
read_from_modem(answer, sizeof(answer), 2);
diff -rupN smstools3.norberg1/src/smsd_cfg.c smstools3.norberg2/src/smsd_cfg.c
--- smstools3.norberg1/src/smsd_cfg.c 2012-10-22 08:28:15.270510069 +0200
+++ smstools3.norberg2/src/smsd_cfg.c 2012-10-22 08:32:22.930506732 +0200
@@ -1677,6 +1677,9 @@ int readcfg()
if (strcasecmp(name,"telnet_cmd_prompt")==0)
strcpy2(NEWDEVICE.telnet_cmd_prompt, ask_value(NEWDEVICE.name, name, value));
else
+ if (strcasecmp(name,"portech_module_name")==0)
+ strcpy2(NEWDEVICE.portech_module_name, ask_value(NEWDEVICE.name, name, value));
+ else
if (strcasecmp(name,"signal_quality_ber_ignore")==0)
{
if ((NEWDEVICE.signal_quality_ber_ignore = yesno_check(ask_value(NEWDEVICE.name, name, value))) == -1)
diff -rupN smstools3.norberg1/src/smsd_cfg.h smstools3.norberg2/src/smsd_cfg.h
--- smstools3.norberg1/src/smsd_cfg.h 2012-10-22 08:28:26.710509912 +0200
+++ smstools3.norberg2/src/smsd_cfg.h 2012-10-22 08:32:16.570506814 +0200
@@ -233,6 +233,7 @@ typedef struct
int verify_pdu; // 3.1.14.
int loglevel_lac_ci; // 3.1.14.
int log_not_registered_after; // 3.1.14.
+ char portech_module_name[8];
} _device;

// NOTE for regular run intervals: effective value is at least delaytime.
--





The output I get is:


patching file modeminit.c
patch: **** malformed patch at line 6: // To avoid error messages, first send AT and read the answer if it's available.


Any help would be appreciated :)

Member
Registered:
Aug 2013
Location: Australia
Never mind, got it working :)

Member
Registered:
Jul 2014
Location: Italy
Excuse me, i'm new on linux, what i have to do to apply the patch?

Member
Registered:
Nov 2011
Location: United Kingdom
Topic owner
So it's 8 years later than when I started this post :) Now working somewhere else entirely.

Currently using version '3.1.21-3' from Debian 10 (currently in testing, but seems to have the latest patches included) but installed on Debian 9 using the below config...



Few things I've learnt so far which may be helpful to others...
- Using 'telnet_cmd_prompt' this way deals both with the initial request and any subsequent requests after the module times out
- This works fine with a MV-372 with part number 2N149A (on firmware v10.160) but didn't work with a MV-370 I had with part number 2K123C (which has no newer firmware than v6.694.j) - something about it asking for the module/timeout is different (despite a 370 only having one module).

So my current setup with the config above works great with my MV-372/2N149A/v10.160 device (I have a few if people are interested)...

Except if SMSTools3 starts up *before* the GSM gateway has.

Does anyone know of some setting I can use which means SMSTools3 will regularly try to re-telnet every so often? Because if there is a network outage (between the VM running SMSTools3 and the MV-372) or a power outage of the MV-372 - it means restarting the smstools service everytime at the moment.

Login and Post Reply

Page:  1

SMSTools3 Community » Feature requests Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.