Posts Tagged “gsm”

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 »

In order to make the most of the fact that I have had to test out the PCM interface from Cinterion modules and from Bluegiga Bluetooth modules, I will post about it as it will be of great help to those who want to develop a hands-free GSM device (via Bluetooth). In order to not complicate matters, I will post the information in a simplified, practical way. Well, here we go…

1.- Let’s take a DSB75 evaluation board where we insert the Cinterion GSM module that we want to use (a TC63i, a TC65i, a PH8 etc.) In my case I have a TC65i.

2.- Locate the pins on the DSB75 evaluation board that correspond to the PCM audio pins. They specifically correspond to the board’s x703 connector. In this connector we will see 7 pins: TXDAI, RXDAI, FS, BITClk, FSIN, BCLKIN and GND.

pcm-dsb75

3.- Out of these 7 pins, we only need 5 that are using PCM. The choice you make will depend on whether you use the Cinterion module in PCM MASTER mode or PCM SLAVE mode.  If you use the Cinterion module in PCM MASTER mode, use the TXDAI, RXDAI, FS, BITCLK and GND pins. If we use the Cinterion module in PCM SLAVE mode, use TXDAI, RXDAI, FSIN, BCLKIN and GND pins. The following photo shows how I used it in SLAVE mode with the cables connected to these 5 pins.

dsb75-conexiones

4.- We took a Bluegiga development kit (the simplest to use is the WT32 Bluetooth module). The reason for choosing this kit is because it has the PCM pins available in the development kit’s PCB. In Bluegiga’s PCB you can easily see where the PCM pins are due to the good screen.

wt32-conexiones

5.- Connect the GSM Cinterion’s PCM pins with the Bluegiga WT32 Bluetooth module’s PCM pins. Basically you have to connect the pins as follows:

TC65i  (Slave)    WT32 (Master)

RXDAI             OUT
TXDAI             IN
FSIN                SYNC
BCLK               CLK
GND                GND

What if you want the opposite? If we wanted to use the GSM module in MASTER mode it would be like this:

TC65i  (Master)   WT32  (Slave)

RXDAI              OUT
TXDAI              IN
FS                       SYNC
BITCLK            CLK
GND                  GND

So once you have done this, all of the hardware is connected. Now you need a Bluetooth hands-free earpiece. I have one from Plantronics with MAC Bluetooth: 00:03:89:a5:a6:72 (I mentioned it because I will use it later).

6.-The next step is to configure the WT32 Bluetooth module to route audio to/from the PCM interface. We do this by sending the following command to the WT32 module via a HyperTerminal at 115200,8,N,1:

SET CONTROL AUDIO PCM PCM

7.- We’ve set up the PCM configuration to the Bluetooth module. Due to the complexity of the different PCM configurations, we use an Excel provided by Bluegiga. With this excel we can indicate the configuration that we want and this way we easily obtain the PSKEY_PCM_CONFIG32 value that we need to configure the PCM. In this case PSKEY_PCM_CONFIG32 has a value of 0×08400000.

config-audio-pcm

As in the previous point we can configure the PSKEY by a command from the HyperTermainal:

SET CONTROL PCM 08400000 006C

8.- Now we are going to configure the Cinterion GSM module to use the audio’s digital interface. These commands can have different functions depending on the model used. I am going to do it with a TC65i. Therefore, from a HyperTerminal we send:

AT^SAIC=1,1,1,1,1,1

So let’s configure the module to use the PCM digital audio in SLAVE mode at 512MHz and Long Frame.

At this point we have already configured both the Bluetooth module and the GSM module.

So now let’s try the audio!!!!

9.- From the Bluetooth hands-free earpiece (that I imagine is already paired with the Bluegiga Bluetooth module), we can connect to the Bluegiga Bluetooth module (by pressing the only button that it has).

10.- Next we physically connect the TC65i module’s ASC0 RS232 serial port to the WT32 Bluetooth module’s serial port with a serial cable crossover.

11.- We make a GSM audio call from a mobile telephone to the TC65 GSM module. On receiving the call, the module lets out a “RING” from the serial port that will be received by the Bluetooth module in order to inform the Bluetooth earpiece that there is an incoming call (we hear the typical beep beep of an incoming call). We answer the call by pressing the button on the Bluetooth earpiece.

12.- Once you have done this, we answer the voice call in the GSM module with the typical ATA command. If everything has gone well up to now, we will be talking with our hands-free Bluetooth earpiece, connected via Bluetooth to the Bluegiga WT32 module and this in turn is connected to the Cinterion GSM module through the PCM interface.

Well, that’s all for today. This post is perhaps a bit complicated to understand if you don’t have the devices in front of you. But you’ll see that if you ever need to do something similar, this post will be a gem and it will save you lots of working hours. I’ll be fine if I ever need to do it again because I have had to assemble this 3 times over the years. I always think that I won’t forget how to do it but something always slips my mind. From now on this won’t happen ;)

 

 

Tags: , , ,

Comments No Comments »

Today we are going to do GSM positioning experiment, I’m sure that you’ll find it interesting. Find a Cinterion modem (a TC65, XT65, HC25 etc. or a terminal (MTX65, MTXH25 etc.)… Let’s get started.

As Im sure you know, Google has a service (that is powered by Android, its new Operating System for mobiles) for GSM cell positioning. This means for example, using a mobile application, it will allow you to know which friends are around you. How does it do this? By detecting if any of your friends is in the same (or the next) GSM cell as you.

How does Google know if one cell is next to another?

Well it’s because it’s Google and Google knows everything. Really it’s because it has a large database that has the GPS coordinates of all phone antenna.

If you take a look at the website…

http://www.codeproject.com/KB/mobile/DeepCast.aspx

…You will see that these guys explain very well how this Google service works and that have already been working on researching which data has to pass through Google’s API (specifically http://www.google.com/glm/mmap) and most importantly, how to do it so it returns coordinates (latitude and longitude) of a particular phone antenna.

If you read the article carefully you will see that you need to get the following data from a GSM antenna to get the position:

Cell Tower ID
Location Area Code (LAC)
Mobile Network Code (MNC)
Mobile Country Code (MCC)

 And how is the data obtained with our modems? The article talks about Windows Mobile RIL…

It’s because the article is aimed at mobile phones. We are going to think about our Cinterion modems. Fortunately these wonderful modems come with AT commands which allow us to obtain such data. For example one of them is:

AT^MONI

Have you executed the command?

If you have executed it you will see that you get some data, in my case:

chann rs  dBm MCC MNC  LAC cell NCC BCC PWR RXLev  C1 I chann TS timAdv PWR  dBm Q ChMod
18 21  -89 214  07 0335 5A0C   1   0  33  -103  13 I    No connection

This is what we can extract from that:

Cell Tower ID = 5A0C
Location Area Code (LAC) = 0335
Mobile Network Code (MNC) = 07
Mobile Country Code (MCC) = 214

Very good, we can call the next page with this data and see the result. Click on the Test link and then substitute the values in the URL parameter (mcc, mnc, lac, cid) for those that I posted that I got from home and then reload this page:

GSM Positioning Test

localizacion-gsm

Cool, is that true? 

Obviously it’s only an approximate position, this isn’t a GPS, but it gives a decent approximation within the large territory where our modem is placed. Applications? This is what is already in everyone’s imagination.

And speaking of applications, this means that within a certain amount of time I will be talking about the MTX-Tunnel-Advanced at great length again, well it has a lot of new features added, including the one that we have just seen.

Can you improve the position of GSM positioning? 

Yes but that’s a different post for next year or for when I have time. Cinterion modems have another command (AT^SMONC) that can return information to up to 7 cells close to the GSM modem. The RSSI is returned in this information; so that the position (longitude/latitude) of these phone antennas are triangulating according to the RSSI, therefore we should be able to obtain more precise information. As I say for now this is deviating away from what I am trying to tell you.

Finally, I will leave you a link to the PHP source code which I have based it on. Use it to consult Google’s API and blogElectronica’s final PHP where I have added the earlier code, the code which is needed in order to be able to use Google maps, and to have a more visual demonstration. I am leaving it for you in a box with ribbon, so don’t complain…

I hope that you liked the post, I like it at least.

Well, now I’m going to fix the buggy,I have to change the entire front right axle; it’s going to take a long time… ciao ;)

www.blogElectronica.com

Tags: , ,

Comments 21 Comments »

Today I am going to talk about a little Multiplex feature in Siemens modems. As you know, some of the current modems like the MTX65+G  (GPRS+GPS modem) and the imminent MTX-HC25+PLUS (UMTS+GPS) have a single communication serial port.

There may be some applications where we’d like to have more than one serial port.

Why would I want more than one serial port?

Well for example it could be to maintain a GPRS communication through a serial port, to monitor the coverage level through another serial port and to obtain GPS coordinates through the other serial port. So yes it is possible but we use Multiplex mode for this.

The Multiplex protocol (GSM 07.10 y 3G TS 27.010) enables an asynchronous serial interface to be split into three virtual channels. It’s basically a communications protocol that encapsulates communications between the host (e.g. PC/ microprocessor) and a corresponding device (modem) with three virtual serial ports.

How do you use it?

Siemens provides some drivers for Windows (XP/2000) to be able to use this feature. If you don’t want to use a PC with Windows and you want to use a microprocessor for example, you can install the Multiplex protocol. It’s quite complex but it can be done.

To use driver in Windows, all you have to do is install the Siemens WinMux application. When you run it a window like this will appear:

Driver Multiplex All you have to do is have the modem physically connected to the PC’s COM port so that the driver will find it by clicking on the “Start Scan” button. Once the modem is connected it will suggest some port numbers as to where you should install the 3 virtual serial ports. As you can see in the figure above, I have installed it in COM24, COM25 and COM26.

After installing the driver, go to Start-> Control Panel-> System-> Hardware-> Device Manager:

Driver Multiplex  You will se that the “Serial Multiplex Driver” has been assigned to a COM, in my case COM1. If you right click on the installed driver’s properties you will be able to change the assigned COM, the speed and the virtual COM numbers.
Multiplex

One last thing, there’s a catch with the number assigned to each of the COM ports (it’s probably Windows’ fault) and the catch is that it doesn’t let you install it on any COM number. For example there are programs which don’t accept high COM numbers (COM24/COM25/COM26). If you want to change it, I have already registered to Windows you already know:

Start -> Run -> Manage

I searched for a VirtPort1 string and I changed the assigned COM for another one that interested me. It worked without any problems although I had to restart the computer after making a change before using it.

regedit-driver.gif

If we no try to open up to 3 HyperTerminal windows, each one associated with a virtual COM port, and we send AT commands you will see that it works without any problems.

I hope you found this interesting, see you next time. ;)  

Tags: , , , , , , ,

Comments 10 Comments »