FAQ about Modems , Modem applications and the SAIA Modem Library.

 

This information does not engage Engiby in any cases and are only informative. The document reports some typical problems occurring with modem application and situations occurring by Engiby when using modems. Usually the problems are not caused by an error in the library but by bad modem installation or configuration. Official information and supports concerning the SAIA Modems and the SAIA Modem Library are give by SAIA only.

 


Trick and Tips

How to trace Modem activities ?
By putting Modem application it is very useful or even necessary to have a trace of the modem activities. Some problems can occur at certain time of the day or in the night. To help users to trace modem activities, Engiby has developed a useful tool called NG-Trace. A freeware version of this tool is available on request. The freeware version include a simple trace buffer for modem application. For better analysis, an advanced modem buffer version can be purchased. The NG-Trace is very easy to use and can be connected to the PCD over any PGU connection : Point-to-point, S-Bus network or S-Bus over modem.

How to realize secure S-Bus transmission
When a PCD (master) calls another PCD (slave), how to ensure that all telegrams have been send ? How to know which telegrams have not been transmitted ? How to repeat the call if the line has poor quality ? How to take a decision if a telegram cannot be sent ? All this questions have an answer by using the S-Bus Modem application with the NG-Configurator.
See more here.

No Manual about the modem
The well known modem manufacturer have an Internet site where you can fined a lot of information about modems. The modems can usually return the manufacturer, modem type and version. In the HyperTerminal, type the commands:
ATI0
ATI1
And so on.
ATI4    Returns the most important configuration parameters
ATI7    Returns a detailed modem identification
The information can show that the modem is identical to a well known modem.
The modem is also able to display, in short form, the supported commands.
In the HyperTerminal, type the commands:
AT$
AT&$
ATD$  Dial command syntax
ATS$   S-registers commands

Modem on all serial lines with PCD6 and on PCD7.F522
On almost all PCD, the line 1 has full handshake and can support modem. Other lines can also support a modem but with restrictions, like outgoing calls only. When connecting a modem to the PCD6, all lines have full handshake but the Modem Driver 8 still assume reduced functionality. In this case, use the new Modem Driver 12. In this Fbox you can manually select the option to 'Full handshake'. The same situation occurs when an F522 module is plugged on a PCD2. In this case, the channel 2 can be set to full handshake (HW jumper AND setting in the Modem Driver 12).

Modem synchronization
How to know in which baudrate and which mode (LAPM, etc…) modems are synchronized ? Start the HyperTerminal, use a direct connection to COM x. Send manually the reset and the initialization strings to the modem. Send manually the dial command. The modem will send back the connect result once connected to the remote modem. Note that the displayed baudrate may be different on both modems. E.g. 33600 and 28800. The display is also affected by the X-setting. Usually X4 enable all response.


How to send an E-Mail or a Fax by Modem ?
Untill there is no E-Mail service supported by the PCD use the following tip to send an E-Mail via modem from a PCD. Some GSM network provider offer services to route SMS messages to an E-Mail address or a Fax number. Contact your provider to know which services are available and the corresponding syntax.
For instance, Orange Switzerland : Send a SMS to the number 468 and add mail ad@srv.ch before your message (ad@srv.ch is the E-Mail address)

 New feature / New version

Modem in PCS1 on port 0
The PCS1 can be equipped with a Modem PCD2.T813 or T850 on port 0. This port has a special mechanism which allows the use of the port 0 with the PGU cable and with the modem for S-Bus PGU with modem. When the modem driver Fbox also want to access the Modem on this port, it must support a special handshake called 'PGU Switched'. This option is available from Modem Library version $ 2.3.005. This version is foreseen for PG5 1.2 but can also be used with PG5 1.1. You also need at least a Firmware version 090 (or $ 08F) in the PCS.


Typical problems using modems

No answer from modem
Of course, no answer from modem can be due to bad cabling, missing power and so on. The simplest way to test a modem is to start the Hyperterminal program from Windows and send manually some commands to the modem. If the RX led is blinking as you type the command, you can assume the power and the cabling are OK.

If the modem doesn't respond to a reset command (ATZ) it seams to be out of order. An explanation of the situation is the following: With the reset command, the modem load a definable profile (E.g. user profile 0). This profile can be defined with the commands ATYn and AT&Wn (Consult the modem's manual). This profile can turn off the echo (E0) and set the response mode to silent (Q1). In this case, the modem will not echo what you type and also not send any OK response. However, it should display the configuration with the appropriate command (USR: ATI4, Other : AT&V). Then you can check and correct E0 to E1 and Q1 to Q0. Save the new profile and tray ATZ again.

NO DIALTON or NO ANSWER with a large number of ring signal.
If you have set a large number of ring signals (6 to 10) before the modem should answer the line, you must adapt the Connect timeout when calling via modem from the PG4/5. N PG4 you can set this time at up to 120 sec. However you may have a NO DIALTON or NO ANSWERR response already after 50 sec and this is to short for 6 to 10 ring signals. The modem has also a connect timeout, usually set to 50 sec by default. To solve the problem you must increase this time by setting the register 7 to 100 ( S7=100 ). Read also the modem manual.

Cannot dial a correct number
A problem can occur if the modem is to fast when dialing. The first digit may be lost for the phone exchanger. To avoid this problem the modem must wait for the dial tone before to start dialing. Insert a 'W' character in the Field 'Output prefix' in the SASI-Modem Fbox.

Modem does not hang up
This is one of the problem that may lead to unnecessary telephone cost and may avoid the PCD to be reachable via the modem. General disturbance on the phone line, on the serial line and via the power line can lead to this situation. This problems can not be excluded in any modem application. As security, for this kind of situation, the power hang up output of the SASI-Modem Fbox must be used. Read the detailed description in the help.

Choice of default bit settings
Some protocol need to transmit 8 data characters. Example: S-Bus, DATAD, Modbus RTU. In the other hand, a lot of modems are not supporting more than 9 bits (8-N-1 or 7-E-1). In this case, the default bits setting must be set to 8-N-1.

Using different modem types
Difficulties may appear when different types of modem are used especially if data compression and/or error correction are supported at one side only. The modems can have difficulties to exchange correct data. It may even be totally locked and does not even hangs up on ATH command and DTR low signal. Incase of doubts, turn off compression and error correction on both side. In some case it could also be a good choice to force the baudrate on each side.

Cannot connect to S-BUS station.
This message is issued on the PG4 when it cannot communicate with the PCD after the modem connection is established. A potential problem is the use of error correction. Problem noticed with USR-33.6 and 3COM-56k PC Card. Adding the command '&M0' in the PCD configuration solves the problem.

Cannot send SMS
When error correction is disabled, data transmission is not possible immediately after CONNECT response is issued by the modem. A delay of 1 to 5 second may be necessary. Problem noticed with the SMS server of Swisscom.

Using various bits settings
Using various bit settings may cause the following problems. The modem adapt it self to the bit settings on a AT command. If the settings is changed for data transmission the modem can have problem and send wrong data or even hang up the line.
E.g.      The modem is initialized with 7 bits, Even parity, 1 stop.
            S-Bus use 8 bits, No parity, 1 stop.
In this case, the default settings should be set to 8-N-1 instead of 7-E-1.

Using various baudrate
Some modem are not able to change automatically to low baudrate values like 1200 bd. Therefore, a baudrate suitable to all cases should be used. Special care must be taken when Pager and SMS services having low baudrate are used. The default baudrate should be set to a low value.

Unable to send SMS or Pager message
Case 1
The SMS Center usually have a limited range of baudrate. If the Modem use an automatic baudrate it may synchronize to the highest possible baudrate with the remote modem. The attached computer will not receive the message. In the Call SMS Fboxes the alternate Init string can be used to force the modem to use a fix baudrate.
Example for US Robotics and the Swisscom Server, add the command &N3 in the init string to force the baudrate at 1200.
Case 2
The Call SMS Fbox has a parameter called 'Transmission delay' (default 5.0sec) which delay the message transmission after the modems are connected. Problem have been noticed if this time is below 6.0 sec. Set a time of 8.0 to 10.0 sec and tray again.
Case 3
For swiss customer only. You may have difficulties to send SMS messages, when your have a communication provider other than Swisscom. In this case you must force the modem to use Swisscom services by adding the prefix 10741 before the SMSC call number in the Call SMS Fbox. This prefix is not valid when you are using the GSM-Text protocol on a GSM modem.
Case 4, for GSM modem with 'GSM-Text' protocol
The preliminary condition is to be connected to the network. This should be displayed by LED on the GSM modem. See the manual. Then you must have set the PIN code. You can also lock it so it is always valid after power down. If these conditions are OK you must be able to make a phone call (ATD…phone number). Tray it out. If you have a prepay card, you need a minimum value on the card depending on the provider. You must set the correct service center number according to your SIM card. You cannot send a message to another provider.

Hang up not detected
As to switch the modem to command mode, a silent of 1.5 sec must be respected before to send the +++ string. If the PCD is in S-Bus (slave or master), the firmware may continue to send S-Bus telegrams to the partner station during the silent delay. The modem will not recognize the +++ string as the escape to command mode. In this case the modem must be correctly configure to hang up if DTR is low. This problem was discovered using the modem on port 0, without DTR signal. Fixed in version $ 2.1.252. This problem can also be solved by using the power hang up function.

Modem don't want to dial on PCD port 0 or 2
As to connect a modem on port 0 or 2 of PCD 1 and 2 the library $ 2.1.252 is required. The DTR signal on the modem must be set to High level to enable the modem to dial and communicate. You should connect the RTS signal also to DTR terminal on the modem. You may also need to initialized your modem to ignore DTR (Example: &D0 for USR Sportster).

Unable to communicate via port 0
As to connect a modem on port 0 of PCD 1, 2 and 4, the library $ 2.1.252 is required. The DTR and the DCD signals must not be connected to the PCD. This may force the port 0 in PGU mode and will not allows the PCD to work in standby = S-Bus Slave or C-Mode. On port 0, PGU cables force the port in PGU mode and disable Modem support. After PGU have been connected, the PCD must be switched off and on again (this is not anymore required from library version $ 2.3.005).

No command accepted by a GSM modem
At power up and after a reset, a GSM modem can takes long time (up to 1 minute noticed with INSYS modem) before to accept command on the serial line and to be connected to the GSM network.
The Siemens M20 GSM Modem does not support autobauding. You must manually initiate the modem to a fix baudrate, E.g. 9600, 8-N-1. Don't forget to save this settings in the modem profile. Set also the default baudrate in the Modem Driver to 9600, 8-N-1. If you use a Page or a SMS service, you may have problem because each Service Center has its own settings (remark not valid for the GSM-Text protocol). You can try to force the baudrate and the bits settings in the Call Pager/SMS Fbox. Test it. Good luck ! It may work.
Tip : To SMS wia a GSM modem, you should use directly the GSM services integrated in the GSM modem. This can be done by using the 'GSM-Text' protocol.

No data communication with GSM modem Siemens M20
To be able to exchange S-Bus telegrams with an analogue Modem, it is necessary to set the GSM modem in the correct Data mode. The GSM modem should be initialized manually with the command:
AT+CBST=7,0,1 or
AT+CBST=7,0,0 depending on the provider.
Call your provider or Siemens for more details.

Supported Voice and DTMF features
The modem itself is able to give you the allowed parameter for the voice mode commands by typing the following syntax:
AT+FCLASS=?
or AT#CLS=?
If the value 8 is in the response, the mode should support voice mode. Although it is not ensured that it support all the DTMF feature we need. Despite this standard syntax a modem can ignore this syntax for some advanced features and responds with ERROR or just OK without values (noticed with A-Link modem on DTMF commands).
ISDN modems usually don't support DTMF.
GSM modems usually don't support DTMF but you can send the same commands by SMS and use the Poll SMS Fbox. See the appropriate description.

Incoming calls not detected or even no modem detected
Modem presence as well as incoming calls are detected by the states of the control lines. If the modem is not detected the Modem Driver (Modem state = No Modem) when being connected and powered up, it can be a cabling problem with the control lines. If the modem is detected but incoming calls are not detected, it should be a missing DCD connection. Such a case has been found when using a serial line analyzer with a special cable. If the cable is foreseen for 'simple' analyze, it may omit the DCD control line.

The modem is continuously reset and initialized
This may appear with an S-Bus PGU Modem configuration. It is noticed by the fact the FW byte is running up to about 30 and restart from 0. But it never reach the end value 50. Reset and Init string are continuously sent to the modem. This can be due to bad connection (control lines, ground) or a defective modem. Possibly, the modem starts with a bad configuration regarding handling of control lines. See the document 'Modem application' for more details. But there is also a know FW bug producing this behavior when T813 or T850 modems are reset using directly the reset signal on the IO-Bus (base address+3). To reset the modem, you should rather use the reset inputs of the new Modem Driver 12.

The Message or the ID is not transmitted properly with Call Master Message/ID
This has been noticed with the Citect supervisor which expect a first message from the PCD before to start the S-Bus driver. Disturbance characters may be added before and/or after the message and avoid the Citect to understand the message. This can append when error correction is not activated between the 2 modems. Error correction is disabled by default in the MODMBASE.DAT file because S-Bus doesn't need it. To solve the problem of the disturbed message, enable the error correction (E.g. for T813 remove the \N0 command).

Only one PGU call successful
This situation occurs for instance when the option Reset = Emergency is selected. It should be due to the fact that the default baudrate set in the Modem Driver Fbox is not the same as the one in the S-Bus Modem configuration. At the end of an incoming call the functioning of the Modem is checked. If this check is executed with a different baudrate, the modem will be put in the wrong baudrate for the next PGU call.
This dangerous situation also exist when only the life check option is activated.
It is strongly recommended to use the same baudrate in the Modem Driver than in the S-Bus Modem configuration.

Unable to take the line for outgoing calls
This problem has been noticed with PCD2.T813 modem on Siemens PBX of type Hicom 150 and Hipath 3000. A phone to the same line is able make any calls. Incoming calls are correctly answered but outgoing calls (for instance SMS and Pager) by the Modem Driver, ends with No Dial tone or a Timeout error. The problem may be due to a bad setting in the Siemens PBX : The line should NOT be configured as 'Hotline'. If this don't solve the problem, tray to use another (external) Modem.

DTMF Command not acknowledged
After an incoming by a phone device is answered, it is not possible to give DTMF commands. The commands are not acknowledged with positive tone nor with negative.
Possible problems :
Case 1
The new Modem PCD2.T813Z42 is not anymore compatible with the former PCD2.T813 concerning the DTMF commands. You need a Modem library version $ 2.3.005 at least and you must select the new Modem type PCD2.T813Z42 (replace existing Modem Driver Fbox in the Fupla file).
Case 2
If the CPU cycle time is long (above 200 ms), the time to handle a DTMF command can be longer than the Inactivity timeout. Especially DTMF commands take several CPU cycle to be handled. You may fix the problem by setting an higher timeout (e.g. 30.0 sec) but you may encounter further problems unless you have a cycle time less than about 100 ms.


Known problems with the Modem Library

Call repetition with SMS and Pager
Error up to version SP 2.2.120. Fixed in $ 2.2.121.
Sending SMS and Pager messages, when the call is not answered by the server (timeout, bus,...), the recall mechanism of the Call SMS Fbox is not always activated. Therefore, it is important to set also a recall count in the Modem Driver Fbox.

Call started during incoming call
Error in versions 2.3 up to Beta 2.3.050. Fixed in $ 2.3.051.
When a call is started during an incoming call, the call is started but after modem connection, the port is not correctly assigned.

Send SMS or Pager not correctly repeated
Error fixed in version $2.3.054.
In case of SMS/Pager Call error, the repetitions did not repeat with the same message but used the next active message (if any).


Quality problems

Diagnostic error with SAIA Modem
Problems found with SAIA modems PCD2.T850. This modems have problems to adapt itself to the PCD bit settings. If you want to exchange data with S-Bus, you may set the default setting to 8-N-1. But the modem still respond with 7-E-1 (or vice versa) and this case a framing or parity error. However, it should be possible to ignore this error and the data exchange in S-Bus should works. The modem change its settings once it receive data from the opposite site in 8-N-1.

ISDN Modem on S0-Bus
(Don't mix up the ISDN S0-Bus with SAIA S-Bus 0 which is sometimes used to identify the Break mode). If you connect a PCD2.T850 module in parallel with an ISDN phone on the same bus, the phone may not works anymore. This is an hardware problem of the first series of the PCD2.T850 modules.

S-Bus communication not possible
This has been detected with a USR-Sportster 56K Voice Fax-modem. The modems was synchronizing at 14400 bauds and the serial line was also switched to 14400 instead of 9600. The command &B1 (Fix line baudrate) did not help. But the command &N6 (Connection baudrate fixed to 9600) solved the problem.

Modem don't want to dial
Noticed with T813 and USR-Robotics 56K but can occur with other type too. The modem refuses to re-dial the same number after some unsuccessful calls. The modem store the number in a black list'. When the same number is used in a ATD command, an error is returned. This feature is usually not described in the modem manual. Solution: switch off the modem and on again. Use the power hang up output. In modem libraries version 2.2.100, the Modem Driver display the error 'Blacklisted' in this case.

Bad supply
Noticed with USR-Robotics 33.6K. This is a rare problem. Using the bad power supply, the modem was working fine until it has to switch DCD signal to High. Other control signals was drooped low and cause the modem to hang up immediately.

Modem cannot establish a connection
Problem noticed with USR-Sportster 56K and USR-Sportster 33.6K. Using low baudrate (1200 bds) the modem are not able to communicate. The Modems hang up before to set the DCD signals.

Modem don't hang up
Noticed with Micronet Shuttle 3000. At the end of a SMS call, the Modem don't want to hang up the line. The problem seems to appear only when Error correction is disabled. Solution: switch off the modem and on again. Use the power hang up output.

DTMF don't works
Problem found with ZyXel U-1496. The modem supports Voice features however DTMF seems not to be detected. Is a FW update possible ? I don't know. Furthermore, almost all ISDN and GSM modems does not support DTMF incoming signals and cannot be used with the DTMF library.

Supervisor problem
The Citect driver for modem has the following problem (state June 2000). The modem is handled by Windows to establish a modem call. After the connection, the 'normal' S-Bus driver is started. This cause the DTR and the RTS signals to be toggled like for the S-Bus on RS 485. The Modem will immediately hang up the line or ignore telegrams. The modem must be configured to ignore DTR Low AND RTS Low signals.

Problem when the PCD call the Citect : The supervisor hang up after some seconds. It seams that the Citect, for optimization reason decide to hang up the line even if no user action decide to. Problem to be solved by Citect.

 


Open points

These are questions remaining without clear response or solutions for now. Maybe somebody have a good idea ?

Watchdog
How to realize a safe modem watchdog ?

An idea is to count the number of ring coming from the modem. If more than x rings (for instance 10) are counted by the Incoming call Fbox, we can assume, the modem is not working properly and switch Off and On the power supply. But if the modem is deadlocked, it will probably not send the ring message to the PCD. For a safe solution, the ring should be counted by an external device (more safe than the modem). The external device should be able to reset the modem in case of problem.
Does such a device exist on the market ?

Back to Engiby main page

Engiby / 13.10.2005