Posts Tagged “gprs”

The following is a useful example of how to easily read RTU Modbus devices via GPRS. There are two ways to complete this task using the GPRS modem MTX65i + MTXTunnel.

The first and classic way is to use the MTX65i + MTXTunnel as a GPRS-serial gateway. This means that when you try to get a reading from a Modbus device, the server connects to the MTX modem’s IP and sends Modbus frames directly to the computer. The frames are read through the MTX modem which acts as a GPRS-serial gateway.

The second way, that I will discuss today, is more suitable when large quantities of computers are involved. Basically, a new feature from the new version of the MTXTunnel v7.14 is used. This new function allows the autonomous reading of Modbus devices connected to your serial port and it also forwards these readings on to the Web Server via JSON object.

modbus

This is the scenario:

  • We have a PLC Modbus RTU. The PLC has a number of readings/records in its internal memory (e.g. a temperature and three meters) which must be periodically read and sent to a Web Server.
  • Every 15 minutes, the MTXTunnel must obtain these readings from the PLC and it does this via the serial port. Record number 20 is the temperature reading while records 21, 22 and 23 are the respective meters.
  • After taking each reading, the MTXTunnel needs to send the values to a Web Server via HTTP GET using a JSON object. However in case there is a GPRS communication failure, it has to be able to store up to 1500 readings in its flash memory so that it can send them as soon as communication is restored.
  • You need to be able to access the MTXTunnel at any time in order to be able to read real-time PLC records as well as being able to write in them and modify PLC configuration records. To resolve this, set the MTXTunnel up like this:

config

Some details from this example to take into account:

  1. This example uses an MTX65i with Modbus RS232 PLC communication, but it could work with an RS485 as well. Therefore you could use the MTX65IND2 model (with built-in RS485 communication).
  2. The following is a summary of this example:
    The modem periodically reads (every 15 minutes) a series of Modbus readings from the PLC and sends them via JSON object to a Web server (to the URL specified in the LOGGER_server parameter). If you can’t send the reading (due to no GPRS network coverage or if the server is down), it stores the data to memory in order to send it later. With Telnet it’s possible to connect to the device directly so you can consult/change the PLC’s records in real time. For this you need to search for the following commands in this manual: AT^MTXTunnel=getmodbus y AT^MTXTUNNEL=setmodbus
  3. The JSON object, that is sent to the specific URL in the LOGGER_server parameter, is encoded in the following way as an example:
    {“IMEI”:353234028103206,”P”:”ID00001″,”A”:1,”TS”:”20/08/12 08:31:44″,”V1″:23,”V2″:275,”V3″:274,”V4″:32765}
    This means that the Web Server receives a JSON object with the modem’s IMEI (IMEI), the password field (P) that we can also use to identify the computer if we don’t want to use the IMEI, the device’s Modbus address (A), the time stamp (TS) which is when the Modbus data was read and V1, V2,… along with every single one of the readings taken.

It’s that easy!!!

Tags: ,

Comments No Comments »

It has been a long time since I last wrote in blogElectronica, therefore I have quite a lot of new things in the pipeline. Some are very, very interesting, especially regarding 3G devices with Java, which I will discuss soon. ;)

However today I will discuss a new GSM/GPRS terminal from the MTX family. Certainly, more than one of you will find it interesting, especially as you are able to save costs involved in some scenarios where you use an MTX65i + RS232-RS485 converter. This is the new MTX65i-RS485 terminal.

What features does it have?

Well, basically they are more or less the same as the well-known, widely used MTX65 but there are some slight differences.  Here are the main features:

  1. GSM / GPRS Class 12 modem
  2. Java programmable, 1.7MB Flash, 400KB Ram (optional 8MB Flash and 2MB Ram available)
  3. 1 RS485 port with terminal block
  4. 1 RS232 port
    modem-gsm-gprs-rs485
  5. 1 USB port
  6. 2 analog/digital convertors
  7. 2 opto-isolated digital inputs
  8. 2 opto-isolated digital outputs
  9. 1 general purpose digital input/output
  10. 1 pulse counter input (up to 1kHZ)
  11. 1 I2C bus

As you can see, the main difference/feature is that the RS485 port is built into the modem; it is different from the MTX65i as it has a higher number of opto-isolated inputs and outputs.

Another important difference is the modem’s ability to turn itself off. If you remember, one of the main properties of the MTX65i GPRS modem is that it’s designed to never, ever be turned off under any circumstances. It always needs to be switched on. This gives you extra security like when modems are installed in rural environments and any in-person interaction with the modem would be traumatic. In this case, this option also ensures that the modem won’t fail you. However if you wish you can also get the modem to turn itself off voluntarily with a special input in the power connector.

 

Can you use this GSM/GPRS modem with MTXTunnel software?

Of course, ever since the MTXTunnel version 7.6 was created, you can use it no problem. I will talk about it on here again to discuss is at a later date.

 

Conclusions

If up until now you are using the MTX65i along with an RS485 converter, you could save on the converter, installation time and physical space with the new MTX65i-RS485 modem. This is a brief conclusion, I will add more later on. I will take this opportunity to wish everyone a happy start to 2013!!!

 

Tags: , , ,

Comments 1 Comment »

Today I am going to post a short video about  Multitech routers.

Personally I find these routers (any version: GPRS, HSDPA) very attractive in both performance and robustness as well as being good value for money.  It’s rare, very rare, that a Multitech router malfunctions. In fact I don’t remember anyone returning the product for this reason, as I say they are extremely robust. But it’s not rare for users to have some trouble when using DNAT for port mapping (this is the only thing I don’t like about these devices). It’s not that it doesn’t work as the DNAT works amazingly, it’s the fact that the way of doing it is a little different from what you could be accustomed to when using other types of routers.

Well there you go, here’s a short video that shows you how to make a DNAT.

multitech

Tags: ,

Comments No Comments »

Good afternoon. A few days ago I posted about a new Multitech device which I was testing that turned out to be very interesting. Today I’m going to continue talking a little bit about Multitech which is perhaps not a very well-known company, but it has always seemed interesting to me especially for a specific application profile.

It’s a family of products with an architecture that Multitech call “Universal Socket”. In short, as the name suggests it’s about a family of communication modules that all have the pin-out in common i.e. if we create a device with PCB designed for use with one of these “Universal Socket” modules, we can interchangeably “click-in” any of these modules.

What types of modules are in this family?

Well there are a total of 10 modules. On one side we have GSM/GPRS/HSDPA communication modules such as SocketModem iCellSocketModem CellSocketModem HSDPA (note is has a Cinterion HC25),  SocketModem EDGE and SocketModem GPRS.

multitech

On the other side we have analog communication modems like SocketModem and SocketModemIP.

Finally we have modules that are suitable for other types of communication like SocketEthernet IP (a module which is basically as Serie/Ethernet convertor), SocketWireless Bluetooth (A Bluetooth -serial module i.e. with SPP Bluetooth profile, class 1 (100m range) and  socketWireless Wifi (a wifi-serial gateway for 802.11b/g networks).

So if I design a device for one of these modules, if one day I want to equip my device with GPRS connectivity, Bluetooth, Ethernet or Wi-Fi etc. for a project, would I only have to swap one module for another?

Yes that’s it.

But would I have to make a lot of software changes?

No. The modules have a common serial communication and configuration interface. All multisocket devices are configured through AT commands and some of them (those that provide IP connectivity) have what they call “Universal IP” in Multitech, a common TCP/IP stack i.e. you only need to create a single host software to control each of the modules, whether it’s a GPRS module, HSDPA, Wi-Fi, Ethernet etc.

Very interesting, the best thing I can do from now on is design my devices with one of these modules.

No. Look at the photo of the “Multisocket HSDPA” module in this post, as I said before is put together with a HC25 Cinterion module. What would be cheaper to use, the Multitech module or just the HC25 module? Well obviously it’s cheaper to just use the HC25 module. The same thing happens with “SocketWireless Bluetooth”, it’s cheaper to use a Bluegiga WT11 module than one of these modules. This means that it will depend on the connectivity features that you need for a particular application.

 So when do you recommend to use this type of module?

From my point of view, and as I said from the beginning, they are very interesting but only designed for devices when we want to provide various connectivity possibilities without needing to redesign hardware and with minimal or no software changes (which really saves time designing and improves “time to market”).

 I hope that you find these modules interesting for an application. Until next time. 

 

 

Tags: , , , , ,

Comments 1 Comment »

The new MTXTunnel v5.0 is now available.

After a fairly long period of time it’s finally finished. The new version has a lot of changes compared to the previous version MTXTunnel v4.0 (to give you an idea the manual used to have 20 pages and now has 210 pages). A lot of the features have been suggested by people who currently use MTXTunnel v4.0 or previous versions, and I have included these suggestions in this new version. Things like being able to control 2 devices with a single MTX65i modem (one for each serial port), being able to use it in ultra low power scenarios, UDP/TCP communications, SSL security, DynDNS, embedded Webserver, Telnet, sending telemetries (GPIOs and ADCs…), sending GPS position etc. All of these things are included in the new version; I think that it’s quite complete.

As I said, the manual is quite extensive but I have added about 30 configuration examples for different scenarios. That way the majority of users find an example that relates to what they want to do or modify slightly, depending on their requirements. This means that you don’t have to read the entire manual.

Normally I add FAQs in the manuals to try answer any questions that may arise. The FAQs that are in the new MTXTunnel v5.0 manual are shown below. I hope you find them interesting. As always, if you have any suggestions let me know. If they are interesting they won’t fall on deaf ears, they will be included in later versions just like I have done with previous suggestions in this new version.

Here are the FAQs, they are quite long but they summarize all of the main, new things that you can do with your device. If you have five minutes to read them, you will see that MTXTunnel v5.0 can be useful in many future applications.

What is MTXTunnel?

MTXTunnel v5.0 is a software application that can be pre-installed by  Matrix (if requested) in one of the following MTX modems (MTX65i, MTX65IND, MTX65ULP y MTX65+G).

mtxtunnel5

What is MTXTunnel used for?

The MTXTunnel can be mainly used to create a transparent Gateway (or tunnel) from the SerialPort to the GPRS. If you already have a machine or device with a serial port, you could read/control it in the same way as if it were physically connected to your computer.

 

This is the scenario: serial equipment connected to a PC to read/write …

cable-serie

NOW with GPRS-Serial MTXTunnel gateway, the above scenario is showed in the following example. Now your PC has to establish a TCP/IP connection with MTXTunnel. Then, EVERYTHING you send to this TCP/IP connection will be sent to the equipment’s serial port by MTXTunnel. On the contrary, all of the information in the equipment’s serial port is sent to your server using the GPRS network.

pasarela-serie-gprs1

Is MTXTunnel needed at the PC server’s side?

It depends, but in general, it is not needed at the PC server’s side 99% of the time.

Not needed: If you already have your PC control software and already have the option to connect as TCP/IP or UDP, a modem with MTXTunnel is not needed. Just configure the IP and port of remote MTXTunnel and your PC will use the ready internet connection to send and receive data remotely.

Not needed: If your PC control software does not have the option of connecting using TCP/IP or UDP and the only option you have is to choose a COM port, the MTXTunnel+modem is also not needed. There are some freeware drivers for your operating system as Windows can emulate a COM port. Once this free driver is installed, a virtual COM (like COM100) will be installed in your PC and you must point to the IP and TCP port of the MTXTunnel remote. You must choose this virtual COM in your PC software. Please contact Matrix for more information about recommended virtual serial drivers.

Needed: If you need a “serial cable replacer” because for example you have to communicate 2 RS232 serial devices remotely and there is no intelligence or PC control software (you cannot install virtual COM port), you will need 2 MTXTunnels, one in each end. This is an example of this scenario:

cable-serie-replacer1

Who starts the connection?

MTXTunnel has the following modes TCP Server, TCP Client and UDP.

  • TCP Server mode. MTXTunnel is waiting for incoming connections. This is to say that the remote device (PC server) will start and establish the GRPS-Serial Gateway.
  • TCP Client mode. MTXTunnel will start the Gateway. It will connect to the configured IP + port of the server PC AND establish the GRPS-Serial Gateway automatically.
  • UDP mode. UDP is not oriented to connection protocol. MTXTunnel just waits for UDP packet and sends them to the serial port and vice versa. The data present at serial port is sent to a PC via UDP.

 

It is mandatory to be permanently connected to GPRS when already configured as TCP Server, TCP Client or UDP?

No. It’s not. If your application requires it to do so, MTXTunnel can be GPRS connected 100% of the time. Remember that network operators will bill the data volume, not time.

If you do not need MTXTunnel to be connected 100% of the time and you want the connection to be sporadic, MTXTunnel can be activated in these situations:

1. – Missed call from authorized phone number.

2. – Incoming SMS including the word “on” from an authorized phone number.

3. – By activating a digital input in MTXTunnel.

4. – When an analog input value is out of range.

5. – Depending on programmed date/hour (up to ten).

6. – When there is serial data (only TCP Server mode).

So… how long is MTXTunnel active for (GPRS connected)?

It’s configurable by the GPRS_timeout parameter. You can specify the time in minutes after which, if it doesn’t detect traffic at GPRS connection, MTXTunnel will close the session.

 

I want to use MTXTunnel as TCP Server so I can connect to them periodically from my PC. Will I need SIMs with IP fixed provisioned?

It is not mandatory. You have various ways to find out the remote IP if using normal dynamic IP addressing SIMs. You can either make a missed call or send an SMS with the word “on” to remote MTXTunnel equipments. MTXTunnel will reply with an SMS including the IP obtained at this moment in time.

ip-dinamica-sms1

New MTXTunnel V5.0 is DynDNS featured. DynDNS is a service allowing you to associate DNS name (like modem1.dyndns.org) to the IP obtained by MTXTunnel. For now, you can use this for free:  www.dyndns.org .

I found that in my case I’m going to use thousands of MTXTunnel devices. I cannot use missed calls or SMSs to work out IP addresses. I do not want to use DynDNS as it can be difficult to handle and even costly. What can I do?

The MTXTunnel will inform the server PC every time an IP address changes.  

You just need to enable a configuration parameter so each time MTXTunnel changes the IP it will send frame data to a server PC with the following information: IMEI, the newly obtained IP obtained and an optional user-configurable text.

rs232-gprs-dyndns1

Is it possible to send the new IP to a Web server? I’m more familiar with Web programming –ASP, PHP- rather than TCP-IP sockets. I’m thinking about using a Data Base. Is this possible?

Yes, it is. If you prefer, it’s possible for MTXTunnel to send the newly obtained IP address to a Web Server using http GET (URL + parameters).

MTXTunnel can be installed on several Cinterion-based modem terminals like MTX65i, MTX65IND, MTX65ULP y MTX65+G.  What are the differences between them? 

For main applications, the MTX65i is suitable.

If you need RS485 serial communication, remote activation of relays, or to be able to remotely read 4-20mA, the recommended modem is MTX65IND.

If power consumption is critical, use the MTX65ULP modem as it can be completely powered-off (consumption is around 2uA) except in the configured situations.

If you need some extra features like GPS positioning, you should choose the MTX-65+G.

You are talking about relays, analog inputs…  Is MTXTunnel not a Serial-GPRS Gateway?

At the same time, MTXTunnel is a serial-GPRS Gateway and can also control digital input/outputs, analog inputs, relays, GPS receiver, devices connected to SPI/I2C…

Example:

-MTXTunnel can remotely read a digital input or change a digital output.

-MTXTunnel can send (X seconds configurable) the GPS positioning to a PC or Web Server and can remotely read a sensor connected to SPI/I2C. MTXTunnel can automatically send, every X configured seconds, the status of all input/outputs or GPS position to a server PC or WebServer. SMS messages can also be used.

So for example, could I control the relay from the PC in my office by sending an AT command through a TCP/IP connection?

Yes but as well as sending an AT command via TCP/IP connection, there are other ways. You can also send them through the modem’s serial port or via SMS. You can also switch a relay or read an MTXTunnel digital/analog input status from your own web page (look at the API manual in this manual for annex example scenarios).

So, using MTX-IND, I can activate a relay using a SMS, but… it’s not practical because the AT command is not intuitive or easy to remember.

You do not have to send the exact AT command. This means that the SMS text does NOT have to be “AT^SSIO=0, 0” to activate Relay #1. You can configure it and use ALIAS text.

Example: “RELE1ON” is the text of the SMS to activate GPIO0 (Relay #1). MTXTunnel will interpret it to AT^SSIO=0, 0.

You can create up to 10 different ALIAS text strings.

MTX65i, MTX65IND and MTX65ULP modem terminals have 2 serial ports. Could I control 2 external devices with one terminal? 

Yes, you can.  MTXTunnel can control 2 RS232 external devices with just one SIM card. MTXTunnel will run 2 serial-GPRS running in parallel.

Just remember that the MTX65i and the MTX65ULP secondary port cannot use flow control because the do not have the CTS and RTS lines; they only have the TX and RX lines.

 

gprs-serie-2-dispositivos1

What about MTXTunnel installed on MTX65+G which has a GPS receiver inside? Can I use it for fleet management? 

It’s not intended for professional fleet management. MTXTunnel reads the GPS positioning using some of the MTXTunnel GSM/GPRS services: IP tunnel, WebServer, Telnet or SMS.

MTXTunnel can be configured to automatically send the GPS position every X seconds. However, MTXTunnel does not internally store the position in the Flash memory. This is a typical application if GPRS coverage is lost. So, this is for basic fleet management as professional ones normally stores position points like a data logger.

There is another version of MTXTunnel intended for professional track & trace using the MTX-65+G device. This version is called the MTXTunnel-GPS and has another license price, configuration parameters and also the general functionality is different. Please ask gsmsupport@matrix.es for more information.

What is WebServer used for?

MTXTunnel WebServer which is included can be used to read the digital input/outputs or analog inputs and to change digital outputs easily in a PC (connected to internet) using a common internet browser.

Not only this, you can see and modify the MTXTunnel remotely. Also you can execute AT remote commands, like network coverage (AT+CSQ), check incoming SMS…

What is Telnet used for? 

You can basically do the same with the Telnet service in MTXTunnel as you can with WebServer but it’s more common used for third party application integration. Please read TELNET and API section.

I’m worried about unauthorized access using WebServer or Telnet.

MTXTunnel has an internal firewall which can be activated. Then MTXTunnel will only accept connections from previously configured IP addresses. Any other IP addresses will be blocked.

For maintenance purposes, I would like access to MTXTunnel at any time and in any location, from any IP address.

In this case Firewall WebServer must be disabled, but we recommend protecting WebServer with a Login and Password. MTXTunnel can work with our without a Login/Password (public WebServer). The same applies for Telnet.

Could I or somebody else receive an SMS when an input changes, like alarm detection?

You can configure MTXTunnel to send special and configured SMS text strings up to 10 configured different phone numbers.

SMS text can be configured in different text strings related with digital or analog input.

MTXTunnel 5.0 is a GRPS-Serial tunnel Gateway. What is a GRPS-I2C, GPRS-SPI, HTTP-Serial or SMS-Serial tunnel? Do you have some examples?

Examples.

GPRS-I2C Tunnel: You can read an I2C sensor remotely like a temperature sensor.

GPRS-SPI Tunnel: For example you can write data on SPI bus and if a display is connected to it, the data will be on display.

HTTP-Serial Tunnel: Example. You have a Web page with a form. All filled form data can be sent to serial port MTXTunnel connected device. Then MTXTunnel will collect the machine response and send the data as a web response to your Web page.

SMS-Serial Tunnel:  Example. You can define a special text like “MTX” at the beginning of the SMS string. The text after this special string will be redirected to the serial port of the machine. MTXTunnel can get the response from the machine and send another SMS to the user. Example: “MTX 12345”: MTXTunnel will send “12345” string to the serial port and will get a response from the machine like “67890”, which will be sent as SMS.

I need a low power application MTX65ULP terminal modem. What can MTXTunnel do?

The MTX65ULP is normally switched off completely. This way the power consumption is about 2 uA. The modem is off and cannot do anything. It cannot receive calls, SMSs or communicate at all. Therefore an event needs to happen.

This event is similar to an interruption. A digital input level change or an alarm can wake up the modem.

As an example, MTXTunnel will wake up every 24 hours; send the telemetry (all the inputs values, RS232 …) and after 5 minutes of being awake, the terminal will be automatically switched off. You can control or configure the wake up time and the sleep time period.

Is it also possible to define scheduled wake up tasks. For example, MTX65ULP can wake up X minutes every day at 10.00 AM or only on the 1st and 15th days of the current month at 08.00am and 08.00 pm.

Keep in mind that the MTX65ULP is the ideal solution for remote water counter metering where there is no external power so it needs batteries to run for a long time (7 years…).

If MTXTunnel can be woken up in a configured time, does this mean that there is clock inside?  But you can also say that it’s powered off. Please explain.

MTX65ULP has own Real Time Clock independent to TC65 RTC and is always powered from external power, but it also has own battery source. This RTC allows to the modem wake up at configured-scheduled time/date.

Can this timing be synchronized?

All RTCs have some deviations. So, MTXTunnel V7 can use network timing synchronization. This feature is mandatory to use with the MTX65ULP. This way, every time MTXTunnel is connected to GPRS, it is linked to a timing server and can update the internal timing.

gprs-sincronizacion-horaria1

MTXTunnel used on the MTX65ULP wakes up at configured day/hour for some time (x minutes). Will the GPRS-Serial Gateway be active at this time?

During wake-up time, the modem will start and will run all configured services (WebServer, Telnet, Input/output telemetries…) as well as the serial tunnel gateway.

What about SSL security? How does it work?

Some applications need some encryption data transmission. SSL is used. This way the data is transmitted and received SSL encrypted, avoiding data recovering sniffer. SSK is only available in TCP client mode. Be sure than your server can support SSL sockets in the following specifications:

Nevertheless, we recommend SSL encryption if it is mandatory due to the bigger amount of data volume and the reduction in data speed transfer.

What does “API” feature mean?

API is mainly a way to integrate MTXTunnel in end user application. Basically it’s like a special AT commands end user. It can easily integrate in a web page and for example can also switch a relay (change an Output).

API could also be used to remotely access MTX configuration and send AT commands at the same time without knowing all of the configuration parameter syntax.

The new MTXTunnelv5.0 has many options… How do you configure a specific scenario?

The new MTXTunnel V5.0 has a lot of configuration parameters, more than explained in the FAQ section. Take a look in the configuration section.

Next you can find step-by-step MTXTunnel examples of first configuration scenarios; they are very useful for you for first hand-on.

In the Annex there are lots of examples of scenarios with the appropriate configuration to get MTXTunnel working. Try to find the closest scenario to you and review the copy & paste selected configuration, it’s nothing more special than that.

If you have specific questions contact the support line gsmsupport@matrix.es.

And that’s it. If you have read this far I would like to thank you J If you have any questions you can leave a comment in the forum forum I will gladly help you. You could also send me an email to jose@blogelectronica.com and my work email address is jgallego@matrix.es

I hope it’s been interesting, see you next time. 

Tags: , , , ,

Comments 4 Comments »

I have wanted to write a post about this for quite a while in case somebody would find it useful. It’s about providing Bluetooth connectivity to our Siemens TC65 or MTX65 modems. To do this, by way of example I will describe how to make a Bluetooth-GPRS gateway. At first glance, this type of gateway may not seem useful but as I say by way of example I will give you some ideas. Maybe it makes sense in other applications. For example let’s imagine a project where we want to have Bluetooth connectivity with a machine controlled by an MTX65 that has an embedded Java program. For example with Bluetooth a person who has a PDA can maintain it without having to connect any cables or open any machine.

I’m going to go through it very quickly, let me know if you have any questions as I’m just going to describe how to make the application without going into too many details.

To do this I am going to use an MTX65 modem with the MTXTunnel application embedded inside and a Bluegiga WT11 Bluetooth module that I will use with its development board (the MTX65, the MTXTunnel firmware and the WT11 are all distributed by Matrix in Spain). The reason for using the WT11’s development board is because it has an RS232 port and it’s very easy to connect it to an MTX65 simply with a serial cable. Remember that the WT11 Bluetooth module is in class 1 and therefore theoretically we will have a range of about 100m. If we want a smaller range we can choose the WT12 which is a class 2 Bluetooth module that theoretically has a range of about 20m.

gateway bluetooth gprs

On the other hand I will use my amazing Fujitsu-Siemens T830 mobile with Windows Mobile :) I installed the mobile version of this onto my mobile from the well known puTTY terminal (a small program similar to a HyperTerminal).

The SPP (Serial Port Profile) must be enabled in the Bluetooth module’s configuration. All you have to do to check this is find out the SET command response which is sent to the WT11 from a PC with a HyperTerminal connected. This command shows the current settings.

If you have already enabled the SPP in the WT11 Bluetooth module and you have already configured the MTXTunnel configuration parameters (the client mode, the IP and the port the server will connect to), we can connect the WT11 Bluetooth module to MTXTunnel (through the RS232 connector in the development kit) and supply power to both. By doing this MTXTunnel will automatically connect to the IP address and the specified ports via GPRS. The WT11 will keep waiting to receive an incoming Bluetooth connection.

Now touch the phone. First, install puTTY. Once this is installed we have to pair the phone up with the WT11 via Bluetooth. With the telephone’s Bluetooth connection manager, you can find out the WT11’s Bluetooth services in which you should see the SPP (Serial Port Profile). After this is done, we will link this serial port to one of the phone’s virtual COMs.

Terminal pocketPutty

Now launch the puTTY application and open the COM that is associated to the SPP profile that we linked up earlier. When you are opening the COM with the puTTY, what you are really doing is connecting to the WT12 via Bluetooth. Once the COM is open (i.e. the Bluetooth connection is established), everything that is sent through the terminal (puTTY) from the phone to the WT12 is via Bluetooth. The WT12 then sends it through the (development board’s) serial port to the MTX65 (remember that both are linked by a serial cable). Then the MTX65 sends it to the IP address and the previously specified port via GPRS i.e. we have a Bluetooth-GPRS gateway.

I hope that this has been interesting for some of you, as you can see incorporating Bluetooth connectivity into Bluegiga modules or Siemens/Cinterion modems is really simple. See you next time. ;)  

Tags: , , ,

Comments No Comments »

As I said yesterday, today I’m going to present a new product that Matrix is going to distribute soon. It’s a firmware, only 7 Euros, for the MTX65 GPRS modem that we have already talked about (and of course we are going to keep talking about) in this blog. This firmware + the MTX65 GPRS modem are called MTX-Tunnel.

Basically MTX-Tunnel is a GPRS-serial gateway designed for remote maintenance application this means that you can avoid moving by simply connecting an RS232 serial cable to a device. It’s also designed to provide a GPRS connection to those devices that only have an RS232 serial port (e.g. meters, temperature sensors etc.).

There are other solutions, I’ve already told you about some on here like some Digi routers but the MTX-Tunnel has certain advantages in both performance and price that I will tell you about soon.

MTX-tunnel

To be honest I have to say that this device is special to me, as I have quite involved with the firmware that goes inside the MTX65 and altogether they make the MTX-Tunnel.

That said, for those of you who are interested I’ll put more information on here like I usually do. You already know the question/answer routine.

What is the MTX-Tunnel device used for? 

The MTX-Tunnel is basically a GPRS-serial gateway that allows you to connect to an office with any device that has an RS232 serial port without moving via GPRS. You could do the same thing connecting an RS232 serial cable to the device; you can do it remotely via GPRS with MTX-Tunnel.

Is it complicated to set up?

In all, it is very simple. Basically you have to edit a file with notepad to configure certain parameters (IP, port, baud rate etc.). Once configured, simply drag the file inside the modem as if it were a pen drive. The MTX-Tunnel is then configured.

How does it work? Is it the MTX-Tunnel who connects to the central server in the office via GPRS or does it wait for incoming connections? In other words, does it act as a TCP/IP client or server?

It can be configured to work in two ways.

If MTX-Tunnel is configured to work in client mode, when you power it up it automatically connects to a server i.e. to a certain IP and port (specified in the configuration file). Once the connection is established with the server, all the data that comes from the server through the TCP/IP socket via GPRS is sent out through the serial port and vice versa. All of the data that enters through the serial port is sent towards the server through the socket via GPRS.

In server mode the MTX-Tunnel is connected to the GPRS and is stays listening through a certain port waiting to receive an external connection. Upon receiving the connection it behaves the same as in the previous case. When it comes via GPRS it is sent out through the RS232 serial port and vice versa.

Does MTX-Tunnel have to have a SIM card with a fixed IP address in client mode? 

No, not in this mode seeing as the MTX-Tunnel initiates the connection you don’t need to have a fixed IP. The server that is connects to has to have a fixed IP address, if it doesn’t you need to get an office router with DynDNS so that a DNS type yourOffice.yourDomain can tell you your company’s IP address.

And if it’s in server mode does it have to have a fixed IP address? 

It’s recommended but it’s not essential. If you have a SIM card with a fixed IP address it’s very quick to make a connection. If you don’t the IP you should work out the IP address assigned by the operator (Movistar, Vodafone etc.) to MTX-Tunnel when it connects to the GPRS.

And how do you find out the IP address that has been assigned to MTX-Tunnel by the operator? 

There are two ways. You can make a missed call or send an SMS to MTX-Tunnel. If MTX-Tunnel is configured to do this (indicated in the configuration file), the MTX-Tunnel will return an SMS to the phone number that sent the SMS or made the missed call, the SMS will contain the IP address that has been assigned by the operator.

So anyone who accidentally makes a missed call can get the device’s IP? 

No. In the MTX-Tunnel’s configuration file you can set up to ten valid phone numbers which can request actions like sending the IP address. If the telephone isn’t valid the MTX-Tunnel doesn’t do anything.

Does the MTX-Tunnel have to be permanently connected to GPRS? 

It depends. In client mode yes, the connection is permanent. As soon as the device has power it is connected to a specific IP address and port as I said before. If communication is lost for any reason, the MTX-Tunnel keeps trying to reconnect (every 30 seconds) until it is connected.

In server mode you do not need to be permanently connected to GPRS. If we want to be connected to GPRS at any point, all we need to do is make a missed call or send an SMS with the word “on”. Then you will be connected to GPRS and as I said in point 6, if configured to do so it will send an SMS with the IP address assigned by the operator.

And if MTX-Tunnel is in server mode and you don’t want the connection to be permanent, once you remotely activate the GPRS connection with the missed call or SMS, how do you disconnect from the GPRS connection? 

You can define a time out in the configuration file. Let’s suppose that you set it to 3 minutes. If the MTX-Tunnel doesn’t detect GPRS traffic after 3 minutes it will automatically disconnect from the GPRS network.

And if MTX-Tunnel works in server mode can you connect to any IP? I.e. can intruders connect to my devices? 

No. It’s the same with the telephone numbers. You can set up to 10 IPs that you can connect to in the configuration file. Any other attempted connection with an unauthorized IP is aborted.

But I already have a private VPN network i.e. I’m not going to have any unauthorized access to MTX-Tunnel. Do you need to specify authorized IP addresses like you said in the previous section? 

It’s not necessary. If you specify an authorized IP as 0.0.0.0 you can connect to MTX-Tunnel from any IP address. Remember that this option is only recommended for VPN networks in order to avoid any unauthorized access.

Can you configure the MTX-Tunnel’s serial port parameters?

Of course. You can change the baud rate, flow control, data bits and stop bits. As always you can do all this through the configuration file.

Let’s imagine that we have 100 temperature sensors which are all the same, without any intelligence and all using 100 MTX-Tunnels in client mode i.e. all 100 are permanently GPRS connected to a server. If the MTX-Tunnels don’t have a fixed IP address, how do I know which temperature probe corresponds to which temperature that the server receives? 

MTX-Tunnel has a configurable identification parameter that allows you to set which is sent to the server first once the connection is established. With this you always know which device corresponds to which data in cases like I mentioned where devices work in client mode and don’t have a fixed IP address to send identification.

Will I have a problem with any up to date application that I use with a serial cable if I substitute it for an MTX-Tunnel? 

Usually not, but there is one thing that you should keep in mind. That is that GPRS communications are quick but they have a bit of a delay (just as it’s not the same to work with a LAN via the internet). Let me explain. If you have a question-answer application (a typical example of a PC questioning a temperature sensor), you have to take into account the time from when you send the command from via GPRS to when you receive the answer with the sensor’s data. This obviously will take more time than if you used a cable. It’s the only things that you have to keep in mind so that you can modify the timeout.

There’s more information on Matrix: gsmsupport@matrix.es / telephone 915602737

I hope that you found it interesting. See you next time, have a good weekend. ;)

Tags: , ,

Comments 54 Comments »