Need some guidelines or workarounds to this problem...
Hi, first of all sorry if my english isn't good enough, i'll try to make everything clear as my english skills allow me to...
I'm working on a proyect where I must develop a web-server, where users can go to the web, click on a button, and that button action should connect to a modem (Siemens TC65) and read the action... the thing is that this modem doesn't have a static IP address, so my solution at the moment, is to make the modem connects to the web-server, make a POST method and 'ask' if someone has clicked on the button, so the modem can know if he must do some special tasks...
I was thinking about a second solution, that the modem connects to the server, and stay connected so the IP address won't be a problem, since the web-server will be accepting connections all the time in a certain port(*), and pass information to the modem whenever the user clicks on the web-button...
The thing is, i have never worked with web-java hostings, and I don't know if I can use other ports to accept connections other than 80(http), 21(ftp) and the known WEB ports through servlets...
Any recomendation would help me a lot, and if there's something I didn't make it clear enough please ask
best regards,
-Pablo
[1266 byte] By [
Ruly-o_Oa] at [2007-11-26 17:13:19]

You're saying that you want functionality on the web server to initiate some kind of interaction with the modem? So, the modem is connected to the machine running the web server?
> You're saying that you want functionality on the web
> server to initiate some kind of interaction with the
> modem?
The whole point is to control the modem remotely
I have developed a software for the modem, that when receives a SMS with a special message (i.e. "do some stuff"), the modem reacts on it. This modem has a general purpose input output (GPIO), and is connected to a PLC (Programmable Logic Controller), so the modem opens a particular GPIO to activate the PLC to do some work. This far everything is done.
Now i'm trying to make a web-server, which is connected with the modem somehow (this "somehow" is the problem), and when a user connects to the web, press some button, the web sends the message to the modem, in a similar way of sending the SMS...
>So, the modem is connected to the machine
> running the web server?
The thing is, I don't know if hostings (like this one http://www.javaservlethosting.com/ ), allow me to start a server application opening a different port than the known web ports (like 80, 21, etc...) I'm a real newbie about this, because i've never worked with webhostings... or any kind of it...
hope this makes more clear my problem, any guideline will really help
Message was edited by:
Ruly-o_O
> The thing is, I don't know if hostings (like this one
> http://www.javaservlethosting.com/ ), allow me to
> start a server application opening a different port
> than the known web ports (like 80, 21, etc...)
It's unlikely, I think. But if I wanted to know whether company X allowed me to do something, I would ask company X. Have you considered that?
>It's unlikely, I think. But if I wanted to know whether company
>X allowed me to do something, I would ask company X.
>Have you considered that?
In fact i'm waiting a response from 2 companies that i've asked... but the main question on this thread is if there's another workaround that i'm not seeing to accomplish the task that i've posted
Yes, well I didn't go into that because I still have no idea what your task really is.
You were asked whether the modem was on the same machine as the server and you didn't answer. But I suppose it is not because you are renting time on the machine and the owner is not likely to let you attach your modem there.
So the modem is somewhere else. But if it responds to SMS, why not just send it an SMS through the Internet? I don't see the need for a TCP/IP connection.
That is probably useless because I don't understand your problem. Don't worry, your English is fine. It's just your explanation that doesn't work.
I think that the word 'modem' made my point unclear
The modem, is a self-capable mini computer, it has a processor and a java environment, so the modem is not on the same machine as the server, the modem is connected somehow to the server (the somehow is the problem :P)
PS: sending SMS through internet? if that's possible without another modem connected to the server, it would be a great solution, i'm searching right now about that, thanks for the reply DrClap
best regards,
-Pablo
Let's see if I understand this:
1) You have some kind of device that has the following components:
1.1) a modem, which is capable of making outgoing calls
1.2) it may or may not have an embedded web server or other server
1.3) a JVM
2) this device is on your local network
3) You want to control this device to make outgoing calls or send SMS messages, via other devices on your local network
Is that right? How about item (1.2) -- does it have a server or do you have to write one?
And my next question is: if this is even remotely close, have you read the manual that came with the device? Can you at least tell us the name of the device?
The name of the modem is 'Siemens TC65T' as I said on the first post
This modem has a JVM, and a GPIO (general purpose input output)
With the GPIO, I control the PLC. This PLC can make some electronic tasks like turn on a light, but this is out of the scope of this thread.
So far, we have the modem, connected to a PLC, and I can control it with Java. For example, when this modem receives a SMS, it process the message and then it tells the modem to open a particular pin of the GPIO to make some task on the PLC.. all this programmed already
so far, what I have achieved is to control this modem with SMS's, so if I send a specific SMS to the modem, this activates de PLC to do some task.
Now, i was trying to make a similar process through internet, by creating a thread in the same program which listens through a Socket or something like that, connected to a Webserver (that i have to develope too), so I can control the modem, through a webpage, in a similar way of the SMS's system described before
here's an example step by step:
the user goes to www.mywebsite.com/ControlTheModem/index.jsp
he log in, and then press a button on that page, that sends a message to the modem, so it can process it and make a decision to open a pin of the GPIO as described before
about your point 1.2 paulcw, I don't understand the sentence (my english has some limits :( )
Message was edited by:
Ruly-o_O
Does the modem also have a network interface? Is it on your local network?
> Does the modem also have a network interface? Is it> on your local network?yes, it can connect to the network through GPRS. See the modem like a celularphone, with extra features and processing powerMessage was edited by: Ruly-o_O
I don't know what GPRS is. Can it connect to the ethernet network that your web server is connected to?
Or given earlier questions/responses...do you even have your own web server?
You want to control this device through your web server, but is there any kind of connection between the two?
Message was edited by:
paulcw
Wait. Are you saying that you want people to be able to use their browser to connect to a web server (which doesn't exist yet) to connect via SMS to this device so it can control whatever this device happens to control?
> I don't know what GPRS is. Can it connect to the
> ethernet network that your web server is connected
> to?
GPRS is just a wireless connection to teh internet... it can connect through Sockets or make HttpConnections or whatever... like i said, see the Modem as a celphone with extra features, like the GPIO
> Wait. Are you saying that you want people to be able
> to use their browser to connect to a web server
> (which doesn't exist yet) to connect via SMS to this
> device so it can control whatever this device happens
> to control?
the part "to connect via SMS to this device" is a POSSIBLE solution, but i'm still having some doubts about using SMS's gateways to do this, i would put it this way:
"I want people to be able to use their browser to connect to a web server (which doesn't exist yet) to connect Somehow to this device so it can control whatever this device happens to control"
... but in general, Yes. That's what I'm trying to develop.
Message was edited by:
Ruly-o_O
Well, I suppose you could write a web server in Java, and run it on this device.
Or, you can run some other kind of server on the device. On a separate web server, have server-side functionality to handle user requests, and then open connections to the device.
Another approach that might be useful, would be to have a central web server. This server would accept user requests for device activity, and then queue them up. Then the device would poll the web server occasionally, download the requests in the queue, and execute them. (As far as the web server is concerned, the device is just another client, except that it reads from the work request queue rather than writing to it.) The advantage of this is that it wouldn't require the device to be on the net continuously, and it might end up requiring fewer resources from the device.
Hope that helps...Apart from that...all I can suggest is read the manual, and try to find a user's group or developer's site for the device or the company that made the device.
Well, I think I'm really terrible explaining myself...because the third approach you posted I already said it on the first post :Pthanks anyway, I think I wil go with the SMS gateway that DrClap suggested, clickatell.com sounds like a great option.