Campbell CS-GSM/GPRS, COM110 User Manual

CS-GSM/GPRS
Digital Transceiver Kits
(including the COM110 modem)
Issued: 16.9.13
Copyright © 2013 Campbell Scientific Ltd
USER MANUAL
Guarantee
This equipment is guaranteed against defects in materials and workmanship. This guarantee applies for twelve months from date of delivery. We will repair or replace products which prove to be defective during the guarantee period provided they are returned to us prepaid. T he guarantee will not apply to:
Equipment which has been modified or altered in any way without the
written permission of Campbell Scientific
Batteries
Any product which has been subjected to misuse, neglect, acts of God or
damage in transit.
Campbell Scientific will return guaranteed equipment by surface carrier prepaid. Campbell Scientific will not reimburse the claimant for costs incurred in removing and/or reinstalling equipment. This guarantee and the Company’s obligation thereunder is in lieu of all other guarantees, expressed or implied, including those of suitability and fitness for a particular purpose. Campbell Scientific is not liable for consequential damage.
Please inform us before returning equipment and obtain a Repair Reference Number whether the repair is under guarantee or not. Please state the faults as clearly as possible, and if the product is out of the guarantee period it should be accompanied by a purchase order. Quotations for repairs can be given on request. It is the policy of Campbell Scientific to protect the health of its employees and provide a safe working environment, in support of this policy a “Declaration of Hazardous Material and Decontamination” form will be issued for completion.
When returning equipment, the Repair Reference Num ber must be clearly marked on the outside of the package. Complete the “Declaration of Hazardous Material and Decontamination” form and ensure a completed copy is returned with your goods. Please note your Repair may not be processed if you do not include a copy of this form and Campbell Scientific Ltd reserves the right to return goods at the customers’ expense.
Note that goods sent air freight are subject to Customs clearance fees which Campbell Scientific will charge to customers. In many cases, these charges are greater than the cost of the repair.
Campbell Scientific Ltd,
Campbell Park, 80 Hathern Road,
Shepshed, Loughborough, LE12 9GX, UK
Tel: +44 (0) 1509 601141
Fax: +44 (0) 1509 601091
Email: support@campbellsci.co.uk
www.campbellsci.co.uk
PLEASE READ FIRST
About this manual
Some useful conversion factors:
2
Area: 1 in
Length: 1 in. (inch) = 25.4 mm
1 ft (foot) = 304.8 mm 1 yard = 0.914 m 1 mile = 1.609 km
(square inch) = 645 mm2
Mass: 1 oz. (ounce) = 28.35 g 1 lb (pound weight) = 0.454 kg
Pressure: 1 psi (lb/in
Volume: 1 UK pint = 568.3 ml
1 UK gallon = 4.546 litres 1 US gallon = 3.785 litres
2
) = 68.95 mb
Recycling information
At the end of this product’s life it should not be put in commercial or domestic refuse but sent for recycling. Any batteries contained within the product or used during the products life should be removed from the product and also be sent to an appropriate recycling facility.
Campbell Scientific Ltd can advise on the recycling of the equipment and in some cases arrange collection and the correct disposal of it, although charges may apply for some items or territories.
For further advice or support, please contact Campbell Scientific Ltd, or your local agent.
Campbell Scientific Ltd, Campbell Park, 80 Hathern Road, Shepshed, Loughborough, LE12 9GX, UK
Tel: +44 (0) 1509 601141 Fax: +44 (0) 1509 601091
Email: support@campbellsci.co.uk
www.campbellsci.co.uk
Contents
PDF viewers note: The se page numbe rs refer to the printed vers ion of this docume nt. Us e the Adobe Acrobat® bookm arks tab for links to specific sections.
1. Introduction................................................................. 1
2. Quick Start Guide – for GSM dial-up use .................. 2
3. Quick Start Guide – for GPRS communi c a t ions ...... 3
4. Using GSM Ne t works for Dial-up Dat a Transfer ....... 6
4.1 Network Coverage .................................................................................... 7
4.2 GSM data call charges .............................................................................. 7
5. Using GPRS data transfer .......................................... 8
5.1 Network Coverage .................................................................................... 9
5.2 GPRS network contracts and costs ........................................................... 9
5.3 GPRS Mode s of operation ...................................................................... 10
5.3.1 Using systems with fixed IP addresses .......................................... 10
5.3.2 Using systems with dynamic I P addresses .................................... 10
5.4 GPRS – Minimising c all costs and power use......................................... 11
5.5 Calling the logge r in GSM dial-up mode whe n it is set for GP RS
comms ................................................................................................ 12
5.6 Se nding configuration commands in the mode m .................................... 12
6. Installation of the COM110 modem ......................... 13
6.1 Configuring and Fitting the SIM ............................................................. 13
6.2 Connec tion to a Datalogger..................................................................... 13
6.2.1 Connection to a CS I/O Port ......................................................... 14
6.2.2 Connection to an RS232 P ort ........................................................ 14
6.3 Connecting Powe r ................................................................................... 15
6.4 Sele cting and Connecting an Antenna ..................................................... 16
6.4.1 Antenna Supplied by Cam pbell Scie ntific .................................... 17
7. Configuring the CO M110 modem ............................ 18
7.1 Using the M obile Data Assistant Program for system configuration ...... 18
7.2 Mobile Data Assistant P rogra m Technology .......................................... 19
7.3 Mobile Data Ass istant Advanced options ............................................... 21
7.4 Changing the mode m and logger se ttings without Mobile Data
Assi stant .............................................................................................. 22
8. Using Loggernet for GSM Dial-up ........................... 22
8.1 Configuring a De sk-Top Modem as a Base Station ................................ 22
8.2 Configuring the COM110 modem a s a Bas e S tation using Loggernet .... 23
8.2.1 Extending the Default Time -Outs ................................................. 23
i
9. Using Loggernet for GPRS communications ......... 24
9.1 Setting up to call a logger with a f ixed I P address .................................. 24
9.2 Setting up call-back in Loggernet ........................................................... 25
9.2.1 Se tting up call-back in Loggerne t Version 3 ................................. 25
9.2.2 Se tting up call-back in Loggerne t Version 4 ................................. 26
9.2.3 Kee ping the connection ope n when calling-back .......................... 28
9.2.4 Firewall issues ............................................................................... 28
10. Preventing COM110 modem Connection
Problems ............................................................ 29
11. Fault Finding ........................................................... 30
11.1 General.................................................................................................. 30
11.2 A GSM Base Station Fail s to Get a Response from the l ogger ............. 31
11.3 GP RS Fault finding – when us ing the logge r TCP/IP s tack .................. 31
11.3.1 Firs t s tag e fault finding ............................................................. 31
11.4 GPRS Advanced fault finding ............................................................... 34
11.5 GP RS Fault finding – when us ing the mode m TCP/IP stack ................ 35
Appendices
A. Using the COM110 with the PIN Security
Feature Enabled ................................................ A-1
A.1 Introduction .......................................................................................... A-1
A.2 CRBasi c Program Example .................................................................. A-1
A.3 CR10X P rogram Exampl e.................................................................... A-3
B. Controlling the P ower Supply to the COM110
Modem ............................................................... B-1
B.1 Controlling the P owe r Cons u m ption of the CO M110 modem .............. B-1
B1.1 CRBasic Program Exa m ple of P owe r Control ............................. B-2
B1.2 CR10X Progra m Exam ple ............................................................ B-4
C. Useful Configura t ion Commands for the
COM110 ............................................................. C-1
C.1 Signal Qua lity Checks .......................................................................... C-1
C.2 Network Registration Checks ............................................................... C-2
C.3 PIN Configuration ................................................................................ C-4
C.4 Changing the operating frequency between EU/Rest of world and
US wavebands.................................................................................. C-4
D. Using the COM1 1 0 in Transparent Mode for
GSM Dial-up use .............................................. D-1
D.1 Introduction .......................................................................................... D-1
D.2 Disabling the RLP Protocol ................................................................. D-1
ii
E. Resetting the CO M110 Module under Progr a m
Control ............................................................... E-1
E.1 Principle of Control .............................................................................. E-1
E.2 CRBasic Program Example .................................................................. E-1
E.3 CR10X Program Exam ple .................................................................... E-2
F. Configuring the COM110 via the datalogger ......... F-1
Table
1. COM110 mode m Power Su pply Connections via a PS W12 switch ......... 15
Figures
1. Conne cting the COM110 modem to a Data logger .................................... 14
2. `Low-cost’ dual-band a n ten na supplied by C am pbell Scientific ............... 17
iii
CS-GSM/GPRS digital transceiver kits
This manual provides the details of how to use the CS-GSM/GPRS digital transceiver kits with Campbell Scientific dataloggers. This version of the manual covers kits that use the Campbell Scientific COM110 modem as the communication device. Details in this manual are specific to this model introduced in October 2012. If you have an older model i.e. not the COM110 modem version please request an older version of this manual from Campbell Scientific.
1. Introduction
The CS-GSM/GPRS kits use the Campbell Scientific COM110 modem that is designed to allow transfer of data across a GSM (Global System for Mobile communications) digital cellular phone network. The COM110 modem is a digital radio transceiver that works on GSM networks; it can be thought of as equivalent to a ‘phone’ modem, but without the telephone line connection. I t is there fore commonly called a “modem”. It has the following features:
Standard RS232 serial port
Relatively low power consumption
Wide operating temperature range (-30°C to +75
°C)
Can be used to collect data from a datalogger at a similar speed to a land-
based 9600 baud modem in good reception areas and faster in GPRS mode.
Closely emulates a standar d ‘Hayes style’ telephone modem; suitable for
situations where the datalogger instigates a call back to a base station, e.g. for alarm purposes
Compact package: 88 x 60 x 26 mm
The CS-GSM/GPRS kits include all the cables and antenna to allow easy use with Campbell Scientific datalogger s.
A CS-GSM/GPRS kit can also be reconfigured for GPRS data transfer where data is transferred using the TCP/IP data protocol, often over the public Ethernet. This protocol is supported either using t he built-in TCP/IP capability of some Campbell Scientific dataloggers or using a software feature built into the modem that allows more basic loggers to communicate using a GPRS connection, albeit with less functionality.
1
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
An easy to use c onfiguration tool called the Mobile Data Assistant is available for download free of charge from http://www.campbellsci.co.uk/downloads
With the use of a programming cable this tool allows the modem to easily be reconfigured for different functions or communication speeds.
The Campbell Scientific COM110 Modem is manufactured by Maestro Wireless Solutions and is configured specifically for Campbell Scientific use. It is based upon a Sierra Wireless (Wavecom) chipset a s used previously by Campbell Scientific Ltd. This modem runs a special software application that causes the modem to enter a low power state on power up. It also automatically resets the modem in the event of disconnection from the network and provides support for GPRS connectivity for logger s whic h do not support TCP/IP communications directly.
The current design of the COM110 modem will operate by default on GSM900 (900 MHz) or GSM1800 (1800 MHz) networks. If you wish to use the modem on US GSM frequencies, please refer to Appendix C. Whenever possible a GSM900 network should be used as 1800 MHz networks (which includes the Ora nge and EE networks in the UK) are designed with smaller cells because of the reduced propagation range of higher frequency radio waves. Therefore GSM1800 phones have a shorter range, which can cause more problems in areas of dubious signal coverage.
2. Quick Start Gu ide – for GSM dial-up use
If you purchas ed the standard CS-GSM kit you will have been supplied with a COM110 modem, an SC-WMI logger interface plus SC12 cable, mo unting bracket and an aerial. Other kits supplied with the SC105 or RS232 variants can also be use for GSM dial-up use. All modem are preconfigured so they should work “out of the box” for GSM dial-up use.
This section of the manual gives brief instructions and pointers to the r e st o f the manual to enable you to setup the system and get running quickly.
1. Make sure you have a data enabled SIM with the security PIN disabled. You
should have been notified of a telephone number specifically for data use with the SIM. To insert the SIM card eject the card tray from the end of the modem by pushing in the button with a small screwdriver or pen. Put the SIM card in the small card tray taking care the angled corner of the card matches the moulding in the tra y. The gold plated contacts of the card should be uppermost and remain so when the card tray is pushed back into the modem.
2. Connect the SC-WMI to the COM110 modem and the datalogger as shown
in Figure 1 (Section 4.2.1) o f t hi s manual. (If you are not using the SC-WMI then connect the COM110 modem to the RS232 port of the datalogger.)
3. Install the aerial supplied as high as possible on your mounting structure and
away from any vertical metal poles. Route the cable into the enclosure and connect it to the aerial socket on the COM110 modem – this may involve use of a coaxial adaptor (supplied if needed).
4. Connect the power supply to the COM110 modem, by connecting the
red/black power lead either directly to the outlet of the power supply, if powering the device continuously or to a suitable power switch – see Section
6.3 below. It is best to connect the power as close as possible to the battery rather than to terminals on the datalogger if possible.
5. Turn on the power to the datalo gger and COM110 modem. The status LED
on the end of t he package, near the SIM socket should come on continuous ly initially. After a period of about 15 seconds the LED will start to flash
2
Using with Campbell Scientific Dataloggers
briefly eve ry 2-3 seconds. When the LED starts to flash it indicates that the modem has signed onto the phone network successfully. Note the frequency of flashing will vary with the depending on the power state of the modem and whether data is being transferred.
6. Start-up your PC and run PC400, Loggernet or your chosen communications
program. Set up a phone or TAPI connection to the datalogger, following the instructions for your software package to do this. Enter the data phone number assigned to your SIM as the phone number of the datalogger to be called.
7. Apply the setup setting and th en connect to the datalogger. You should find
the PC connects to the datalogger and the displayed datalogger time then starts to update showing you have a working system. If this does not happen please read the rest of this manual in more detail.
3. Quick Start Guide – for GPRS communications
The COM110 modem can also be used for GPRS communications. The COM110 will support dataloggers that run their own TCP/IP software, e.g. the CR800, CR1000 and CR3000 loggers or it can be used running TCP/IP functions built into the modem which will give basic communication over GPRS for other loggers, e.g. the CR200X.
This quick start section only covers systems which have a SIM card with a fixed IP address. Other configurations are detailed elsewhere in this manual.
1. Make sure you have a data enabled SIM with the security PIN disabled and
enabled for GPRS use. To insert the SIM card eject the card tray from the end of the modem by pushing in the button with a small screwdriver or pen. Put the SIM card in the small card tray taking care the angled corner of the card matches the moulding in the tray. The gold plated contacts of the card should be uppermost and remain so when the card tray is pushed back into the mo dem.
2. Now t he modem and logger should be setup using the Mobile Data Assistant
package. To do this you require a modem programming cable (a grey 9 to 15 way serial cable), plus an optional USB -Serial convertor, a cable to allow communication with the datalogger and a power supply to power the modem and logger.
3. Install the Mobile Data Assistant package and start it running. You will be
presented with a screen like that shown below.
3
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
4. Connect the modem to the PC using the programming cable (use a serial to
USB convertor if necessary). Connect the modem to a nominal 12V DC supply (the datalogger supply if available).
5. Then select the setup option and select the datalogger and, when shown, on
the next screen the baud rate (s elect 115200 baud, unless using an S C -WMI when 9600 baud is used). You will then be pr ompted for the method of IP connection. For the CR800, CR1000 and CR3000 select “Logger IP Stack”(this indicates you will use the TCP/IP functionality built into the logger operating system, often known as a “software stack”). Then select the method of connection control – select “Logger Listening”, for all other loggers select Select the “Modem Listening” option. At this point you will be asked for detail of the connection you are going to use with this screen:
This screen varies with logger type. A datalogger port option will be shown if different connections are possible so you can select the port on the logger the
4
Using with Campbell Scientific Dataloggers
COM110 will be connect to using the drop down option list. Select RS232 for a direct connection to the seria l port, CS I/O ME for the SC-WMI or one of the SDC options to match the configuration of an SC105 if used. For all loggers you then need to fill in the APN name provided by your SIM card provider, a user ID and password associated with the APN (these are sometimes blank) and the port the logger will listen on for its normal communications traffic. If shown leave the idle time and reset time at the defaults of 10 and 60 for now.
When you click on Next you will b e shown a screen asking you to connect the COM110 and install the SIM card so it can be configured.
I
If you are unsure which serial port on your PC the modem is connected to, you can click on the Find Mode m button. It is quicker though, if you know the serial port, to set the com port. Then click on Apply Setup. The program will then send the required settings to the modem to configure it. At the end of this process, which takes a minute or so, the program should report it has setup the modem correctly. Then click on “Done”.
If you are using the Logger TCP/IP software stack you will now be prompted if you wish to setup the datalogger to suit. This process will load the APN and other settings into the logger and configure its communication ports. The logger needs to be connected to the same serial port as the modem was. Click continue and after short delay it should report it has been successful. If so click done and exit the program.
6. Now connect the modem to the datalogger either with a direct cable if using
the RS232 connection, or via one of the interfaces if connecting to the CS I/O port.
7. Install the aerial supplied as high as possible on your mounting structure and
away from any vertical metal poles. Route the cable into the enclosure and connect it to the aerial socket on the COM110 modem – this may involve use of a coaxial adaptor (supplied if needed).
8. Connect the power supply to the COM110 modem, by connecting the
red/black power lead either directly to the outlet of the power supply, if powering the device continuo usly or to a suitable power switch – see Section
6.3 below. It is best to connect the power as close as possible to the battery rather than to terminals on the datalogger if possible.
5
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
9. Turn on the power to the datalogger and COM110 modem. The status LED
on the end of the package, near the SIM socket should come on continuously initially. After a period of about 15 se conds the LED will start to flash briefly eve ry 2-3 seconds. When the LED starts to flash it indicates that the modem has signed onto the phone network successfully. Note the frequency of flashing will vary with t he depending on the power state of the modem and whether data is being transferred.
Start-up your PC and run PC400, Loggernet or your chosen communications program. Set up an IPPort connection to the datalogger, following the instr uctions for your software package to do this. Enter the IP address assigned to your SIM and the port number to match the one you entered in step 5 above. If the IP address is a public address you should then be able to make a test connection to the logger using the connect tool in the program being used. If the IP address is fixed, but p rivate, you may have to open a VPN connection to the private network, following details from your SIM provider, before attempting to make the connection to the datalogger.
If the connection does not work, please refer to the fault finding section in this manual.
4. Using GSM Netwo rks for Dial-up Data Transfer
This section discusses the principles of using the COM110 for GSM dial-up data transfer in more detail.
GSM networks are based on international standards and are widespread throughout t he world – see the web site www.gsm.org. Theoretically a GSM phone can be used anywhere in the world if it is within range of a GSM network of the same frequency. For voice communications this theory almost works in practice, except that many airtime providers (the company you pay for use of the phone) limit the geographical range of most phones, and some do not have agreements with distant providers.
For data transmission, most networks support the SMS (Short Message System). This is not very practical for collecting large volumes of data, but can be useful for sending alarm messages – see Technical Note 33 for more details of using SMS with older loggers. Contact Campbell Scientific for details of sending or receiving text messages with CRBasic dataloggers. (Please note that the COM110 modem defaults to Text format SMS messages and as the message centre is normally preset in the SIM it is not necessary to pr e -configure the modem as described in the technical note.)
Larger networks support connections where an open data connection is formed through the network. If this is supported, you may choose to connect to a GSM data-phone either via a landline modem (landline to GSM) or by using a second GSM phone in your office (GSM to GSM).
Before considering the use of the COM110 modem in your application, check with your local GSM network company that they support ‘non-transparent’ mode of data transmission, at 9600 baud. Check also that they provide suitable routes to allow you to communicate with it, such as access via land-line modems – this is called asynchronous connectivity.
For some networks, e.g. O
2
in the U.K, you may need to specify the mode of data transfer. If this is required, request it to work in ‘non-transparent mode’ at 9600 baud. This is the default setting for most networks. The COM110 modem will also work in transparent mode but this is more susceptible to errors and call breakdown so should only be used if the network does not support non-transparent mode (see
6
Using with Campbell Scientific Dataloggers
Appendix D for more information). Your airtime provider will normally supply you with an extra phone number for the SIM specifically for data use.
4.1 Network Coverage
One of the mai n advantages of using a cellphone network is being able to set up a communications link to a datalogger vir tually anywhere without installing land or telephone lines. However, this only applies if a suitable GSM network covers your installation site.
Within the UK the coverage of GSM networks is goo d in most areas. However, coverage in remote areas can still be quite poor and is not likely to improve, as it offers little commercial advantage to the network companies. Unless coverage is known to be good at the proposed site, we strongly recommended that you test the coverage using a standard GSM handset (on the same network as the COM110 modem is to be used) to measure the exact signal strength.
Even areas sho wn as having good c overage on network m aps can have ‘holes’ due to local interference or other technical reasons, so site testing is recommended.
In areas of normal signal stren gt h the COM110 modem can be used with a small, low cost antenna (as supplied in the CS-GSM/GPRS package). However, if the signal strength is marginal it may be po ssib le to improve reception using a raised and/or a higher gain antenna. Poor quality reception will normally lead to breaks in communication or result in the PC software having to make multiple requests to ensure uncorrupted data is collecte d. This will not usually lead to data loss or corruption, but may result in longer calls and thus higher call charge s .
The network maintainer will be able to offer advice on coverage problems. Campbell Scientific can also offer further advice on suitable antennae to suit the application.
4.2 GSM data call charges
Call charges on cellular-based phones a re usually much higher than landline based systems and c an therefore be quite high for a long-term data collection campaign. Careful choice of the tariffs available can result in a considerable reduction in the total bill.
One major factor, which can determine call costs, is the method used to connect to the remote COM110 modem. If you call the COM110 modem from a landline phone modem, you will normally pay your landline p hone company the same (high) cost a s calling a voice cellphone. This is independent of your agreement with the cellphone airtime provider. In many cases it may be cheaper to buy an extra COM110 modem or another GSM phone for your base station, thus avoiding the use of the land-based phone line altogether. Also, the set-up time from a GSM to GSM modem is usually much lower and the overall call wil l thus be shorter and thus cost less.
When selecting a tariff beware that most data tariffs relate to GPRS data transfer, not dial-up, C.S.D. data transfer.
If you cannot use a base station GSM modem, lower cost calls may also be possible by programming the datalogger to call back to the land-line phone base station, as the special airtime rates will normally apply to such calls too.
NOTE NOTE
7
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
Where many calls have to be made in quick succession ISDN digital landlines can be used with a digital terminal adap tor in the calling PC. If correctly supported and set-up for the pho ne account by the network operator, t he connection time can be reduced to one or two seconds which can substantially reduce the call bill. This is done by sett ing the system to communicate in a digital fashion throughout (UDI mode). Please contact Campbell Scientific Ltd for further advice on this matter.
Where a datalogger is only receiving incoming calls it is often possible to use a “Pay as you go” SIM card to avoid extra rental charges. You need to check with the SIM provider that they support data transmission on PAYG and that the SIM is not disabled after some period, if it makes no outgoing calls.
5. Using GPRS data transfer
This section discusses the principles of using the COM110 for GPRS data transfer in more detail.
In recent years GPRS (General Packet Radio Service) has become a standard for “always-o n” data connections with GSM mobile phones. GPRS technology offers many potential advances in remote telemetry. These include:
Fast connection time compared to phone/GSM – as fast as a few seconds
Lower cost of data transfer
Always on connection – if your system has the power to keep a GPRS
modem powered all the time then it is possible to set-up a system that is “always-on” which can be connected from anywhere on the net at any time
Higher speed data transfer from the datalogger back to the PC
Easy access from anywhere in the world
Alternative ways of accessing data in the datalogger due to it being
connected to an IP network.
Those alternative ways include:
Direct Loggernet IP Pakbus communications
Supports a telnet connection (like the serial terminal mode), including
talk-through modes.
Supports Modbus and DNP3 over IP
Supports serving webpages – which are user defined
Supports requesting data with http commands
Supports acting as an ftp (file) server.
Plus, under program control:
Can send e mai l mes sages (emailsend)
Can send files b y ftp (ftpc lient)
Can synchronise the datalogger clock to Internet time
(networktimeprotocol).
Can send data to other loggers via IP (Send/Get variables, files and data)
NOTE
8
Using with Campbell Scientific Dataloggers
Can do a normal callback to a Loggernet server (send variables)
Can do a one way transmission to Loggernet or another logger (Senddata)
Can open virtual ser ia l ports to other dataloggers or sensors via the IP
network.
Only standard Pakbus communicat ion with Loggernet is possible i f using the TCP/IP function built into the modem. The other advanced communications options require a datalogger capable of running its o wn TCP/IP funct ion. Those loggers c urrently include the CR800 series, CR1000 and CR3000 dataloggers.
5.1 Network coverage
The same consideratio ns as outlined in Section 4.1 above apply in terms of the type of network and signal strength required for GPRS connections. In general to sustain a GPRS connection for long periods, slightly higher signal strength is required compared to use for GSM dial-up connections.
The COM100 is essentially a 2G modem, so will not use 3G network connections. It does however support some features of enhanced 2G networks called “EDGE”. Where that is enabled on the local cell, slightly higher data transfer rates may be achieved.
When testin g for coverage and s i gnal strength using a handset if possi ble limit the phone to non-3G operation and check both the signal strength and availability of GPRS or EDGE data signals, which are often indicated by a “G” or “E” symbol on the display.
5.2 GPRS network contracts and cost s
The modem needs to be used with an airtime contract that allows GPRS communications. Some SIMs are sold as “3G” compatible which means they can be used in 3G phones too. It is important to check with your sup plier that any SIM supplied will work in a GSM/GPRS phone and that GPRS operation is enabled and any 3G compatibility does not slow down the log-on process to the network (wh i ch has been seen on UK O2 networks).
When buying a contract for GPR S the standard offering in Europe is fo r a connection where you are allocated a dynamic, private IP address. This can be used with Ca mpbell dataloggers and is often the cheapest way to get a sys t em up and running. However, when operating in this way you can only have a limi ted numbers of PCs or loggers connected to one logger and you lose some of the ftp server, http and some other functions as the logger cannot accept unsolicited calls made to it because it is on a private network behind a firewall.
For full flexibility specialist supplie rs provide a service to give individual devices a fixed IP address, which can either be private (accessed via a VPN connection) or a public address on the internet. In the UK the suppliers include Wireless Logic, Wireless Innovation Ltd and Wyless.net. Such companies are suitable for larger scale networks and provide additional on-line tools to let you monitor the state of your GPRS connections, traffic use etc. Alternative suppliers can be found by searching for “Fixed IP SIM” on the internet making sure the offering is not a 3G only card. Currently Campbell Scientific Ltd only offers SIM cards as part of a subscription to its Konect data service . .
NOTE
9
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
It is important to ensure you are aware of the likely costs of GPRS data transfer. Prices can range from £0.005 to £10.00 per Megabyte of data transferred. As it can require in excess of 50 Kbytes of data per day to check and keep a GPRS connection open, let alone transfer any d a ta , it is important to find the right tariff and realise the likely costs. Where an always on connection is required, a flat-rate tariff will likely be more economic or you should at least negotiate a volume discount tariff with your provider. In the UK it is now possible to buy data only access for few GBP per month for several tens of MB data transfer.
Before using the system you need to know the APN se rver name of your provider, plus your username and password to gain access to the GPRS IP services.
5.3 GPRS Modes of operation
5.3.1 Using systems with fixed IP addresses
If you have a fixed IP service it may be either with routing to a public i nternet address or to a private fixed IP address that you connect to via a VPN tunnel.
If it is via a VPN tunnel please seek the advice from the SIM provider on how to setup and use the VPN tunnel. The tunnel will need to be open and kept open automatically if you wish to use Lo ggernet to call the logger automatically.
With a fixed IP address, once connected to the network the logger will be able to accept incomi ng connections for the services you have enabled, e.g. Pakbus, ftp, http. If you connect to the logger for normal datalogger communications (via the Pakbus/TCP service port) the datalogger will automatically start to send beacon messages once per minute to the device that called. This will hold the connection open (which is useful as some GPRS providers will cut-off inactive connections) and also ensures the connection is working, however this does incur data traffic charges. (See the help within Loggernet for connecting via an IP port – the port number must match that set for the Pakbus/TCP Service port set in the logger.)
With a fixed IP address, Loggernet should be able to call out to the logger on demand so it is possible to setup scheduled data collection. To minimise data charges you can prevent the extra traffic outside the scheduled calls by unchecking the box on the Pakbus port that forces it to stay open.
With a fixed IP it should also be p ossible for multiple PCs to call the same logger either for data collection or connecting to the logger’s web or ftp server functions. If you choose to do this though be careful to ensure the logger has an adequate power supply to support multiple and lengthy connections and also check that you are certain the traffic costs will not get out of hand . If calling the datalogger from multiple PCs that use the Pakbus protocol please make sure that Pakbus port of each copy of the calling software has a unique Pakbus address.
If using the T CP/IP function in the modem only one simultaneous connection is possible at any time.
5.3.2 Using systems with dynamic IP addresses
For a few net works even though t he datalogger has a dynamic IP addr ess which can vary on each connection, it is a public IP address so can connect to it from the public internet if you can track the address assigned to it. It is possible to use a dynamic name service in this instance (please contact Campbell Scientific for more details).
NOTE
10
Using with Campbell Scientific Dataloggers
More commonly if you have a dynamic IP SIM you will not be able to call out to the logger as it is on a private network behind a router/firewall. Instead you have to get the datalogger or modem to open a connection back to the Loggernet PC which itself must have a public IP address (see firewall issues below) and have Loggernet hold the connection open.
There are two ways of doing this.
1) Using the Datalogger TCP/IP stack you can configure the logger to
automatically establish a socket connection to a remote system, e.g. your Loggernet server. It will do this as soon as it is powered up and a PPP connection is established. It will try to open the socket once per second, until successful. This is done by entering the IP address and socket in the Net Services tab, as a Pakbus/TCP Server settings (the Mobile Data Assistant will set this for you if you choose the Logger Call-back option). This method is easy to setup and does not rely on the datalogger program.
If you are using the Modem IP/Stack the Mobile Data Assistant package enables a similar function in the modem, which tries to keep open a permanent connection to the s ocket on a server (normally running Loggernet).
2) Alternatively you can call the TCPOpen/TCPClose command in your
program at regular intervals (the speed determines how quickly the logger will re-establis h a broken link). In the TCPOpen comma nd you need to give the public address of the Logge rnet server and the port you are going to connect on. This method is onl y normally used where the logger needs to conserve power so the modem is not on all of the time or mo re than four connections to different servers are required.
When using the Modem IP/Stack for a program controlled call-back the modem will only make the IP connection when it receives data from the attached logger to transmit. Normally you would trigger the connection by using the standard call ­back commands in the logger program, which would trigger data exchange with Loggernet on a direct connection, e.g. P97 for older loggers, or SendGetVariables for newer Pakbus loggers.
For either method the port (socket) number must match the call-back port number entered in the setup screen of Loggernet (see below). You should also enable call­back for the datalogger on the datalogger hardware tab.
The method of managing Loggers which call back ove r IP varies with the Loggernet ve rsion. Loggernet 4.1 or later is recommended. A description of how to setup Loggernet for call-back is given in Section 9.2 below.
5.4 GPRS - Minimising call costs and power use
If the modem is used in an “always-on” configuration, to allow instant access, the modem will stay in a higher power state for most of the time. It is critical to take this into consideration when conside ring suitable power supplies and battery sizes. The always o n-configuration also requires some network traffic to flow to keep the connection open, which will use up some of your GPRS data allowance.
The average power consumption of the COM110 when there is an open PPP/GPRS connection will typic a lly be 30 mA. With only low level traffic flowing through the connection the data logger itself will often be able to drop into a lower power state, i.e. not consume extra current. However, during communications activity both the datalogger and modem power use will increase significantly – the tra nsmitter using an extra 100-400 mA depending on the installation and speed of communication.
11
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
To achieve lower power states either a power switch can be used in the power line, (see the installation section below), or if using a datalogger that is running its own TCP/IP stack, you can close the PPP connection (using PPPClose in your program), which will put the modem in a lower power state. Once in this state the modem can still accept incoming GSM dial-up calls.
The lowest power use is achieved by cutting power to the modem. When doing this it is important to deregister the modem from the network before turning off the power. This is usually done by sending a command AT+CFUN=0 to the modem and waiting at least 2 seconds before turning off the power. Failure to do this may result in subsequent c onnections to the network being refused for prolonged periods or the modem even being barred from the network if this is done frequently. When poweri ng up the modem again and then using P PPOpen to restart the GPRS connection, it is advisable to add delays (of 10s or so) in the program for the modem to register on the network and the PPP session to start before starting to send out any data.
By implication the logger defaults to the P P POp en state as s oo n as a port is activated for PPP. This is not dependent on a program running. T o stop a P PP co nnection bei ng made when a p rogram i s recompiled, include a PPPClose instruction after the BEGIN instruction. Do this with consideration because if you load a program that incorrectly calls PPPClose you could block further communications. .
If using the M odem IP stack, the re are less options for shutting down t he GPRS link. Normally the only option is by cutting the power to the modem. If this is done, avoid doing this too frequently as it is not possible to cleanl y lo g off from the network, which can lead to delays in registeri ng the modem when power is restored.
In either mode of operation you can use the “call-back” function of Loggernet (see above) to make a special call back to the logger (using the Sendvariables command) which in turn triggers a no rmal data collection from the logger. When using the logger IP stack the GPRS connection and power can be controlled to enable them only during the ca l l-back. When using the modem IP Stack, it can be configured to minimise use of the connection when set up for “Program controlled call-back”.
5.5 Calling the logger in GSM dial-up mode when it is set for GPRS comms
In some circumstances it may be advantageous to call out to the system in GSM dialup mode by dialling and connecting with a phone modem. This may be necessary in the event of failure of the GPRS network or network connections that prevent dial-back to the Loggernet server. It is possible to call the logger in the standard wa y (see above) providing you know the GSM data phone number and also providing the logger has periods of operation when the PPP connection is not enabled, i.e. PPPClose has been called.
It is not possible to establish a GSM data connection whilst a PPP session is in progre ss. It is not possible to call a COM11 0 in GSM mode when it is configured for GPRS use.
5.6 Sending configuration commands to the modem
It is often advisable to reset the modem at regular intervals or send other configuration commands to the modem, for instance to enable very low power states between calls. When using the l oggers IP Stack, this can be done within the
NOTE
NOTE
12
Using with Campbell Scientific Dataloggers
datalogger program by opening the serial port to which the modem is connected and sending out commands using the serialout command. To allo w ano ther PPP connection the program must close the serial port using serialclose otherwise the PPP connection will be permanently blocked.
When using the Modem IP stack c onfiguration commands are not normally sent from the datalogger.
6. Installation of the COM110 modem
6.1 Configuring and Fitti ng t he SIM
Before the COM110 modem can be used or tested, it must be fitted with a ‘SIM’ card (Subscriber Identification Modem) that enables it for use on a specific cellular telephone network in a particular frequency band..
If possible, ensure that the SIM is configured so that it does not require a Personal Identification Number (PIN) security code to be entered after the modem is powered up. The PIN can most easily be disabled by inserting it into a separate, hand-held standard GSM phone and following the i nstructions contained in the phone manual. If a separate phone is not available, please contact Campbell Scientific for details of how to disab le the PIN code for use with the COM110. If this is not possible, or if your airtime pro vide r only allows operation with a PIN enabled, please refer to Appendix A.
Some SIM suppliers send the SIM with the PIN enabled and set to a default PIN nu mber. Chec k the documenta tion that came with your SIM.
The SIM card is installed in the COM110 modem in the slot at the aerial end of the case. Before installing the SIM make sure power is disconnected from the modem. The SIM is installed in a small tray that has to be ejected b y pushing in the small green butto n which is to the rights of the slot holding t he tr ay. Use a pen or similar to push the button inwards. Insert the SIM with card with t he gold contact side of the card facing upwards in the tray. Ensure the cut-out of one corner of the card is orientated to match the recess in the tray so the SIM sits flat in the tray. Push the tray back into the slo t until fully in then, with the aerial connected, power on the modem and check if the LED starts flashing within a minute or so to indicate successful registration on the network.
6.2 Connection to a Datalogger
The COM110 modem can either be connected directly to the RS232 port of the datalogger, if it has one, using the RS232 cable provided as part of the CS­GSM/GPRS232 kit or to the CS I/O port of dataloggers that ha ve this port, using an SC-WMI or SC105.
If your datalogger has both an RS232 and CS I/O port you may still wish to use an interface as it frees the RS232 port allowing a local PC to be connected to be used or for connection to a sensor.
The SC-WMI is not recommended for use where other devices are sharing the CS I/O port.
NOTE
NOTE
13
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
6.2.1 Connection to a CS I/O Port
The Campbell Scientific SC-WMI interface provides a simple, very low power interface for connecting the COM110 modem to the CS I/O port on Campbell Scientific dataloggers. The quiescent current consumption of the SC-WMI is typically less than 100 µamps and it uses less than 3 mA when communications are in progress. There is no use r configuration of this device. It is simply connected between the datalogger CS I/O port and the COM110 modem as shown below in Figure 1.
The SC-WMI is not recommended for use where other devices are sharing the CS I/O port. The maximum baud rate it can support is 38400 baud.
The SC105 is connected to the datalogger using an SC12 cable and then to the COM110 using a 0.5 m grey cable. Please take not of the marking on the case of the SC105 indicating which end connects to the datalogger to ensure it is installed the correct way around.
The SC105 may need to be configured before use to make sure it is in modem mode and the baud rate of its serial port matches the speed set for the COM110. Please refer to the SC105 manual for further details.
6.2.2 Connection to an RS232 Port
If using a CR23X, CR800, CR1000, CR3000 or CR5000 datalogger, an alternative connection is possible using the RS232 port, if this is free. The CR200 only has an RS232 port so this is the only option.
The cable required for the direct connection to a datalogger serial port is supplied as part of the CS-GSM/GPRS 232 kit. The 9-pin connector plugs in the datalogger RS232 port and the 15-way connector directly into the COM110 modem.
NOTE
SC-WMI
SC12 cable
Figure 1 Connecting the COM110 modem to a
Datalogger
Connect to 9-pin
‘CSI’ socket on datalogger
9-pin
COM110 modem
Diagram Not to Scale
Connect to 15-pin socket on the COM110
14
Using with Campbell Scientific Dataloggers
The cable supplied for use with the COM110 modem is different from that supplied with older modems. The cable has additional control wires that are not used in standard Campbell installations. These are insulated and cut back can covered with insulation at the free end of the cable.
6.3 Connecting Power
The COM110 modem requires a power supply capable of supplying 5-32V DC, at an average current of up to 500 mA, with short peak currents of 2.5A (at 5.5 V supply). COM110 is fitted with a 2A slow acting, fuse in an inline fuse holder in its power cable, to minimise damage in the event of a failure. Additiona l ly, Campbell Scientific power supp lie s include a slow response solid-state automatic resetting fuse. The normal colour scheme for wiring is RED for positive and BLACK for negative.
If the COM110 modem is to be powered from the same supply as the datalogger, ensure that the power connections for the COM110 modem are made as close as possible to the battery outputs. This will prevent the COM110 modem causing voltage drops and noise on the supply to the datalogger.
The quiescent power consumption of the COM110 modem is typically around 5 mA, once the unit automatically shuts down at the end of a call. Having the unit powered all the time ensures unhindered access at any time by remote users and also avoids complications of having the datalogger program include code to control the power.
For very low p ower installations turning the power off may be e ssential though. To do this it is possible to control the power supply to the COM110 modem by using a solid state relay, such as the PSW12 power switch or, if free, to use the power switch built into the wiring panel of some dataloggers. See Appendix B for example programs where the datalogger controls power to the COM110. Table 1 shows the wir ing from the PSW12 power switch to the datalogger. The failsafe wire, if connected to 5V, ensure the modem remains powered if the logger program stops running and the control port the yellow power control wire is connected to is not driven.
Table 1 COM110 modem Power Supply Connections via a PSW12 switch
COM110 modem Cable Colour
Connection
Red (positive supply)
+ 12V
Black (negative supply)
G
Yellow (power control)
Control Port (or +12V for testing)
White (Failsafe function)
5V (normally)
N.B. These c olours and connect i ons only apply to the cable supplied by Campbell
Scientific Ltd.
In the case of CR10X dataloggers, only the power switch in wiring panels fitted with green terminal blocks is suitable.
NOTE NOTE
15
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
6.4 Selecting and Connecting an Antenna
When selecting an antenna, please note the following points:
Make sure the antenna used covers the frequency you intend to use the
COM110 modem on, i.e. does the antenna cover 900 or 1800 MHz, or both (dual band).
Low cost,
¼- or ½-wave antennae are adequate for most applications where
signal coverage is good. It is important to realise that most low cost antennae designed for vehicle mounting require a flat, metal sheet to form a ground plane at the base of the antenna to achieve the specified gain figure and to ensure proper impedance matching. As an approximate rule the ground plane should have a radius equal to or greater than the height of the radiator.
Slightly higher priced co-linear, ‘marine’-grade antennae do not require such a
ground plane and can be more easily pole or cross-arm mounted.
In areas of poor signal coverage a directional, high-gain ‘Yagi’ antenna can be
considered, but this requires knowledge of where the cell base stations are situated in order to enable proper align men t.
Raising the antenna is often the most effective way of getting better signal
reception. However, if long cables are required to achieve this, use low-loss extension cables that do not have the significant signal loss of low cost cables. Long cables are a particular problem when operating at 1800MHz.
Like most cellular-based syst ems, the COM110 modem varies its transmitter
power to ensure good communications with the remote cell station. Using a cheaper, low-gain, antenna may result in a significant increa se in power consumption in areas of poor signal coverage.
If the antenna is placed near the top of a mast or has long antenna cables it may
be vulnerable to lightning damage. If lightning i s common at the inst allation site, additional lightning prote c tion may be required to protect the COM110 modem – please contact Campbell Scientific for further advice.
Using an antenna that is installed incorrectly, or with fault y wiring, can lead to premature failure of the transmitter output of the COM110.
Install the antenna so that the radiator is positioned away from other vertical metal structures. It should also be at a distance from any sensors so that it does not either physically or electrically interfere with the sensor readings. If the COM110 modem is connected to a PC (see below) it is possible to check the received signal strength using the AT+CSQ command (see Appendix C for further details). This can be used to find the optimum antenna position. You should aim to get the highest signal strength (as close to 31) as possible. For reasonable communications you need a minimum level of approximately 10 when operating in non-transparent mode for dial-up or 12-14 for GPRS use. Be sure that the modem is configured to talk only to the network operator you intend to use when doing this (see the AT+COPS command).
Many antenna have bodies that are connected to the coaxial cable screen. It is therefore essential to ensure the correct polarity is maintained thr ough the c abling system to avoid the possibility of shorting the transmitter output of the COM110 modem to the power supply ground via the lightning protection cables and mounting structure.
CAUTION
CAUTION
16
Using with Campbell Scientific Dataloggers
6.4.1 Antenna Supplied by Campbell Scientific
Campbell Scientific can supply variou s a ntennas, if required; including a ‘low­cost’ antenna (see Figure 2, below). This is supplied as part of the standard CS­GSM/GPRS package.
In areas of hi gh signal strength, the low-cost antenna will be suitable fo r a lmost all applications, either at 900 or 1800 MHz. The antenna, as supplied ‘off the shelf’, is fitted with a connector which will either directly fit the COM110 modem transceiver aerial socket or plug into an adaptor that will be supplied. When the antenna is supplied as part of a weather station or other complete installation, Campbell Scientific may replace the original connector with a compatible connector before the system is tested.
In a field installation it is recommended that the cable length between the antenna and the transceiver is kept as short as possible to reduce the signal loss in the cable, although, as mentioned above, it is often more advantageous to mount the antenna higher. In some applications the cable will need to be shortened, and so a new connector can be installed onto the cable at this time by cutting off the surplus cable, together with the original connector, a nd fitting a new connector. Ensure that all connections are well made, and the connector is secured using a crimping tool or pliers. The connector which connects to the modem is only suitable for use in dry environments and so must be protected from direct exposure to water and precipitation.
Figure 2 ‘Low-cost’ dual-band antenna supplied by Campbell Scientific
The antenna is supplied with a pole mounting adaptor, a `V’ bolt, allowing it to be fitted to 30-54 mm diameter vertical tubing. If you need to mount antenna onto a smaller diameter pole, insert some hard packing material between the pole and bracket. Alternatively, without the adaptor, it can be screwed to a suitable flat vertical surface. The design of the antenna means that no ground plane is required, thu s allowing more fle xibility in mounting. Avoid mounting the antenna close to other vertical metal structures or on flat metal surfaces.
17
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
Higher gain YAGI style antennas are available from Campbell Scientific to special order. These can help with reception in remote areas or where reception is poor due to obstacles, but can take some experimentation to find the best orientation to get the optimum re c eption.
7. Configuring the COM110 modem
If bought as part of a CS-GSM/GPRS package the COM110 modem will be preconfigured by Campbell Scientific to work out of the box so no configuration is normally necessary for GSM dial-up use.
If the COM110 has been bought as a separate item, if it is going to be used for GPRS or it needs to be reconfigured from another use this can easily be done using the Mobile Data Assistant software package that will run on Windows PC platforms.
To use this package you need a special cable to allow connection of the 15 way connector on the modem and the serial port of a PC (or a serial-USB cable connector to the PC). These are available from Campbell Scientific Ltd and called a Wavecom/ COM110 programming cable.
If you do not have the Mobile Data Assistant package you can use a terminal emulation program to communicate with the mode m and ma nually send it some basic setup and diagnostic commands, some of which are detailed in Appendix F.
When using the CR800, CR1000 or CR3000 dataloggers it is also possible to `talk-through’ from one serial port to the mode m connected on another. When the modem is offline you can manually send configuration commands to the modem via this route – see the datalogger manual for a description of terminal mode, and refer to Appendix F of this manual. It is not possible to run the Mobile Data Assistant package via this type of connection.
If the COM110 modem has been pur chased with a cable for plugging into a datalogger RS232 port, a null modem cable or adaptor will be required allow correct connection to a PC serial port. Any terminal software used with this combination should be set to “No hardware handshaking”. This type of connection can be used to do some minor reconfiguration of the modem but cannot be used with the Mobile Assistant program because the reset procedure does not work via this cable combination.
Prior to attempting to setup a modem for GPRS communication you need to decide whether you will use the TCP/IP stack built into the datalogger (possible and generally advised with the CR800, CR1000 and CR3000) or use the TCP/IP stack built into the modem itself. You also need to know whether the SIM card you are using has a fixed IP address or a dynamic address requiring the logger to call-back to a Loggernet server.
7.1 Using the Mobile Data Assistant Program for system configuration
The Mobile Data Assistant program is available as a free download from
www.campbellsci.co.uk/downloads
Running the downloaded EXE file will start the installation process. T his program with run on Windows XP with Service Pack 3, Windows Vista, Windows 7 and Windows 8 and equivalent server versions.
18
Using with Campbell Scientific Dataloggers
This program is provided free of charge but is only licensed for use with COM110 modems purchased from Campbell Scientific or an authorised reseller.
After installation the start up screen looks like this:
Operation of the package is fairly intuitive so this manual is limited to a description of the general steps of operation and an explanation of the terminology used.
As can be seen above the main options, apart from Exiting the program, are either to Setup equipment or run some Di agnostics on the modem.
The Setup option is normally used first and will configure the modem for its selected use and, where the datalogger needs to be, will configure a datalogger too, if it is available. If the logger is not available it can be setup later using either this program or using the Campbe ll Sc ie ntific Device Configuration program.
The Diagnosti cs option shows you the modem can connect to the local network, giving a measure of signal strength too. If the modems own TCP/IP stack is being used you can also see if it has acquired an IP address.
7.2 Mobile Data Assistant Program Terminology
The list below give a brief description of the options available in each screen.
Setup Connection, GSM: will setup the modem for GSM dial-up access Setup Connection, GPRS: will setup the modem for GPRS data transfer Setup – Logger Selection: allows you to select the datalogger type the modem will be connected
to. Setup – Baud rate: c ontrols the baud rate the modem serial port is set at.
NOTE
19
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
Setup – Settings - Datalogger port: allows you to select the serial port on the data logger to which the modem will be connected.
Setup – IP Control: allows you to select whether you will be using the logger’s own IP stack or the one built into the modem.
Setup – IP Control – Logger IP Stack: sets the logger to run its own IP Stack (only shown for loggers that support this). This allows full TCP/IP access by the logger, allowing email, ftp etc.
Setup – IP Control – Modem IP Stack: sets the modem to run its own IP Stack (applicable to all loggers). This only allows basic co mmunic a tions with the logger.
Setup – Connection Control: allows you to define the mode of the IP connection (see for a detailed description)
Setup – Connection Control – Logger Listening: where the datalogger has a fixed IP and listens for incoming IP connections.
Setup – Connection Control – Logger Callback: where the datalogger has a dynamic address and is calls back to Loggernet using an automatic function which calls-back to a server continuously.
Setup – Connection Control – Logger Program Callback: where the datalogger has a dynamic address and calls-back under the control of instructions within the logger program (which allows optimisation of power and data use).
Setup – Connection Control – Modem Listening: where the modem is running its IP stack, has a fixed IP and listens for incoming IP connections.
Setup – Connection Control – Mod em Callback: where the modem is running its IP stack, has a dynamic address and is calls back to Loggernet automatically, continuously.
Setup – Connection Control – Logger Program Callback (under the Modem IP stack option): where the modem is running its IP stack and is set to call-back but only to make a connection where commands in the program trigger serial communication via the modem, e.g. the SendVariables command to trigger a call-back collection.(This allows optimisa tion of power and data use).
Setup Settings (for IP connection) – APN: the access point name provided by your SIM provider. This points the system to a serve r through which is ac cesses the GPRS service.
Setup Settings (for IP connection) – User ID: the user name provided by your SIM provider to allow access to the GPRS service. Sometimes this is blank or a common name for all users.
Setup Settings (for IP connection) – Password: the password provided by your SIM provider to allow access to the GPRS service. Sometimes this is blank or a common for all users.
Setup Settings (for IP connection) – Listening port: when s et to listen for an incoming connection, this is the port which the logger or modem will listen on for incoming con nections (the logger has a default of 6785).
Setup Settings (for IP connection) – Call-back port: this is s hown when the logger is calling back to a ser ver. This is the port on the server to which the logger should try and connect to.
Setup Settings (for IP connection) – Call-back address: this is shown when the logger is calling back to a server. Enter the public IP address or domain name of the loggernet server (or the router its traffic is being routed through).
Setup Settings (for IP connection, Modem IP Stack ) – Idle Time: if a connection has been opened to the modem and there is no traffic for this period the modem will close the socket connection as it may be erroneous or faulty.
Setup Settings (for IP connection, Modem IP Stack) – Reset interval: shown where the mode m is set to listen for connections. If no connection is made within this time t he modem will reset the connection to remake the GPRS l ink, in case that link is faulty. If the connections to the modem are
20
Using with Campbell Scientific Dataloggers
less frequent than the default time of 60 mins then increase this time – at the possible cost of the extra time it will take to recover a bad connection.
Setup Settings (for IP connection, Modem IP Stack) –Max Time Onl ine: limits the ma ximum time the call-back socket is opened for. This is useful for resetting `broken’ connections that can be held open forever otherwise. This can be disabled by setting it to “0” which may be done if the modem is reset by regular power cycling.
7.3 Mobile Data Assistant Advanced opt ions
Generally use of the Mobile Data Assistant is straightforward and only requires you to step through the options and wait for the system to be setup. If this process is not completed correctly and does not complete after a second attempt there is a facility to be able view the commands sent to the modem and also to record the process to aid in support. This is acc essed by clicking i n the very right of the screen which becomes highlighted in orange as shown below when you move you mouse over this part of the screen:
Once you click on that bar a serial communication activity windows appears as shown below. By clicking on the icons below this window you can save t he contents of the window to a file or the clipboard so the information can be captured for sending in with a support request.
21
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
When this window is opened on the home screen an additional entry window appears below the activity window that lets you send commands directly to the modem. This can be used to send diagnostic commands to the modem and also to send non-standard configuration commands. Pri or to using this make sure the COM port and baud rate are selected correctly to match the connection and setup of the modem.
7.4 Changing the modem and logger settings without Mobile Data Assistant
The COM110 can be configured, as most GSM modems, using a terminal emulator program by sending a series of “AT” commands to it. Please contact Campbell Scientific for details of those commands if required.
The setup of the datalogger can also be done using the Campbell Scientific Device Configuration program. This can be used to manual ly enter the PPP settings, change the communications port or its baud rate and also to control the automatic call-back option. This tool may still need to be used if you are running the logger’s TC P/IP stack and you wish to change the IP s ervices it supports as a server, e.g. http, ftp etc. These are accessed via Network Services tab.
There are some other settings supported in the Modem which are not changeable via the Mobile Data Assistant program. The modem supports the dynamic DNS service for instance which can be used on some networks with SIM cards that have dynamic IP addresses but which are public.
8. Using Loggernet for GSM Dial-up
These instructions apply to Loggernet. They also apply to software products based on Loggernet, that support telephone modem or TAPI connections, e.g. PC400.
22
Using with Campbell Scientific Dataloggers
8.1 Configuring a Desk-Top M ode m as a Base Sta t ion
You can use most desktop landline and even cellphone modems to connect to a remote COM110 modem. The modem should be setup as if calling a remote landline modem. The baud rate for connection should be set to 9600 minimum.
The modem can be configured to connect either via the TAPI or Phone modem settings (TAPI being the preferr e d option if you have installed the modem into your Windows environment.)
While Campbell Scientific Ltd may be able to give some advice as to the best settings to use for common modems, the connection of the landline modem to a cellular network is specific to the cellular network being used. Problems establishing the connections are often not related to the fact that a COM110 modem or datalogger are connected at the remote end of the connection, but are caused by compatibility issues of the PC modem with the network. Please also contact your cellular network support team for advice on any problems that you might encounter.
8.2 Configuring the COM110 modem as a Base Station using Loggernet
Neither Campbell Scientific nor the manufacturer provide specific drivers for the COM110 modem. Instead they rec ommend that you foll ow the normal Windows procedure for installing a TAPI modem and select the modem type “Standard 9600 bps” or “Standard 19200 bps”. Check that Windows finds the modem and attaches it t o the correct COM port. For this to work you must make sure the baud rate of the modem has been setup previously to match the modem type selected. Thereafter you can use the modem to call-out using the TAPI interface.
You can also us e the Phone mod em option in Loggerne t, using the default modem type, with the baud rate set to 9600 baud. This option is preferred if additional modem settings are required (see below) or if the COM110 modem is often unplugged from the PC, as the TAPI interface expects to find the modem connected at all times.
Before use it is also necessary to reconfigure the modem back to its factory default settings using a terminal emulator and issuing the AT&F, AT+1FC=2,2, then the AT&W commands.
8.2.1 Extending the Default Time-Outs
When using either a landline base modem or a COM110 modem as the base, it is sometimes necessary to increase the time both the PC and th e base modem will wait before timing out an attempted c onnection to a remote modem. Many modems have a default timeout of 30 seconds which may not be long enough for connection over busy or distant networks. Adding “S7=45” to the end of the modem initialisation string sets the timeout at 45 seconds and Loggernet will increase its own timeouts to suit. Normally you are allowed to increase this setting up to 60 (seconds) if a call is seen to take such a long time to connect. Setting too long a delay may, however, slow down the retry sequence in the event of a failed connection.
NOTE
NOTE
23
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
To add this setting, use the Phone modem option in Loggernet where you can edit the modem initialisation string in the setup screen. You cannot amend this setting for a TAPI interface in a way that Loggernet can also detect.
Campbell Scientific communica tions software includes other time-outs which are used to check for hung communications links. These are set to be quite short for land-based modems, as the response to any command sent from the PC should be almost instantaneous. A link to a remote COM110 modem normally passes through several nodes of a digital data network, all of which can add delays. Usually these delays are less than one second and so have no effect on the communications process. However, on a long distance call or busy network, the built in time-out delay for the PC software may need to be extended.
In Loggernet or PC400W, a sta t ion-specific delay can be added by increasing the time in the ‘Extra response time’ box shown on the datalogger hardware set-up screen. This delay is entered in seconds. Loggernet has a default, built-in, delay of ~2 seconds, which is adequate for use with the COM110 modem in most case s. On busy networks, or with poor communication links, a value of 3 or even 4 may be required, to allow the error correction process to function.
Where a COM110 modem is used as the base station modem, it is advisable to increase these delays even more by perhaps another 1-2 seconds, if communications are proving to be unreliable.
Entering too large a dela y ca n slow down the entire communications process, and so an optimal value should be determined by trial and error.
9. Using Loggernet for GPRS communications
9.1 Setting up to call a logger wit h a fix e d IP a ddre s s
Where there are no restrictions on outgoing connections from Loggernet to the remote IP address, the connection can be setup as a standard IPPort connection as documented in the help system. An example is shown below. The only change from entering the IP address and port in the normal way is the an “Extra response” delay of a few seconds may be required when using a slow connection.
Do not extend the extra response beyond 5 secs as it is not beneficial.
NOTE
NOTE
24
Using with Campbell Scientific Dataloggers
Where the number of outgoing IP ports is limited, perhaps due to a firewall restriction, Pakbus loggers with discreet Pakbus addresses can be connected via a PakbusTCPServer, as shown below (Loggernet 4 onwards). The IP address of the remote logger is entere d in the Routing screen as an Outgoing connection.
.
25
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
9.2 Setting up call-back in Loggernet
Where the logger is programmed to call-back to a Loggernet server, perhaps because it has a dynamic IP address, Loggernet needs to configured to expect a call-back on a the chosen port. The same settings apply whether using the loggers own TCP/IP stack or the modem stack.
9.2.1 Setting up call-back in Loggernet Version 3
Version 3.x versions of Loggernet require an IPPort be entered for each logger and a separate call-back socket be allocated to each IPPort. For each socket you will need to open a hole in your firewall(s) and possibly put an entry in your router tables, if using one.
In versions of Loggernet of 3.4 there is an extra setting in the setup screen called “TCP Listen only”. This should be set when using dynamic, private I P addresses to prevent Loggernet trying to call back out to the logger in some circumstances, e.g. loss of a c onnection. This s etting ensures Loggernet returns to a state of waiting for another call-back as soon as possible. The setup screen for Loggernet
3.4 is shown below.
When filling in that setup screen, the settings for the Internet address and the IPPort on the IPPort hardware screen are largely irrelevant in this case as Loggernet cannot make new outgoing calls as most loggers with dyna mi c IPs (assigned to the datalogger) do not allow incoming connections. You should still add a valid IP address and match the port number to the Pakbus port number in the datalogger t o prevent Loggernet flagging errors. When a successful connection is made from a remote logger you will see that Loggernet updates the IP address of the remote logger, as viewed in the Setup screen. Unless your provider allows this, do not expect to be able to make connections out to this address though as it is normally the address of an intermediate router that is the barrier between the private and public networks. I f you have several s ys tems with service from the same airtime provider you will often find the same IP address shown for several of different loggers
26
Using with Campbell Scientific Dataloggers
9.2.2 Setting up call-back in Loggernet Version 4
In Loggernet 4 there is a new root device called a PakbusTCPServer that has a single call-back port. Multiple dataloggers are attached to this port and are identified, when they call-back, by their Pakbus address rather than the port they call-back on. Thi s s implifies the configuration of the da taloggers and only requires one port to be configured in firewalls/routers.
The call-back port is entered in the hardware tab as shown below.
The details of the way calls are routed via this port are entered in the routing tab as shown below and fully document ed in the Loggernet help system. If you are able to call out to a device that has a fixed IP address enter it in the Outbound Pakbus connection table, matching the logger Pakbus address to its fixed IP address, with the logger’s Pakbus service port appended to the end.
If the logger can only call back and you wish Loggernet to try to hold on and maintain the connection, enter the logger or range of loggers with a specific Pakbus address into the Maintained node table.
27
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
You then need to attach a datalogger entry to the PakbusTCPServer for each datalogger i n your GPRS network, making sure each logger has a unique Pakbus address which matches the logger Pakbus address set in the logger us ing the Device Configuration program. Other settings, such as data collection parameters, clock correction are set as normal in the datalogger tabs.
9.2.3 Keeping the connection open when calling-back
Once a connection between the logger and the Loggernet PC is established, if the connection is set to be maintained (Loggernet 4) or always open, Pakbus messaging will keep the port open and allow Loggernet to make outgoing calls to the logger, e.g. scheduled data collections. Note, for the connection to stay open you must set the Pakbus port to be always open (but do not set this setting if the logger is ma king less frequent call-back connections controlled by code in the logger or modem to conserve power).
Whether operating in call-back or fixed IP mode if no valid TCP/IP packets are received by the datalogger within a few minutes, either it or the modem will test the PPP link locally using a special PPP link test that most providers support. If that fails or 30 minutes pass with no real d a ta being transferred it will attempt to hang up the PPP connection and reconnect. This process allows detection and recovery from a broken GPRS connection (which is not uncommon on some networks). When using the Modem IP stack the idle time (no valid data) and maximum time online are settings you can configure.
In many cases a broken connection may be detected earlier than 30 mins because for instance Windows detects the loss of the TCP/IP connection within a few minutes. Please be a ware though that these delay can be lengthy when checking for and debugging lost connections. If you have a poor connection it is possible to speed up the detection of loss routing back to Loggernet by adding code to the logger program, e.g. using the PingIP command. Please contact Campbell Scientific Ltd for further details.
If you are not using Loggernet for Pakbus communications, e.g. you are collecting data by FTP, you either need to setup some FTP activity at an interval less than 30
28
Using with Campbell Scientific Dataloggers
minutes or set up another proce s s , e.g. low frequency pinging, to prevent the datalogger resetting the connection.
It should be noted that when you download a program to the datalogger via a TCP/IP connection, and the logger is using its own TCP/IP stack, it will reset the connection as part of the process of compiling the program. This will cause it to drop the PPP connection for some tens of seconds. This process should not be evident from a user standpoint as Loggernet should wait long enough for this to take place so should not report an error in most instances.
9.2.4 Firewall Issues
When using a ny of the above call-back methods you need to have the Loggernet PC either be directly attached to the internet with its own public IP, or be behind a router that forwards incoming calls to sp e c ific p orts onto the Loggernet PC. With some airtime providers you might also be able to setup a private network connection (or VPN) to the Loggernet PC to avoid it being on the public network.
In addition to allow incoming co nnections to that PC you will need to open up “holes” in any firewall software running on the PC and/or external routers to allow incoming connections to the call-back sockets and outgoing responses from those sockets.
If using a PC running Windows XP with SP2/SP3, Vi s ta, Wind ows 7 or Windows 8 (or equivalent server versions) as the Loggernet server you will as a minimum need to check the Firewall settings, via the advanced setting, and add Exception rules for the incoming port number s you wish to allow dataloggers to call back in on.
You can test the firewall settings by using that PC from outside your local network to make a connection to Loggernet using the Telnet program (this is an optional part of recent Windows installations that you may need to enable first). If enabled use Start, Run, cmd <enter> and then type
telnet n.n. n.n port <enter>
Where n.n.n.n is the public IP address of the LN server and port is the callback port defined in your IPPort or PakbusTCPServer. When you run this a blac k telnet window should appear on the screen and say connected in the top bar. You should also s ee messages in Loggernet’s logfile indicating somet hing has connected to LN on a particular socket (which it is listening on). It will eventually timeout (as you cannot emulate logger speak). If the telnet box flashes on the screen or generates an error message in the top bar it is likely one or more of the firewall, router or Loggernet are setup incorrectly.
If you are unable to install your Loggernet server outside a firewall or getting routing enabled thr ough the firewall it is possible to use an NL200 device (installed o utside the firewall) to route traffic to a Loggernet server. Please contact Campbell Scientific for more details.
10. Preventing COM110 modem Connection Problems
The COM110 differs from previous modems offered by Campbell Scientific in that it continuously monitors its co nnection state to the network. The modem will reset itself if it loses connection which will often re-establish its connection to the network. Generally, this will provide a reliable connection long term. However, there is a very small chance that the COM110 modem could crash as a result of
NOTE
29
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
electrical spikes on the power supply or local electrical storms. If the COM110 modem is powered continuously, such a crash will often prevent it answering an incoming call again until it has bee n re set.
To help overcome these problems, the datalogger can be programmed to either reset the COM110 modem by sending it commands (see Appendix E) or to shut down the COM110 modem at regular intervals using a p ower switch as described in Appendix B. This will save power, but also ensures that the COM110 modem is reset into a known state and make it re-register itself on the network. To be sure that the COM110 modem resets properly, it must be turned off for at least 10 seconds. How often the COM110 modem is turned off will depend on the normal calling schedule, considerations of power consumption and of how long you could afford to lose communication with the COM110 modem if it did go offline.
When turning the power off to the modem it is ad visable to avoid cutting the power when the modem is online. The program exampl es in Appendix B check if the modem is online before turning off the power. You should also avoid scheduling calls to the logger when it is due to power off. If possible the AT+CFUN=0 command should also be sent to the modem before cutting the power to let the modem cleanly deregister from the network and shutdown its radio modem (also shown in the e xample in Appendix B). If the modem is not cleanly shutdown there may be a delay of some minutes before the network will allow access to the modem again (and in GPRS mode, prevent modem fro m establishing a PPP connection).
Repeatedly cutting the pow er off to the modem without taking these precautions can cause a corruption to the modem settings or firmware that may need to be reset at the factory.
COM110 based CS-GSM/GPRS modems automatically monitor their connection to the network and will reset the connection if the modem believes it has not properly registered on the network for at least 5 minutes.
11. Fault Finding
11.1 General
Before placing the COM110 modem out in the field it is important to check that it is properly registered on a GSM network. To do this, connect it to a power supply and turn on any power switch, if used, by connecting the power contro l line to 5V or 12V. After power has been applied, the small LED in the case should come on continuously initially. Within 30 seconds the LED should switch to start to flash briefly every 2 seconds or so indicating that the unit has registered itself successfully with a GSM network. As a second check, if the SIM contract allows dialled calls to be made (this is not always allowed on GPRS only contracts) connect it to a PC and, using a ter minal emulation program, instruct it to dial a valid telephone number, e.g. ATD01509601091 <
ENTER>. If the COM110 modem
does not cause the remote phone to ring but instead immediately responds with a result of NO CARRIER it is likely that:
It has not been registered properly on a GSM network
CAUTION
NOTE
30
Using with Campbell Scientific Dataloggers
If the COM110 modem has definitely been registered on the GSM network, c heck that t he registration is for ‘non-transpar ent use’. Also check it is enabled for GSM Data (CSD) at 9600 baud – not just GPRS data. For GSM data connections you need to be able to connect from analog ue landli nes – the SIM provid er will normall y give you a second phone number to dial it on.
or
It is not fitted with a SIM, the SIM draw is not in place or the SIM is not
enabled (check with your provider)
or
The SIM is programmed to require a PIN to be entered every time it is turned
on. This is often the c ase with newly supplied SIMs. We strongly recommend that this feature is disabled; this is best done using a GSM phone (please refer to your SIM provider for more information).
Please refer to Appendix A if you can only access a network where use of a PIN is a legal obligation with the airtime provider.
The power supply is inadequat e, e.g. it cannot supply the high surge currents
during transmission. (See Sec tion 6.3.)
Once communication is established with a datalogger via the COM110, it is essential to monitor how error-free the communications link is, Loggernet generates log files which indicate the number of attempts required to retrieve good data (‘retries’). While the chances of getting bad data stored to disk are very small (because of the error checking protocols used) the speed at which data is collected can fall mar kedly if the link is ve ry noisy. This will l ead to much higher phone charges. If many retries are recorded it is worth checking the signal strength, studying the antenna position and the likely causes of interference.
If you still encounter problems it is also wor th checking the firmware version of the COM110 modem. Campbell Scientific has validated use with units with firmware revision: “R7.45” (checke d using instruction ATI3). While later software revisions will probably be backwards compatible, older software may not work so well. Please contact your supplier for an upgrade if necessary.
11.2 A G SM Base Station Fails to Get a Response from the logger
Check the following points:
Is the COM110 modem configured to ignore hardware handshaking? – It will
be if setup with the Mobile Data Assistant.
Have you ensured that your base station modem setup includes commands to
switch off flow control from the base station?
Are you powering the COM110 modem on and off periodically?
If so, the datalogger program which is controlling the power of the COM110
modem is either wrong, or is not running (perhaps due to a low battery voltage).
The number you are dialling - is the voice number for the SIM rather than the
data number - if you get "deadline" when the COM110 modem is on or an "answerphone" service when it is turned off this is almost certainly the problem.
NOTE
NOTE
31
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
If you manually dial the number with a phone and hear a buzzing noise rather
than modem negotiation tones (beep and whistles) the SIM is configured to accept incoming digital (UDI) calls only - contact the SIM supplier.
11.3 GPRS Fault finding – when using the logger TCP/IP stack
11.3.1 First stage fault finding
The diagnostics screen of the Mobile Data Assistant package allows you to check the basic connection of the modem to the GSM network and also to get a measure of the signal strength the modem is seeing, which is a useful tool for antenna positioning. The IP address of the modem will normally be shown as no IP as this relates an IP assigned to the modem when running its own TCP/IP stack.
There is no external feedback provided by the datalogger of the state of the PPP connection, e.g. an LED indicator (although this could be done if required by including code in your logger program and an LED to a control port). There are some other methods of checking if a connection has at least been established. The simplest of these is to connect a PC to the other spare serial port on the datalogger (CS I/O or RS232 depending on which interface is used for the modem, and presuming you have a compatible cable/interface). Run the Device Configuration program screen, connect to the datalogger and use the data monitor tab to view the status table, which is updated every few seconds. Scroll down to view the IPInfo values. If the ppp IP field is 0.0.0.0 there is no active connection. If valid IP addresses are shown a connection has been made, as in the example below.
If the IP address shown above stays at 0.0.0.0, here are some basic checkpoints to follow:
Check the cabling to the logger, power supply and aerial. Check the
modem is po we red and on network (there is normally an LED which flashes slowly to indicate this). If the LED is on permanently then check the SIM card is inserted correctly and the retaining switch is clicked across. If it still does not work try the SIM in a mobile handset and follow the fault finding above, including checking the signal st rength and network registration.
32
Using with Campbell Scientific Dataloggers
Check the modem was configured correctly.
Check you have set the correct APN, username and password.
Double check with your airtime provider that the SIM is GPRS enabled.
Check the datalogger operating system is up to date.
If the datalogger has firmware version 22 onwards additional information is provided in the IPInfo field of the status table that can be used to track progress of PPP connec tion. The information is shown at the e nd of the address messages after the "ppp gw:..." information. This field can be monitored with the Device Configuration program, or in the Ta ble monitor of the Connect client of Loggernet. Either of those programs only update every second, at best, which may not be fast enough as some of the information messages displayed are transitory. To get a faster update of the message you need to use the numeric monitor scre en and show the IPInfo field alone. You can decrease the update interval below 1 second. You can also increase the field width to see the whole message.
33
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
Messages that can appear include:
Message
Cause/Fault
ppp initialized
PPP was enabled and initialised OK
ppp program opening
PPPOpen in t he program
ppp program closing
PPPClose in the program
ppp closing
Now trying to hang up the connect i on
ppp closed failed
Could not hang up the modem. Check the
modem/settings
ppp close success
The PPP session was closed successfully
ppp dialling
The datalogger is trying to dial
ppp dial connecting
The dial string was accepted. Waiting for a
connection.
ppp dial failed
Invalid dial string or service not available
ppp dialled
The PPP server has been dialled OK – a connect
message was received.
ppp opening
Starting negotiations with the PPP server
ppp authenticating
Sending the username password information
ppp authentication failed
Username/Password invalid for APN being used
ppp authenticated
Username/Password accept and OK
ppp up: ip xxx.xxx.xxx.xxx peer xxx.xxx.xxx.xxx
At the end of a call “ppp up:” should end up showing the same values as ppp ip: and ppp gw:
Where "p eer" should be the gateway.
For a successful connection the messages should follow a sequence such as initialized, dialling, dial connecting, dialled, opening, authenticating, authenticated and up. If the sequence stops along the way and reports a failed message this gives an indication of the cause of the failure as shown in the table above.
If there is no dial string, or if the dial stri ng is PPP, then dialling is skipped and ppp “opening” should start up immediately.
If the PPP link works (i.e. you ge t a non-zero IP address in the screen above) but you do not get a connection to Loggernet, check these points for calling out to fixed IP addresses:
That you are us ing the right IP and port setting in Loggernet to match
those assigned to you for the SIM.
NOTE
34
Using with Campbell Scientific Dataloggers
Make sure any local firewalls allow you to make out go ing connections on
the ports being used. (Some institutio ns limit you to standard ports) .
Make sure the service provider lets you use non-standard ports over
GPRS (a very few apply default firewalls – although normally only for calls to the logger).
Double check the Net Services settings for the Logger using Device
Configuration program.
If you are using a SIM with a dynamic address check these:
Check the IP address of Loggernet used is correct – it needs to be a
public address (possibly redirected to the LN server by a router if the PC is on an internal private network).
That the router and PC firewall has holes opened for the logger to call
into. This requires low level configura tion of the firewall which might be Windows own firewall or third party firewall software running on the machine.
That the server port in Devconfig matches the port specified in
Loggernet.
Check you have an up to date version of Logge rnet.
You can also look in Loggernet’s Statu s/log tool to make sure Logge rnet is listening on the socket for call-backs. When a call-back is made you should see activity in the log showing a c onnection is being made.
11.4 GPRS Advanced fault finding
The datalogger has an advanced tracing capability that can be used to debug IP connection problems at a very low level. The easiest way to capture this information is to connect a PC to the da talogger via another serial port on the datalogger, other than the one to which the GPRS modem is connected as described below. The full trace information can then be captured into a file for long periods.
If this is not possible it is possible to c a pture some key trace messages either into a datatable or file in the datalogger memory. The former is done using the IPTrace command in your program (see the CRBasic help), however only a limited amount of information can be captured that way. To capture the trace to a file on the logger use the File Manager (accessed via the Advanced settings in the Device configuration utility) and set the ID to 3212. Enter a valid filename and the maximum file size in the “count” parameter taking into account the free memory available in the datalogger. The problem with either of these techniques is that you still have to be able to connect to the datalogger to recover the trace data unless data can be stored to a card or SC115.
If a second serial connection can be established, follow this process, noting this assumes the trace capture port will be the RS232 port:
Connect to the logger with the Device configurator program (Devconfig). Open the settings screen. Go to the bottom and find the IP Trace Code setting. Enter a value of 65535 in there. On the line above click on the IP Trace Com port and select RS232 (or the port to be used to capture the trace). Press enter and then click Apply. This turns on a low level trace output out of the RS232 port.
Now disconnect and in Devconfig go to the bottom of the device list and select “Unknown”. Select the com port is the one you are using and the baud rate is the same as you last used the serial port at (usually 115200). (If using the ME port or another com port for logging the trace, you need to set the baud rate in the port in
35
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
the logger settings first) Click on connect. This opens a dumb terminal emulator. You should see trace data coming through on the screen if the logger is powered and is tryin g t o make a connectio n. Click on Start export and enter a filename (end it in .txt). Turn the logger off then on and then leave the logger trying to connect for some minutes or long enough to capture enough data to cover the problematic event. When done click on end export.
When we have finished this process you need to remember to turn off the IP Trace function be fore returning the logger to normal use.
This will capture the IPtrace log in the file specified. You can open the file in a text editor and review the information there. The information in that file can be interpreted by many familiar with PPP connections and sometimes errors are obvious, e.g. mistyped dial strings. For expert diagnosis the file can be emailed to your support contact at Campbell Scie ntific who should be able to work out what is the problem and the solution for it.
11.5 GPRS Fault finding – when using the modem TCP/IP stack
The following steps are some basic steps to check why a connection does not work.
Following guidance above to check the modem is connected to the
network and has reasonable signal strength. You can do this by using the Mobile Data Assistant program and run the Diagnostics option. This will show the signal strength, network connection and whether an IP address has been allocated. If the address has not been allocated please try setting up the modem again making sure the APN, username and password are entered correctly.
If an IP address has been allocated you can check a syste m setup for call-
back operation by running Loggernet and use the Logtool to check the modem is opening the incoming socket as expected. If not, check Loggernet, any firewall software and any routers are configured correctly to allow the incoming connections on the expected socket. This can be verified using a PC on the public internet to Telnet into the IP and socket you are going t rying to use. You should see this causes a connection attempt to be registered by Loggernet which you can see by watching the Logtool screens.
Fault finding a non-working modem with a fixed IP address is slightly
easier as the modem will still be in command mode whilst waiting for a connection. You can also use a second PC and the Telnet program to connect to the socket you have configured to validate if the connection is open or not. If the modem has a fixed IP address and is on the public internet OR your PC is connected to the same private IP network as the modem you can also use the standard Ping command to check routing to the modem.
The modem a lso supports two advanced methods of remote debugging
and reconfi guration. This can be done either via sending SMS messages or, if the modem is online and with a fixed IP address, by opening a telnet session with the modem and issuing AT commands to the modem by that interface. Please contact Campbell Scientific for more details of these advanced options if needed.
36
Appendix A. Using the COM110 with the PIN Security Feature Enabled
It is possible to use the COM110 with Campbell Scientific dataloggers with the COM110’s PIN (Personal Identification Number) feature enabled. However, this has the following disadvantages:
If the COM110 loses power momentarily, it will not answer further calls until the
datalogger sends the PIN again as part of the normal program sequence. If the datalogger is programmed to send the PIN only once (leaving the COM110 permanently switched on), a datalogger reset would be needed to re-enable the system. If a regular turn on / turn off sequence is used (as described under ‘Controlling the Power Consumption of the COM110’ in Appendix B), the system will be disabled until the next sequence occurs.
If the COM110 fails to unlock the PIN code, for whatever reason, three times in a row, the
SIM card will be permanently locked. This will require you to contact your airtime service provider to provide an ‘unlock’ code for the SIM.
A1. Introduction
To operate with the COM110’s PIN feature enabled, the datalogger must transmit the command to send the PIN to the COM110 after turning on the power. For CRBasic dataloggers this is simply done b y using serial commands to send the PIN code after the modem is turned on, see the example below. For Edlog dataloggers this is done using Instruction P97 ‘Initiate Telecommunications’ using the ‘Generic Modem’ option. This option was added in recent releases of the CR510, CR10X and CR23X operating systems – from versions 1.06, 1.13 and
1.10 (and later) respectively. If you have one of these dataloggers with an older operating system, you should download the latest operating system from the Campbell Scientific website.
Users of older dataloggers, e.g. the 21X, CR10 or CR7, should contact Campbell Scientific to obtain a copy of a manual written for early versions of the M20T which describes an alternative, but more complicated, way of sending PIN codes using special cables and Instruction P98, ‘Send Character’.
A2. CRBasic Program Example
This example can be used on the CR800 series. CR1000 and CR3000 dataloggers. It uses the standard CRBasic serialopen, serialout and serialclose commands to send out con figuration comma nds to the modem. T he example shows using a slow sequence to sending the command to unlock the PIN immediately after turning on the mo dem.
'CR1000 Series Datalogger 'Example program showing how to turn on/off a GSM modem and disable the PIN code 'Also includes the correct sequence to shutdown the modem cleanly before turning 'off the power. 'The modem control is done in a slow sequence to avoid interference with measurements
'Declare Public Variables 'Example: Public PTemp, batt_volt
A-1
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
'Main Program BeginProg 'Normal measurements in the main scan here
Scan (1,Sec,0,0)
PanelTemp (PTemp,250) Battery (Batt_volt)
'......etc
NextScan
'------------------------------------------------------------------­'Modem control slow sequence - can be cut and paste as self-contained 'Set this constant to match the port the modem is connected to Const Modemport=COMME Const Modembaud = 9600 'Change to match modem baud rate
SlowSequence 'Run once a minute so can have one min resolution of timing Scan (1,Min,3,0) 'Every hour, in this example, turn on the modem If TimeIntoInterval (0,60,Min) Then 'Set port 1 to 1 (ON) (use writeio as in slowsequence) WriteIO (&B00000001,1) Delay(1,2,sec) 'Allow 2 seconds for the modem to power on SerialOpen (Modemport,modembaud,0,0,100) 'Send the command to unlock the pin code (PIN=601141 in this case) 'Allow one retry SerialOut (Modemport,"AT+CPIN=601141"+CHR(13),"OK"+CHR(13),1,100) SerialClose(Modemport) EndIf
'10 minutes later turn the modem off If TimeIntoInterval (10,60,Min) Then SerialOpen (Modemport,modembaud,0,0,100) 'Send the command to log off the network and shutdown cleanly SerialOut (Modemport,"AT+CFUN=0"+CHR(13),"OK"+CHR(13),1,300) SerialClose(Modemport) 'Set port 1 to 0 (LOW) (use writeio as in slowsequence) Delay(1,2,sec) 'Allow 2 seconds for the modem to shutdown WriteIO (&B00000001,0)
EndIf
NextScan
EndProg
A-2
Appendix A. Using the COM110 with the PIN Security Feature Enabled
A3. CR10X Program Example
Using Instruction P97 with the generic modem option does not require any special cabling or set-up. It is possible that the generic modem option may not be full y documented in your datalogger manual, but you should be able to find some information in the help syste m of Edlog for Windows. To gain a full understanding of the general mode of operation of P97 please refer to the examples in the datalogger manual.
For the purpose of unlocking a PIN code, P97 is used with the datalogger ID set to 0, which causes the instruction simply to send and check the responses to commands sent to the ‘modem’, without then proceeding to make a call.
Below is an example program which turns on the COM110 and se nds the PIN so that the COM110 can receive calls.
This progr am, for the CR10X, shows how to transmit the PIN command (AT+CPIN=nnnnnnn, where nnnnnnn is the PIN). The program includes a delay after turning the COM110 on, before calling P97. This is required because it takes approximately two seconds for the COM110 to power-up.
;{CR10X}
; An example program which shows how to turn the COM110 on and send ; a PIN code using Instruction P97 with the Generic Modem option. ; The power to the COM110 is controlled by Port 1 ; Please note that no measurement or data storage instructions are ; shown - this is an example of COM110 power control only.
*Table 1 Program 01: 10 Execution Interval (seconds)
;Other measurement instructions here
;At the start of every hour, say, turn on the COM110
1: If time is (P92) 1: 0 Minutes (Seconds --) into a 2: 60 Interval (same units as above) 3: 30 Then Do
;Turn on the power (COM110 power controlled by C1 in this case) ;Add extra code if low battery voltages are likely (see above)
2: Do (P86) 1: 41 Set Port 1 High
; Now set flag 1 low to enable P97 in Generic Modem mode to send the PIN
3: Do (P86) 1: 21 Set Flag 1 Low
4: End (P95)
; Now immediately call P97 to send the PIN unlock sequence ; This needs to start straight away after the modem is turned on so that it does ; not get locked out by the logger going into communications mode when the ;COM110 sends its wakeup OK <CR>
5: Initiate Telecommunications (P97) 1: 72 Generic Modem/9600 Baud
A-3
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
2: 1 Disabled when User Flag 1 is High
3: 20 Seconds Call Time Limit
; More than enough time to send
command
4: 30 Seconds Before Fast Retry ; just in case 5: 1 Fast Retries
;try just once more
6: 9999 Minutes before Slow Retry
; don't try for a long time
otherwise
7: 3 Failures Loc [ BadPINcnt ] 8: 0000 Call-back ID
; set to 0 indicates not a proper call
6: Extended Parameters 4 Digit (P68) 1: 68 Option
;D wait
2: 50 Option ; 5 seconds for the COM110 to power up 3: 87 Option ;Set wait delay to wait for up to 4: 50 -- Option
;5 sec for any response, aborting if not received
5: 69 Option ;E - transmit with echo 6: 17 Option ;17 chars - change for length of PIN code
7: 65 Option ;A
8: 84 Option
;T
7: Extended Parameters 4 Digit (P68) 1: 43 Option
;+
2: 67 Option
;C
3: 80 Option
;P
4: 73 Option ;I 5: 78 Option
;N
6: 61 Option ;=
7: 54 Option ;6
8: 54 Option
;6 This example uses a PIN code of 66011411
8: Extended Parameters 4 Digit (P68) 1: 48 Option ;0 2: 49 Option ;1 3: 49 Option
;1
4: 52 Option ;4 5: 49 Option
;1
6: 49 Option ;1 7: 13 Option ;CR 8: 82 Option ;R to wait for response
9: Extended Parameters 4 Digit (P68) 1: 2 Option ;2 characters 2: 79 Option
;O
3: 75 Option ;K 4: 13 Option ;<CR> 5: 0000 Option 6: 0000 Option 7: 0000 Option 8: 0000 Option
; Now the instructions to turn it off ; At 10 past the hour set flag 2 to indicate to turn off
10: If time is (P92) 1: 10 Minutes (Seconds --) into a 2: 60 Interval (same units as above) 3: 12 Set Flag 2 High
;If the logger is not communicatin g, i.e. ‘Modem is Off’ (ME line low) ;then if flag 2 is high
11: If Flag/Port (P91) 1: 50 Do if Modem is Off
A-4
Appendix A. Using the COM110 with the PIN Security Feature Enabled
2: 30 Then Do
12: If Flag/Port (P91) 1: 12 Do if Flag 2 is High 2: 30 Then Do
;Turn off the COM110
13: Do (P86) 1: 51 Set Port 1 Low
;Set flag 2 low
14: Do (P86)
1: 22 Set Flag 2 Low
;and disable the PIN code transmission via P97, just in case it is still trying
15: Do (P86) 1: 11 Set Flag 1 High
16: End (P95)
17: End (P95)
*Table 2 Program 02: 0 Execution Interval (seconds) * End Program
Other applications may require the PIN code to be sent prior to a callback call or prior to sending an SMS message (see Technical Note 33 ‘Sending SMS Messages using GSM modems’). For those applications which also use Instruction 97, the AT+CPIN can either be sent first (as above) followed by a second call of P97 to force the callback (once the first call is successful) or the AT+CPIN command can be incorporated in the normal dial str ing. Please contact Campbell Scientific if further advice on these techniques is needed.
If a COM110 with the PIN feature enabled is to be used with a PC as the base station, the CPIN=nnnnnn com mand can be included at the end of the Modem Initialisation string.
The COM110 will respond with a code indicating an error condition if the PIN is sent more than once after it has been powered up. This will not prevent the system dialling corr e c tly.
NOTE
A-5
B-1
Appendix B. Controlling the Power Supply to the COM110 Modem
This Appendix describes how the datalogger can be used to control the power supply to a COM110 modem to minimise power consumption.
B.1 Controlling the Power Consumption of the
COM110 modem
The power consumption of the COM110 system is much lower than many other cellphones, being typically 5 mA while waiting for calls and <200mA when on­line. As an option a power switch or the SW12 output (if free) can be used with the COM110, which allows the datalogger to turn off the power supplied to the COM110 and thereby minimise power use. However, the COM110 will not answer any incoming calls when in this state.
The first thing to consider when designing the power supply for your COM110 system is the possibility of only switching on the COM110 for, say, one hour per day, during which time a base station can be synchronised to collect data. The lowest overall power consumption can be obtained by making the datalogger turn the power on only when it makes outgoing calls. However, this would prevent you calling the datalogger at will from a base station to check its status or to load a new program.
Once the total time per day that the datalogger will be turned on in its different power states is determined, a daily power consumption can be estimated and the power supply designed accordingly. For most typical remote applications a PS100E and a medium-sized solar panel will suffice. Please refer to Technical Note 12 (Calculating Power Consumption and Solar Panel Size) for further details.
To allow the COM110 to receive calls, program the datalogger to set the relevant control port high which controls the power switch which will turn the COM110 on. The COM110 will not answer an incoming call when the power control line is low. Control is normally done using the datalogger instruction (If Time) with the command option to set the port high (after an additional check on the battery status) or low at specific times.
The period that the COM110 is switched on needs to be long enough to allow an incoming call to be started, data collection made and the call completed. The dataloggers allow an extra refinement to this sequence, which allows the ‘on-time’ to be reduced further. This is because it is possible to monitor if the comm port is still active. The program can then be written to turn off the COM110 only if the datalogger is not communicating. The following sequence could be included in a program to turn on the COM110 for 5 minutes every hour, but only turn it off if a call is not in progress.
The power can also be switched when using the modem for GPRS communications but extra steps should be added to the program to shut down the PPP connection before power-off (use PPPClose) and to renable it (PPPOpen), on power-up.
For extreme low power consumption applications where the modem has to be left powered on it is possible to disable the status LED which will save a further 1-2 mA power use on average. Please contact Campbell Scientific for further details on how to do this.
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
B-2
B1.1 CRBasic Program Example of Power Control
This example can be used on the CR800 series, CR1000 and CR3000 dataloggers. It uses the standard CRBasic serialopen, serialout and serialclose commands to send out configuration commands to the modem. The example shows using a slow sequence to turn on and then turn off the modem after 5 minutes. When it comes to turn off the modem it sets a flag. If communications are still active the modem is not turned off unless a full 15 minutes have expired since it was turned on.
This example also shows how to log off the network before power is turned off (using AT+CFUN=0).
'CR1000 Series Datalogger 'Example program showing how to turn on/off a GSM modem 'This example only turns on the modem for 5 minutes, but extends the time on for up 'to 15 minutes if the com port is active when it is time to shutdown. 'Also includes the correct sequence to shutdown the modem cleanly before turning 'off the power. 'The modem control is done in a slow sequence to avoid interference with measurements
'Declare Public Variables 'Example: Public PTemp, batt_volt
'Main Program BeginProg 'Normal measurements in the main scan here Scan (1,Sec,0,0) PanelTemp (PTemp,250) Battery (Batt_volt)
'......etc
NextScan
'------------------------------------------------------------------­ 'Modem control slow sequence - can be cut and pasted as self-contained
'Set this constant to match the port the modem is connected to Const Modemport=COMRS232 Const Modembaud = 115200 'Change to match modem baud rate
Public timetogooff As Boolean
SlowSequence 'Run once a minute so can have one minute resolution of timing Scan (1,Min,3,0) 'Every hour, in this example, turn on the modem If TimeIntoInterval (0,60,Min) Then 'Set port 1 to 1 (ON) (use writeio as in slowsequence) WriteIO (&B00000001,1) Delay(1,2,sec) 'Allow 2 seconds for the modem to power on EndIf
'5 minutes later turn the modem off if it is not online 'First set a variable to indicate the 5 min time has passed
If TimeIntoInterval (5,60,Min) Then timetogooff=true
'If time to go off also check we are offline OR that 15 mins has not passed 'i.e. shutdown at 15 mins anyway 'NOTE: edit the commactive variable to match the serial port being used for the modem If (timetogooff AND (NOT status.commactiveRS232)) OR TimeIntoInterval(15,60,min) Then SerialOpen (Modemport,Modembaud,0,0,100) 'Send the command to log off the network and shutdown cleanly, wait up to 3 sec.
Appendix B. Controlling the COM110 Power Supply
B-3
'First send the +++ sequence to get the modem in command mode - in case online
SerialOut (Modemport,"+++","OK"+CHR(13),1,150) SerialOut (Modemport,"AT+CFUN=0"+CHR(13),"OK"+CHR(13),1,300) `Delay to allow deregistration
delay (1,2,sec) SerialClose(Modemport) 'Set port 1 to 0 (LOW) (use writeio as in slowsequence) WriteIO (&B00000001,0) timetogooff=false EndIf '--------------------------------------------------------------------
NextScan
EndProg
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
B-4
B.1.2 CR10X Program Example
;COM110 power control example code for the CR10X ;Port 1 is the control port used to control the switch ON/OFF ;Flag 1 is used to indicate the COM110 should be turned off ;when any current call has ended.
;On the hour turn the COM110 on ;IF the battery voltage is good (see text below) 1: If time is (P92) 1: 0000 Minutes (Seconds --) into a 2: 60 Interval (same units as above) 3: 30 Then Do
;Measure the logger battery voltage 2: Batt Voltage (P10) 1: 1 Loc [ BattV ]
;and if it is > than 11.5 V turn on the COM110 3: If (X<=>F) (P89) 1: 1 X Loc [ BattV ] 2: 3 >= 3: 11.5 F 4: 41 Set Port 1 High
4: End (P95)
;At 5 past every hour set Flag 1 to indicate to turn off the ;COM110 when any current call is finished. 5: If time is (P92) 1: 5 Minutes (Seconds --) into a 2: 60 Interval (same units as above) 3: 11 Set Flag 1 High
;If Flag 1 is set AND 6: If Flag/Port (P91) 1: 11 Do if Flag 1 is High 2: 30 Then Do
;the datalogger is not communicating (ME off) THEN 7: If Flag/Port (P91) 1: 50 Do if Modem is Off 2: 30 Then Do
;Turn off the power to the COM110 8: Do (P86) 1: 51 Set Port 1 Low
;and set low flag 1, to allow it to be turned on next time 9: Do (P86) 1: 21 Set Flag 1 Low
10: End (P95)
11: End (P95)
Appendix B. Controlling the COM110 Power Supply
B-5
CAUTION
If power is limited and the turn-on time has to be kept very short, it is critical to ensure that the PC and the datalogger clocks are not allowed to drift apart, otherwise the PC may try to call when the COM110 is turned off. Clock synchronisation can be achieved automatically, during data collection. Please refer to the PC software manual for details on how to do this.
The COM110 can also be used with instruction P97 (Initiate Telecommunications) to make an outgoing call, either to return data to a remote computer or in the event of an alarm. Instruction 97 is normally controlled by a program flag (referred to as the Interrupt Disable Flag when programming P97) which is set low to make P97 initiate communications and call out. The process of setting this flag is normally controlled by some program control logic before P97 is executed.
To ensure that the COM110 is powered on for the outgoing call, an extra P91 instruction should be included before P97 to set the power control port high if the interrupt disable flag has been set low. P97 will automatically set the flag high at the end of a successful call, which the P91 will detect at the next scan and turn the COM110 off.
It is always best to design a power supply that has plenty of spare capacity to cope with the power demands of the entire measurement system. If the power supply is inadequate or faulty and the battery voltage is likely to drop to very low levels you need to add extra code, as shown above to ensure the COM110 is not turned on when the battery voltage is low. In particular it should be disabled before the level where the logger is likely to shutdown (below 9.6 V for the CR510/10X, higher voltages for the CR23X or CR5000 - see their manuals).
If the voltage falls below this level while the COM110 is already turned on, since the datalogger program will stop running, there will be no mechanism to turn the power off. This will cause the battery to discharge sooner rather than later. If using 12V lead acid batteries, a threshold of 11.5 Volts is advised, below which the COM110 should not be turned on, as below this level the majority of the capacity of the battery will have been used.
Appendix C. Useful Configuration Commands for the COM110
This section gives details of some of the useful test commands that can be used during setup of the COM110. Further details can be found in the COM110 technical manuals available on request from Campbell Scientific Ltd.
General details referring to the telecommunications industry can be found at the European Telecommunications Standards Institute (ETSI) web site at www.etsi.org.
C.1 Signal Quality Checks
AT+CSQ Signal Quality
Test command
AT+CSQ=?
Response
+CSQ: (list of supported <rssi>s), (list of supported <ber>) OK
Parameter
See execute command
Execute command
AT+CSQ
Response
TA returns received signal strength indication <rssi> and channel bit error rate <ber> from the ME.
+CSQ: <rssi>, <b er > OK
Parameter
<rssi> : 0: -113 dBm or less 1: -111 dBm 2 to 30: -109 to –53 dBm 31: -51dBm or greater 99: not known or not detectable <ber> : 0…7: as RXQUAL values in the table GSM 05.08 99: not known or not detectable
C-1
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
C.2 Network Registration Checks
AT+COPS Operator selection
Test command
AT+COPS=?
Response
TA returns a list of quadruplets, each representing an operator present in
the network. Any of the formats may be unavailable and should then be an empty field. The list of operators will be in the following order: home network, networks referenced in SIM, and other networks.
+COPS: [list of supported (<stat>), long alphanumeric <oper>,, numeric <oper>)s][,,(list of supported <mode>s), (list of supported <format>s)] OK
Parameter
See set command
Read command
AT+COPS?
Response
TA returns the current mode and the currently selected operator. If no operator is selected,<format> and <oper> are omitted.
+COPS : <mode>[, <format>[, <oper>]] OK
Parameter
See set command
Set command
AT+COPS= <mode> [, <format>[, <oper>]]
Response
TA forces an attempt to select and register the GSM network operator. If the selected operator is not available, no other operator will be selected (except <mode>=4). The selected operator name format will apply to further read command (+COPS?) also.
OK
Parameter
<stat> 0 unknown
1 operator available 0 operator current 1 operator forbidden
<mode>
0: automatic (default value) 1: manual 2: deregistration ; ME will be unregistered until <mode>=0 or 1 is selected. 3: set only <format> (for read command AT+COPS?) 4: manual / automatic (<oper> shall be present), if manual selection fails, automatic mode is entered.
<format>: format of <oper> field <format> 0: long alphanumeric format <oper> 1: short alphanumeric format <oper> 2: numeric <oper> (default value) <stat>: status of <oper>
<stat>
0: unknown 1: available 2: current 3: forbidden
<oper>: operator identifier (MCC/MNC in numeric format only for operator selection)
C-2
Appendix C. Useful Configuration Commands
AT+CREG Network registration
Test command
AT+CREG=?
Response
+CREG: list of supported <n>s OK
Parameter
See set command
Read command
AT+CREG?
Response
+CREG : <mode>, <stat> [ ,<lac>,<ci> ] for AT+CREG? Command only
Set command
AT+CREG=[<n>]
Response
TA controls the presentation of an unsolicited result code +CREG:<stat> when <n>=1 and there is a change in the ME network registration status or code +CREG:
<stat>[,<lac>,<ci>] when <n>=2 and there is a change of network cell.
OK
Parameter
<mode>
0: Disable network registration unsolicited result code (default) 1: Enable network registration code result code +CREG : <stat> 2: Enable network registration and location information unsolicited result code +CREG: <stat>,<lac>,<ci> if there is a change of network cell.
<stat>
0: not registered, ME is not currently searching for a new operator. 1: registered, home network. 2: not registered, ME currently searching for a new operator to register to. 3: registration denied. 4: unknown. 5: registered, roaming.
<lac>: string type; two byte location area code in hexadecimal format (e.g. “00C3” equals 195 in decimal). <ci>: string type; two byte cell ID in hexadecimal format.
C-3
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
C.3 PIN Configuration
AT+CPIN Enter PIN
Test command
AT+CPIN=?
Response
OK
Read command
AT+CPIN?
Response
TA returns an alphanumeric string indicating whether some password is required or not.
+CPIN: <code> OK
If error is related to ME functionality:
+CME ERROR: <err>
Parameter
<code> READY no further entry needed
SIM PIN ME is waiting for SIM PIN SIM PUK ME is waiting for SIM PUK PH_SIM PIN ME is waiting for phone to SIM card
(antitheft) PH_SIM PUK ME is waiting for SIM PUK (antitheft) SIM PIN2 PIN2, e.g. for editing the FDN book, possible
only if preceding command was
acknowledged with +CME ERROR:17 SIM PUK2 possible only if preceding command was
acknowledged with error +CME ERROR:18
Set command
AT+CPIN=<pin> [, <newpin>]
Response
TA stores a password which is necessary before it can be operated (SIM PIN, SIM PUK, PH-SIM PIN, etc.). If the PIN is entered twice, the TA will automatically repeat the PIN. If no PIN request is pending, no action is taken and an error message, +CME ERROR is returned to TE.
If the PIN required is SIM PUK or SIM PUK2, the second PIN is required. This second PIN, <newpin>, is used to replace the old PIN in the SIM.
OK
If error is related to ME functionality:
+CME ERROR: <err>
Parameter
<pin> password (string type) does not need any
quotes. e.g. AT+CPIN=9515
<new pin> if the PIN required is SIM PUK or SIM PUK2:
new password
C.4 Changing the operating frequency between
EU/Rest of world and US wavebands
In Europe and much of the rest of the world GSM communications happens either in the 900 or 1800 MHz band (che ck with your local service provider). In the US and some other countries the 850/1900 MHz bands are used. To switch to alternative bands the modem must be connected to a PC and a command issued to change the setup.
C-4
Appendix C. Useful Configuration Commands
To switch between EU/US band(s) for the COM110, use a communication software such as a HyperTerminal, then enter
AT+WMBS=<band>,0
command. The table below gives the commands for various band(s) selection:
AT+WMBS Band Selection
AT+WMBS=0,0
Select mono band mode 850MHz.
AT+WMBS=1,0
Select mono band mode extended 900MHz
AT+WMBS=2,0
Select mono band mode 1800MHz
AT+WMBS=3,0
Select mono band mode 1900MHz
AT+WMBS=4,0
Select dual band mode 850/1900MHz
AT+WMBS=5,0
Select dual band mode extended 900MHz/1800MHz*
AT+WMBS=6,0
Select dual band mode extended 900MHz/1900MHz
*The default setting in Europ e.
After issuing the command the COM110 module will have to be reset, by power cycling the module to change to the new specified band(s). The setting is stored in non-volatile memory automatically.
To check the Band(s) Selection
To check the band selection for the COM110 Supreme, use a communication software such as HyperTerminal, then enter
AT+WMBS? command.
The table below gives the main responses returned:
AT+WMBS Resp onses
+WMBS: 0,x Mono band mode 850MHz is selected
+WMBS: 1,x Mono band mode extended 900MHz is selected
+WMBS: 2,x Mono band mode 1800MHz is selected
+WMBS: 3,x Mono band mode 1900MHz is selected
+WMBS: 4,x Dual band mode 850/1900MHz are selected
+WMBS: 5,x Dual band mode extended 900MHz/1800MHz are selected
+WMBS: 6,x Dual band mode extended 900MHz/1900MHz are selected
C-5
Appendix D. Using the COM110 in Transparent Mode for GSM Dial-up use
It is possible to use the COM110 in transparent mode, when the default non-transparent (RLP) mode is not supported by the cellular phone network or is incompatible with the COM110.
D.1 Introduction
The COM110 software includes an advanced error correction protocol known as RLP, which is specially designed for RF links. This protocol is now used in one form or another by most GSM data units but the COM110 implementation of R LP may not be compatible with all GSM networks and some networks do not support this mode at all.
If you find tha t the COM110 does not work on the network and suspect that it may be due to the RLP protocol, you must check carefully wit h your own net work provider to see if the COM110 implementation of the protocol is known to work correctly on their network.
The transparent mode relies on Loggernet/PC400W to correct any communication errors. On poor quality lines the PC software will often drop the call and redial when it sees a certain level of errors. (The non-transparent mode is less prone to doing this.) For successful and fast communication a signal strength (as reported by AT+ C S Q – see Appendix C) of 18 or above is recommended for transparent mode. The non-transparent mod e will operate at signal levels down to as low as
10.
D.2 Disabling the RLP Protocol
If you wish to use the COM110 in transparent mode, do the following:
1. Get your SIM card in the COM110 enabled for transparent mode. In some
cases you may have to call your airtime provider to do this, (e.g. UK Cellnet where you will be allocated a new number for this mode) while others (such as UK Vodafone) need no configuration on the network and will switch automatically depending on the COM110 configuration.
2. Re-enter the setup stri ng as shown in Secti on 5.3 of this manua l, but also enter
the AT+CBST command as AT+CBST=7,0,0 (where the last digit, 0, switches the unit to transparent mode).
3. Save the settings using the AT&W command as normal.
NOTE
D-1
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
D-2
Appendix E. Resetting the COM110 Module under Program Control
This Appendix describes how the datalogger can be used to send commands to the COM110 to reset the module and also enable the lowest power mode which still allows incoming calls.
E.1 Principle of Control
To reset the COM110 and change its mode of operation it can be sent commands by the datalogger by embedding commands within a datalogger program. The commands are identical to those that could be typed into a terminal emulator.
To reset the modem the command AT+CFUN=1<CR> is sent. This attempts to disconnect the modem from the network, fully resets the GSM module to a power up state and then reconnects it to the network. This entire process can take up to 30 seconds, although the module will accept non-network related commands within a few seconds of receiving the reset command.
In addition the example below turn s o ff the automatic resetting mode, which negates a setting used, in the past by CS, with some older modules that reset the modem every 24 hours. (That mode is not now recommended by many networks as it does not cleanly log off the network.) Clearly if the logger is controlling the reset process the automatic process is redundant.
E.2 CRBasic Program Example
This example can be used on the CR800 series, CR1000 and CR3000 dataloggers. It uses the standard CRBasic serialopen, serialout and serialclose commands to send out con figuration comma nds to the modem. T he example shows using a slow sequence to reset the modem every 12 hours, using the command AT+CFUN=1.
'CR1000 Series Datalogger 'Example program showing how to regularly reset the GSM modem 'The modem control is done in a slow sequence to avoid interference with measurements
'Declare Public Variables 'Example: Public PTemp, batt_volt
'Main Program BeginProg 'Normal measurements in the main scan here Scan (1,Sec,0,0) PanelTemp (PTemp,250) Battery (Batt_volt)
'......etc
NextScan
'-------------------------------------------------------------------
'Modem control slow sequence - can be cut and pasted as self-contained
'Set this constant to match the port the modem is connected to Const Modemport=COMRS232 Const Modembaud = 115200 'Change to match modem baud rate
E-1
CS-GSM Digital Transceiver Kits (including the COM110 modem)
SlowSequence 'Run once a minute so can have one minute resolution of timing Scan (1,Min,3,0) 'Every 12 hours, in this example and only if we are not communicating If TimeIntoInterval (0,12,hr) AND (NOT status.commactiveRS232) Then SerialOpen (Modemport,Modembaud,0,0,100) 'First send the +++ sequence to get the modem in command mode SerialOut (Modemport,"+++","OK"+CHR(13),1,150) 'Send the command to reset the modem the connection wait up to 5 sec SerialOut (Modemport,"AT+CFUN=1"+CHR(13),"OK"+CHR(13),1,500) Delay(1,2,sec) 'Wait another 2 sec just to make sure the reset is complete SerialClose(Modemport) EndIf
NextScan '--------------------------------------------------------------------
EndProg
E.3 CR10X Program Exampl e
;{CR10X}
;Program example showing how to reset the COM110 once per ;day and also how to reset the low power mode ;Instruction 97 is used to send out the reset commands
*Table 1 Program 01: 10 Execution Interval (seconds)
;As an example includes a simple measurement and data storage ;example
1: Batt Voltage (P10) 1: 1 Loc [ Batt ]
2: If time is (P92) 1: 0 Minutes (Seconds --) into a 2: 1 Interval (same units as above) 3: 10 Set Output Flag High (Flag 0)
3: Real Time (P77) 1: 110 Day,Hour/Minute (midnight = 0000)
4: Sample (P70) 1: 1 Reps 2: 1 Loc [ Batt ]
;In this example Table 2 is only used to control sending of ;the reset commands to the attached COM110 unit
*Table 2 Program 02: 60 Execution Interval (seconds)
; At one minute to midnight set flag 8 low to force the ; module to be reset ; Note this will also happen immediately after the programmed
E-2
Appendix E. Resetting the COM110 Under Program Control
; is loaded to as flag 8 will be low then. 1: If time is (P92) 1: 1439 Minutes (Seconds --) into a 2: 1440 Interval (same units as above) 3: 28 Set Flag 8 Low
;Use P97 to send out the commands 2: Initiate Telecommunications (P97) 1: 72 Generic Modem/9600 Baud 2: 8 Disabled when User Flag 8 is High 3: 60 Seconds Call Time Limit 4: 0 Seconds Before Fast Attempts 5: 0 Fast Attempts 6: 0 Minutes Before Slow Attempts 7: 3 Failures Loc [ GSMError ] 8: 0000 Call-Back ID
;The commands below are sent blindly without ;checking the response from the modem. ;This is done for simplicity and to ensure the logger does ;not get stuck repeating instruction.
;First send the AT+CFUN=1 command to reset the module 3: Extended Parameters (P63) 1: 68 Option ; Delay to allow SC-WMI to power on 2: 10 Option ;1 second 3: 84 Option ;Transmit 4: 10 Option ;10 characters 5: 65 Option ;A 6: 84 Option ;T 7: 43 Option ;+ 8: 67 Option ;C
;Wait for 2 secs to allow the module to get in a state to ;receive further commands 4: Extended Parameters (P63) 1: 70 Option ;F 2: 85 Option ;U 3: 78 Option ;N 4: 61 Option ;= 5: 49 Option ;1 6: 13 Option ;CR 7: 68 Option ;D for delay 8: 20 Option ;2 secs to allow to start up
*Table 3 Subroutines
End Program
E-3
Appendix F. Configuring the COM110 via the datalogger
It is possible to reconfigure a GSM modem connected to a logger without the programming cable by talking through the datalogger from one communications interface to another. This works wit h the CR800 series, CR1000 or CR3000 dataloggers.
This proc ess can be generally us ed when you do not have a modem programming cable but you do have a cable or interface to talk to the datalogger via one interface and the modem is plug ged into another. The possible configurations include a PC connected to the RS232 port and the modem via an SC-WMI or the PC connected to the CS I/O port (via an SC32B or SC-USB) and the modem connected to the RS232 port. (This procedure can work when the modem is connected via an SC105, but that is not normally necessary as the cable for connecting an SC105 and modem can also be used directly as a modem programming cable.)
To allow you to talk to the modem via the d a ta logger follow this procedure (amending t he connection details to suit your configuration).
1. Connect the modem to the logger via the relevant interface and
communications port, e.g. the SC-WMI and CS I/O port.
2. Power up the modem and logger.
3. Connect the logger to the PC, e.g. via the RS232 port, and start
communicating with it using t he Device Configura tion program (use the latest version from www.campbellsci.com/downloads
). Select the correct PC
COM port you intend to use and the baud rate and press connect.
4. First to turn off any P PP function in the logger, using the PPP tab (only
needed if it was setup for GPRS use). Set the PPP port to inactive.
5. Then under the Comport settings check the serial port to which the modem is
connected is set to a baud rate which matches the setup of the modem (it is not necessary to do this to receive calls normally but is best to do if trying to make outgoi ng calls or to confi gure the modem). CS normall y set the baud rate to 9600 for GSM use, 9600 or 115200 for GPRS use. Make sure to click the Apply button after making a change and then reconnect to the logger.
6. Then click on the Terminal tab .
7. Press enter a few times and you should get a prompt “CR1000>” (CR800 or
CR3000 is shown for those loggers).
8. Then press P and enter (you need to do this within 3 seconds of receiving the
prompt as there is a fast timeout). If you miss this repeat step (7).
9. Then, in response to the list of com port addresses, enter 2 for ComME (for
the SC-WMI) or the relevant entry to suit the com port to which the modem is connected.
10. Then enter a timeout of say 300 (seconds), press enter after each entry.
F-1
CS-GSM/GPRS Digital Transceiver Kits (including the COM110 modem)
11. The logger should then report “opening 2” (in the case of ComME), which
means you now have a “talk through” path to the modem, i.e. it should respond as if connected directly to the PC.
12. If the modem is being use for GPRS use and particularly if the modem is set
to use its own TCP/IP stack it will be necessary to get it back into command mode, by sending “+++” then waiting for a response, normally OK.
13. Then to check it is responding normally send “ATZ” and press enter, the
modem at a minimum should respond “0” or “OK”, unless it has been configured at the wrong baud rate or all responses have been turned off.
14. If there is no response at all, please consider the baud rate may not be set as
expected, so press ESC a few times to quit the talk through session, back out and return to step (5) above to change the baud rate of the logger serial port, then try agai n.
15. Once a valid response is received, enter the configuration command you nee d
to change as normal, remembe ring to save the setting to non-volatile memory if required (AT&W).
16. When completed press “ESC” three times to quit the talk-through mode.
F-2
CAMPBELL SCIENTIFIC COMPANIES
Campbell Scientific, Inc. (CSI)
815 West 1800 North
Logan, Utah 84321 UNITED STATES
www.campbellsci.com
Campbell Scientific Africa Pty. Ltd. (CSAf)
Somerset West 7129
www.csafrica.co.za
Campbell Scientific Australia Pty. Ltd. (CSA)
QLD 4814 AUSTRALIA
www.campbellsci.com.au
Campbell Scientific do Brazil Ltda. (CSB)
Rua Luisa Crapsi Orsi, 15 Butantã
CEP: 005543-000 São Paulo SP BRAZIL
www.campbellsci.com.br
Campbell Scientific Canada Corp. (CSC)
11564 - 149th Street NW
Edmonton, Alberta T5M 1W7
www.campbellsci.ca
Campbell Scientific Centro Caribe S.A. (CSCC)
300N Cementerio, Edificio Breller
Santo Domingo, Heredia 40305
www.campbellsci.cc info@campbellsci.cc
Campbell Scientific Ltd. (CSL)
Shepshed, Loughborough LE12 9GX
UNITED KINGDOM
www.campbellsci.co.uk
Campbell Scientific Ltd. (France)
3 Avenue de la Division Leclerc
www.campbellsci.fr
Campbell Scientific Spain, S. L.
Avda. Pompeu Fabra 7-9
Local 1 - 08024 BARCELONA
www.campbellsci.es
Campbell Scientific Ltd. (Germany)
Fahrenheitstrasse13, D-28359 Bremen
www.campbellsci.de
Please visit www.campbellsci.com to obtain contact information for your local US or International representative.
info@campbellsci.com
PO Box 2450
SOUTH AFRICA
sales@csafrica.co.za
PO Box 8108
Garbutt Post Shop
info@campbellsci.com.au
suporte@campbellsci.com.br
CANADA
dataloggers@campbellsci.ca
COSTA RICA
Campbell Park
80 Hathern Road
sales@campbellsci.co.uk
92160 ANTONY
FRANCE
info@campbellsci.fr
SPAIN
info@campbellsci.es
GERMANY
info@campbellsci.de
Loading...