Archive for the “3.GENERAL” Category

Nowadays it seems to be clear what PoE is and the advantages that it brings. PoE (Power over Ethernet) means that you can get a power supply through Ethernet cables. It facilitates the installation of multiple electronic systems that have an Ethernet connection, like an interface. This technology is standardized through the IEEE 802.3af and IEEE802.3at and nowadays we can find electronic devices and equipment where the manufacturer has chosen to assemble a SilverTel module.  These modules are easy to integrate as they only require a minimal amount of external components, they meet safety regulations and most importantly these days, they are low cost.

This week I heard that  SilverTel had a few new modules that can get a power supply of up to 100W through a CAT5/6 Ethernet cable for HDBaseT technology.

What is HDBaseT?

The first thing to know is that the major electronic manufacturers like LG, Samsung, Sony and Valens have formed an alliance. The idea is to promote and commercialize the HDBaseT name. This allows you to eliminate multiple cables and connections in the home and office in exchange for one CAT5/6 cable. With this one cable we can connect computers, TVs, games consoles, multimedia players etc. as you are guaranteed a 10.2 Gbps bandwidth.

hdbaset

I don’t understand the advantages that it offers. 

For example: Suppose you have a 1080 Full HD multimedia hard disk and the television is 100m away, how do you connect them? With a CAT5e cable both devices can be HDBaseT enabled.

But there isn’t a plug where I want to install the TV… 

You don’t need to find a plug for the TV which is 100m away from the multimedia player if we use PowerOverBaseT technology, called POH.

hdbaset-cable

I don’t think that the TV is powered with this. 

Now the consumption of a 40” LED TV is around 70W, Energy Star Consortium 6.0’s intention is that all screen dimensions and LCD/LED televisions don’t reach 85W.

Great… and above all energy savings. Explain a little more what is POH exactly? 

Based on POH technology, the idea is to get data and power supply from the same CAT5/6 cable up to a maximum distance of 100m. Just like in PoE, we have devices that inject power supply, PSE and the device that is supplied with PD (in our example, the TV).

And… can’t I use PoE? I already have it working with home and office phones, do I have to get rid of PoE access points? 

No don’t throw anything away as it is compatible. If you connect a PoE telephone to the POH network, the PSE injector will recognize it and it will give it less voltage/current in order to meet the specifications, this means that you won’t need to throw away any existing devices.

Do you recognize it? How? 

When connecting a PoE or PoH device, before adding the PSE power source, power it with a couple of volts so that there is communication between them and so that the device has an internal electronic signature to show that is PoE-PoH enabled. If valid, the injector will then apply the power. If not, it’s obvious that it’s not a PoE-PoH device and no voltage is applied.

Ok. I am a manufacturer and I want to include PoH in my products. What electronics do I need? Where do I start? 

Let’s not complicate matters. The company SilverTel has a lot of experience with PSE injector modules and PoE, PoE+ and PoE Ultra extractors. It has just released some new modules (Ag6600 and Ag5600) which are compatible with the standard PoH for HDBaseT. They have been preparing for PoH for 7 years. With these modules you won’t need to meet the standard, with a minimal amount of components your electronics will be ready.

It seems like this is directed towards television manufacturers… 

No it’s not. There are other applications where PoH has great potential and high power is needed. Some examples are: sound amplifiers (sometimes built into the speaker), point of sale terminals with screens, signage applications and display panels. It is also used to ensure that there is a CC power supply when it is essential.

I hope you liked it. It’s an interesting article written by my colleague Jesus Santos. Thank you.  ;)

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 »

If you have ever developed devices within the category that we might call “on-board” (devices for cars, buses, trains etc.). Did you know that one of the biggest and most common problems is related to vibrations?

The problem is accentuated especially if the device that we are designing is going to use USB peripherals, for example if you are connecting a memory pen drive, a USB video camera, GPRS, 3G modem etc. From short to medium term, if vibrations are intense, it’s easy to see how USB devices don’t work as they fall out. A few developers even use silicone in order to attach USB connectors and avoid this problem.

You already know that I don’t usually talk about connectors but I like talking about some from time to time when they stand out for a special reason. Therefore I am going to post about one of those connectors that make an engineer’s life easier. Here you have a photo of the new connector from the company Amphenol LUSB-A111-00.

fijacion-usb

If you look, you will see that the USB connector has a tab at the top. The tab tilts as indicated by the arrow, you can lift it up by pressing it with your finger.

When the tab is pulled down, two pins are fixed into the connector’s two anchor holes (any USB device has these). This way no matter how strong it is, no vibration will disconnect the USB device from our connector. It needs a force of 10Kg to release it, so you can only disconnect it if you do it intentionally.

So there you have it, another connector to consider in order to avoid typical problems and annoyances that occur when your equipment is installed in strong vibration scenarios.

I hope that it was interesting for some of your projects.

Regards.

Tags:

Comments No Comments »

Today I am going to post an article that I’m sure will be interesting and curious to many, especially those of you who are regularly working with GSM devices. Last Thursday, I finally brought a little gadget home that I had bought just a few weeks ago. Nobody has anything bad to say about it, so I wanted to be able to test and compare its ability to Cinterion modems as until now it had not been possible to test it and I had to believe in Jamming detection.

I have based my tests on the official Cinterion application note called “AN_45_Jamming_Detection.pdf”. Here you have all of the documentation on that subject, I2m going to focus on the practical part. As for the modem, I have used a Matrix MTX65i that has a TC65i inside, however I could have used another MTX or Cinterion model and it would have made no difference.

Well yes ok. But what is Jamming detection?

Well to put it simply it is the modem’s ability to detect an intentional interference in communication channels that block them.

You might think that it doesn’t matter and certainly in the vast majority of GSM application this is true, but in safety-related applications (alarms etc.), it’s quite important (or it should be).

Let’s take an example. A house or a car has a typical GSM alarm. If the alarm goes off it must communicate this to a central office of GSM alarm receivers. But, what happens if some thugs use a GSM inhibitor? Could the GSM alarm communicate with the central office? Will the alarm at least be capable to detect interference with a GSM inhibitor and act accordingly?

Obviously, no device (no mobile, GSM/3G module etc.) would be capable of making a GSM communication with a powerful enough GSM inhibitor present. But yes, some devices have (al least) the ability to detect interference from a GSM inhibitor: Cinterion modules. This ability allows them to act accordingly. This means to say that if a device suspects that there is interference, it can try to communicate while the interference is still weak (it can pre-activate warning sound etc.). In short, it’s always best for an alarm device to know what’s happening than to not know, how it acts in these situations will depend on the ability and imagination of whoever developed the alarm.

How to operate Jamming Detection in Cinterion modules:

As I said before, all of the documentation is in Cinterion’s applications 45 note. Basically and quickly summarized, it describes the activation of the communication link’s stability indicator “Ista”, for example with:

AT^SIND=”lsta”,1,5

And to activate URCs with:

AT+CMER=2,,,2

As soon as we activate jamming (interference), we will see how the modem is going to indicate the situation through URCs (sending messages through your serial port). First of all it will send messages like this:

+CIEV: “lsta”, , ,

This indicates that there are errors in the communication link. “lstaEdv” (which is a countdown timer) which will quickly decrease to “0″. Hmm… the suspicion begins…

After this URC, the modem will return another type of message:

+CIEV: “lsta”, , , , , ,

This URC already indicates network coverage loss. According to Cinterion documentation, when you get a URC with “IstaNo” = 40, a low “Istavar” (lower than 10) and “IstaMean” > 40, this is a clear indication of jamming.

As everyone always understands better with pictures, here you have a video which is even better. (If you have received the article via email you will probably have to watch it on (www.blogelectronica.com).

jamming-detection

I hope that you found it interesting. Bye  ;)

 

 

Tags:

Comments No Comments »

Whoever works with MTX65i or MTX65+G (or TC65i or XT65 modules) will know that to save/ modify/ rename/ delete files and applications inside a device we use a tool called MES that is installed when we install the development environment Eclipse.

This MES (note, not all versions) has a number of command-line utilities i.e. console utilities. These utilities can be very useful to automate production processes as it is easy to automate the load of applications inside the modem.

The MES console applications are:

MESClose.exe
MESCopy.exe
MESDel.exe
MESDir.exe
MESFormat.exe
MESMKDir.exe
MESFormat.exe
MESPort.exe
MESRmdir.exe
MESSearchApp.exe
MESServer.exe
MESXCopy.exe

Before using any of them for the first time, you must register the DLL activeX called MESShellExt.dll in the PC, so we execute the file named “register.bat” which is in charge of this. As soon as the DLL is registered, we can use the utilities.

The first one that we should use is called MESPort. With this, the PC’s COM port that we want to use is specified. To do this we need to do the following:

mes

And then we can use the utilities that we need. For example, with MESDir we can list the contents of the modem’s memory i.e. we list the files that are inside the modem.

mes2

With MESCopy we can copy files from our PC to the modem. This is very interesting when producing our devices.

There are lots of other utilities, like MESDel (to delete files), MESFormat (to format the modem’s FFS), MESMKDir (to create a folder) etc.

Anyway there’s a whole set of useful utilities. Another important thing is that you can run Win7 64bits no problem. Some time ago I started to develop an MES graphic for Win7 64bits based on these utilities, it was only half done. We will see if I fancy doing it I will finish it.

meswin7

Until next time! ;)  

Comments 6 Comments »

A few days ago I talked about the new MTXTunnelv5.0. As I said then, this software (that can optionally be put together with MTX modems) can run a number of applications and not just a GPRS-RS232 gateway. Today I am going to talk about how to use MTXTunnelv5.0 to control relays via SMS (i.e. so you can turn on/off lights, boilers etc. via SMS).

As we want to switch relays, let’s assume that the MTXTunnel5.0 is being used with an MTXIND modem (from Matrix)  as it’s the only modem in the Matrix family that has relays. The MTXTunnelv5.0 isn’t really designed to switch relays, it does much more than that. The MTXTunnelv5.0 is able to run AT commands via SMS.

rele-sms-luces

What do you mean?

Well it means that we are going to see how to switch relays via SMS, but the same concept is used to switch a digital output, to read an analog/digital input, to read the device’s GSM coverage etc.

So you mean to say, all you have to do to switch a relay in a MTXIND GSM modem is send an SMS with an AT command?

That’s it. The MTXIND has 4 relays called RL1, RL2, RL3 and RL7. These relays are associated (respectively) to the GPIOs 1,2,3 and 7 in the module’s core i.e. in the internal TC65i module that runs the MTXIND.

For example, if we want to change something about the relay RL1 (associated with GPIO1), we would just have to send the AT command: AT^SSIO=0,0 to activate the relay and the AT^SSIO=0,1 command to deactivate the relay. When I say “we would just have to send the command”, I am referring to an SMS with the text: “AT^SSIO=0,0″ or “AT^SSIO=0,1″. This means that the MTXTunnelv5.0 configuration file would allow us to run the device’s relays via SMS, it could be like this:

MTX_PIN: 0000 - If the SIM card doesn’t have a PIN, leave 0000.

MTX_model: MTX MTX65IND - The model chosen is the MTX65IND due to relays

MTX_mode: none- We do not need GPRS-serial tunnels

SMS_allPhones: off – We only want authorized phones to send AT commands

SMS_validPhone1: 666 123 456 - Authorized phone # 1

SMS_ATEnabled: on - AT commands are accepted by SMS

Woah, that’s very complicated. I’m interested in this feature for some of my upcoming projects, but I can’t type an SMS with “AT^SSIO=0,0″, “AT^SSIO=0,1″ to my clients in order to switch a relay, it’s too confusing.

 You’re right it seemed like rigmarole to me too. Therefore I’ve introduced ALIAS.

ALIAS? What’s that?

Let’s look at an example, this would be the configuration file using ALIAS:

MTX_PIN: 0000 - If the SIM card does not have a PIN, leave 0000

MTX_model: MTX65IND – The MTX model chosen is MTX65IND due to its relays

MTX_mode: none – We don’t need GPRS-serial tunnels

SMS_allPhones: off - We only want authorized phones to send AT commands

SMS_validPhone1: 666 123 456 - Authorized phone # 1

SMS_ATEnabled: on – AT commands are accepted by SMS

SMS_alias1: ON1> AT ^ SSIO = 0.0 Activates R1 when it receives an SMS with ON1

SMS_alias2: OFF1> AT ^ SSIO = 0.1 Deactivates R1 when it receives an SMS with OFF1

SMS_alias3: ON2> AT ^ SSIO = 1.0 Activates R2 when it receives an SMS with ON2

SMS_alias4: OFF2> AT ^ SSIO = 1.1 Deactivates R2 when it receives an SMS with OFF2

SMS_alias5: ON3> AT ^ SSIO = 2.0 Activates R3 when it receives an SMS with ON3

SMS_alias6: OFF3> AT ^ SSIO = 2.1 Deactivates R3 when it receives an SMS with OFF3

SMS_alias7: ON4> AT ^ SSIO = 6.0 Activates R7 when it receives an SMS with ON4

SMS_alias8: OFF4> AT ^ SSIO = 6.1 Deactivates R7 when it receives an SMS with OFF4

With the previous configuration, we activate R1 with an SMS that says “ON1” and we deactivate it with “OFF1”. Or rather, when the modem receives an SMS saying “ON1”, it internally interprets it as “AT^SSIO=0,0″. If I wanted to activate R1 with the text “luz1on”, I would have to specify something like:

SMS_alias1: light1on>AT^SSIO=0,0

Now I like it more. But I would also like to have a confirmation that the relay has been switched, is that possible?

Sure, I would ask myself the same thing.

To do this all you have to do is add this line to the configuration file:

SMS_ATResponse: You receive the AT command’s response via SMS

This means that the modem sends the response from the AT command.

But wouldn’t it send a response that a non-technical user couldn’t understand? As it would be the modem’s response to an AT command…

Yes it would. This is ok for finding out coverage, reading digital/analog input values but perhaps it’s not the best idea for finding out if a command has ran successfully, like switching a relay. For the latter we can introduce the following lines to the configuration file:

SMS_aliasOk: Command Ok – this text is sent by SMS if the SMS command was carried out successfully.

SMS_aliasError: Command Error – this text is sent by SMS if the SMS command was NOT carried out successfully.

With this, if an SMS command is carried out (and carried out successfully), the phone that send the SMS command will receive an SMS saying “Command Ok”. If it carried out with errors it will receive and SMS saying “Command Error”. If it isn’t carried out at all, the phone won’t receive anything.

To sum up, the MTXTunnelv5.0 configuration file that can switch 4 relays looks like this:

MTX_PIN: 0000 – If the SIM card does not have a PIN, leave 0000

MTX_model: MTX65IND – The MTX model chosen is MTX65IND due to its relays

MTX_mode: none – We don’t need GPRS-serial tunnels

SMS_allPhones: off – We only want authorized phones to send AT commands

SMS_validPhone1: 666 123 456 – Authorized phone # 1

SMS_ATEnabled: on - AT commands are accepted by SMS

SMS_alias1: ON1> AT ^ SSIO = 0.0 Activates R1 when it receives an SMS with ON1

SMS_alias2: OFF1> AT ^ SSIO = 0.1 Deactivates R1 when it receives an SMS with OFF1

SMS_alias3: ON2> AT ^ SSIO = 1.0 Activates R2 when it receives an SMS with ON2

SMS_alias4: OFF2> AT ^ SSIO = 1.1 Deactivates R2 when it receives an SMS with OFF2

SMS_alias5: ON3> AT ^ SSIO = 2.0 Activates R3 when it receives an SMS with ON3

SMS_alias6: OFF3> AT ^ SSIO = 2.1 Deactivates R3 when it receives an SMS with OFF3

SMS_alias7: ON4> AT ^ SSIO = 6.0 Activates R7 when it receives an SMS with ON4

SMS_alias8: OFF4> AT ^ SSIO = 6.1 Deactivates R7 when it receives an SMS with OFF4

SMS_ATResponse: You receive the AT command’s response via SMS

SMS_aliasOk: Command Ok - this text is sent by SMS if the SMS command was carried out successfully.

SMS_aliasError: Command Error - this text is sent by SMS if the SMS command was NOT carried out successfully.

FYI.  For the clueless – The grey text is an explanation. Don’t put them in the real configuration file.

Easy and customizable isn’t it? I hope that it’s interesting to some of you. See you next time. ;)

 

Tags:

Comments 4 Comments »

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 »

Today I am going to post about Proguard, an obfuscator for Java. A lot of you probably have heard of it and use it with your j2me applications. But for those of you who haven’t heard of it, I advise you to take a look at this article which will help you with any new projects with Cinterion (TC65, XT65) or MTX terminals.

 

Using an obfuscator with our j2me applications is interesting, more interesting than being able to “obfuscate the code”, as it reduces the total “.jar” file size generated. Never forget (although sometimes some of us seem to do so ;) ) that we’re not programming a Core2Duo processor,rather we are programming devices with very limited RAM and FLASH memory. For example, an MT65 GPRS modem has 400Kb RAM memory and 1.7Mb FLASH memory. Using an obfuscator will make the most of the precious FLASH memory, and especially the RAM memory in our modems.

 

To give us an idea, the new MTXTunnelv5.0 firmware that comes out soon (this month) takes up around 130Kb without obfuscating and 80Kb obfuscating. You can see that the reduction is quite significant.

 

What do you have to do to use an obfuscator?

 

Well first of all you need to download it.

 

With eMule?

 

No, it’s free.

 

Where is it?

You will find it here: http://sourceforge.net/projects/proguard/files/

Download it and unzip it inside the Eclipse folder i.e. within:

c:\Eclipse\proguard4.5.1\

Then go to Window > Preferences > J2ME > Packaging > Obfuscation and select the suitable PATH like you can see in the following screen:

proguard-1

Once you have done this you can “compile” your file obfuscating it. Instead of making a “Create Package”, to do this we make a “Create Obfuscated Package”.

Yes it worked, but there was an error.

This is because you need to specify a complete path to a JDK and you probably have a JRE. Change it, to do this go to Window > Preferences > Java > Installed JREs and select the appropriate JDK directory. In my case:

proguard-1

I hope that you find it useful. Now I’m going to go to sleep as I have to gain some strength for tomorrow, I’m trembling with fear as tomorrow my son celebrates his fifth birthday and Sonia has invited her friends round. At first it was 2 or 3 friends, then it was 5 or 6, then 7 or 8 and today I was told it was a whopping 12 or 13. Also I expressed my happiness with the tea that she has prepared. There are no ham sandwiches no, but she has prepared an endless number of rolls filled with lotsssss of chocolate (Think of my sofas, the walls…) Anyway I think that I will stay on the top floor of my house (where my computers are) ensuring that no brats get into the restricted area. :)

 

Tags: , ,

Comments 4 Comments »

 

I have had the OTAP platform active for a very long time. Since then it has been used for thousands of OTAPs. As you know an OTAP is the process that allows you to remotely update Java applications that we embed in out Siemens/Cinterion modems. Today I’m going to present version 2.0 of this software which is similar to version 1.0 but has some important differences.

The first thing is that it no longer depends on my server www.otap.es. Now the software has a little TCP/IP server to manage OTAP responses. As you know, this means that when an OTAP process ends (good or bad), if the GPRS connectivity is correct it sends a notification (POST request) to a web server indicating the result of the operation. In version 1.0 this notification was always sent to www.otap.es by the modem whereas in version 2.0 you can specify your OTAP confirmation server or use this same application (v2.0) as a confirmation server. I have also prepared for this.

 

If you look at the following screenshot…

 otapv2-1

 …you will see the URL notify parameter. That is the URL that the modem will call when the OTAP process has finished. As I said before, you can specify your own OTAP confirmation server (via IP or DNS) or use this same application as a confirmation server. For the latter, the simplest thing to do is click on the “My IP” button. By pressing this button a URL is automatically created with you router’s public IP address (if you didn’t know). This means that for example, when clicking on the “My IP” button, the URL notify parameter will display something like this (in my case):

 

http://83.56.194.122:20010/?ID=

This indicates that for the server confirmation, the modem must use the IP:  83.56.192.122, the 20010 port and it works like an ID phone number parameter. The software automatically changes the text <phone> for the number corresponding to the SIM which will carry out the OTAP. This is so that when the OTAP confirmation server receives the confirmation, it knows which phone number it’s about.

Two very important things. One is that obviously you have to do a NAT in our company’s ADSL router to redirect the 20010 port (or the port that you are using) to the PC where the OTAP confirmation software is running. The other is that you mustn’t forget the “/” between the port number (20010 in the example) and the question mark (?).

Once all of the necessary data is completed, we are ready to do the OTAP. For this we have to have a GSM modem connected to our PC’s serial port (configured to 115200,8,N1 and with HW flow control) which will be responsible for send OTAP SMSs. Once everything is connected we can press on the button “Initiate OTAP Process”.

 otapv2-1b

Here is another difference with version 2.0 with regards to version 1.0. In the figure above and below, if you look, you will see that we have finally decided to use this same application as an OTAP confirmation server you have to enable the “OTAP Server Active” box and specify the TCP port indicated on the previous screen in “URL Notify”. I repeat that you mustn’t forget the NAT in the router and don’t forget to disable the windows firewall and/or antivirus so that they don’t block the chose TCP port.

As soon as this is done we are ready to press “Start OTAP Process” and the process will begin. In this version 2.0, the control OTAP error control has improved considerably. If you look, you will see that the superior table has 3 columns. The first two are the same as version 1.0, but the third one shows a LOG with what has happened. All you have to do is double click with the mouse on a certain LOG to open a screen with the complete LOG. This was it’s much easier to figure out the reason for an OTAP error if there is one. For example, if the OTAP process finished with OK and we open the LOG we will see something like this:

otapv2-2

If on the other hand we didn’t specify the correct path (URL) inside the JAD file, we would have an error like the following in the <MIDlet-Jar-UR> parameter of the JAR file:

otapv2-3

If we had been mistaken and didn’t specify the correct JAR file size in the <MIDlet-Jar-Size> parameter inside the JAD file, we would get an error like this:

otapv2-4

If you wanted to test out the program you could certainly do it with the HelloWorld example that I have on blogElectronica. You can see the correct JAD in:

http://www.blogelectronica.com/TEMP/HelloWorld.jad

I hope that whoever uses OTAP finds it interesting. Here you have the LINK to download OTAP v2.0 software that I put in a zip file with all of the necessary DLLs so you don’t need an installation. If anyone has any problems with DLLs, please let me know. This version is completely free and never expires, but as there’s an important job for me to do, there’s always a “but”, it is limited. You can enter up to 5 modems into the system and therefore you can do OTAP simultaneously with a maximum of 5 modems (with a constant in the source code). But this version will be sufficient for most users.

But for those who don’t want to be limited to 5 modems, want to be able to use all necessary modems and especially want a COMPLETE SOURCE CODE from the OTAP v2.0 application, you are able to get it through PayPal (as it’s personal to me and I email it at 24h) Let’s see… if I was allowed a faster server for blogElectronica and for other future projects what would I have in mind…

Having the source code could be very useful to anyone who has planned their own OTAP application in order to not have to start from scratch and to save time. By having the application’s source code it’s possibly to modify it, made it bigger, add parameters, logos or whatever you want. I haven’t done it in Java, I’ve done it in Visual Basic 6 and I’ve included many comments so that everyone can understand without having to take any classes.

otap-visual-basic

I hope it’s been interesting for you. See you another day, happy Sunday! ;)  

Tags: , , , ,

Comments 10 Comments »

I recently had to help out on a fleet control project where they needed to control a small screen via a MTX65+G modem. As I had to make a small mount to test the screen/display that I was using, I’m sharing it on here for anyone else who may need it in the future (and to remind myself if I ever need it again).

Let’s go. As many of you will remember, the MTX65+G modem has a single serial port. That serial port was already occupied by another device, so the only alternative was to use a display controlled by SPI. The chosen screen was from Electronic Assembly and more specifically it is the EA DIP204-4HNLED model.

The first thing to do with this screen is configure it so that it works with SPI as by default it uses a parallel bus. To do this you simply have to turn it around, unsolder the jumper marked 4/8 and solder the jumper marked SPI. Both are close together and one should be secured with a multi-meter so that the 4/8 jumper is really unsoldered.

The display connections are very simple, so quick that I connected pins 17 and 18 to 4V power supply (for the backlight), pins 1 and 2 to 3.3V and the contrast (pin 3) to a 10K potentiometer and the 4-pin SPI bus (pins 4, 5, 6 and 7) to the corresponding modem’s SPI bus (obviously the screen’s DI to the modem’s DO and vice versa). For my tests, I used a MTX65-IND terminal as it was convenient, but it would be exactly the same if you used an MTX65 or an MTX65+G. Well that’s almost everything, we just need to send the appropriate AT commands to the modem so that it sends data to the display via SPI and so that you can write on it. Obviously all of this can be done from a java embedded application inside the modem, but for convenience, I am going to do it via AT commands sent from a PC application through the serial port. So, these are the exact commands that you need to send in order to write HOLA on the screen.

spi

‘Activate the SPI bus and put it in 0 mode (of four possible modes)

Response = sendAT (“at ^ sspi = 1000,0000,0000,0000,0000″)

’8bits and activate the extended functions

Response = sendSerial (“<2000000F820C0>”)

’4 line mode

Response = sendSerial (“<2000000F89000>”)

8 bits and disable the extended functions

Response = sendSerial (“<2000000F800C0>”)

‘Display on, cursor on and blinking cursor

Response = sendSerial (“<2000000F8F000>”)

‘We clean display and cursor column 1 and row 1

Response = sendSerial (“<2000000F88000>”)

‘To move the cursor to each write

Response = sendSerial (“<2000000F86000>”)

‘We wrote HOLA

Response = sendSerial (“<2000000FA1020>”) ‘H

Response = sendSerial (“<2000000FAF020>”) ‘O

Response = sendSerial (“<2000000FA3020>”) ‘L

Response = sendSerial (“<2000000FA8020>”) ‘A

I didn’t make anything up, it’s basically the example from the display’s manual (page 3). The only thing to keep in mind is that you have to send the smallest bit first and the biggest bit last. I.e. in the manual’s example, you send a 0×34 command, which in binary is 0011 0100. Therefore, with our modem, we will have to send 0010 1100 i.e. a 2C. Another important thing is that the screen requires each byte to be sent divided into two bytes e.g. XXXX0000 XXXX0000, therefore instead of sending a 2C, a 20C0 is sent. The reason for the initial F8 in each frame (or the official FA when we write a character) is explained here in page 51, it’s basically the header in each SPI frame, which the screen needs.

 

Just this is enough to write data on the screen like you can see on the picture above.

 

I hope that it’s been interesting or helpful for those who need to use a display with a Siemens/Cinterion modem on a project.

Speaking of Siemens/Cinterion, I’ll tell you about some good news that affects me personally and in these times, good news is always welcome. It turns out that this week it was celebrated at the global congress that Cinterion organizes with all of its distributors. As I have mentioned in my blog many times, I work for Matrix Electrónica (Cinterion distributor in Spain) as an application engineer. So, this year we have been awarded a prize for the best distributor in the world with the best technical support for Cinterion modems, something due to both my colleague Jesús Santos, the server that writes to you (which we are principally in charge of) and among other things from the Cinterion technical support and MTX terminals in Matrix. We are very pleased.

bestsupport-award-2010

It feels good. After working for so many hours with these products, always lending a hand to so many people (we’ve had hundreds of queries from companies with all types of GSM projects) and always being willing to resolve problems, without burying our heads in the sand. Finally, after all of our hard work, we have at least been recognized by Cinterion, the truth is that it makes us feel good and encourages us to continue and improve even more.

My granddad, God rest his soul, often used to say gratitude is a sign of a good upbringing. So thanks to Antonio López (from Cinterion Spain) that has always been there to lend a hand whenever we have needed it and whose help has been invaluable and fundamental to be able to do our work well during this time.

That’s all for today, see you next time. Hope you have a good Sunday. ;)

www.blogElectronica.com

Tags: , ,

Comments 13 Comments »