Return channel in MHP

Hello,
I've connected a modem in my set-top-box and I want to connect the modem of my set-top-box with the modem of my computer. It's like communicating two computers (each with a modem) with a "hyperterminal".
I think you know what I'm talking about... :)
I use this code:
public class RChannel implements Xlet, ResourceClient, ConnectionListener {
   public void initXlet(XletContext ctx) throws XletStateChangeException {
      try {
         ConnectionRCInterface cif = getConnectionRCInterface();
         cif.addConnectionListener(this);
         cif.reserve(this,null);                             
         cif.setTarget(new ConnectionParameters("67740", "user", "password", "10.95.32.4"));
         System.out.println("Trying to connect...");
         cif.connect();
         System.out.println("Connected?");
      catch (Exception e) {
         System.out.println(e);
}Then, when I invoke: cif.connect(); I get a message tell me that the connection is established, but after somer seconds I get another message tell me that the connection was refused.
I don't know why the modems cannot connect or why they disconnect after some seconds. Any idea?
And how send and receive data in the modem of my set-top-box? How can I do it in MHP?
Thanks in advance.

The modem in the PC may be accepting calls, but does the STB need some special information in order to use it effectively? After all, the STB still needs to configure an IP address and networking information for the modem connection.
It sounds to me like it's a problem where the modem is connecting (i.e. the call is being accepted by the PC) but then some other part of the process (authentication or IP address configuration) isn't working properly.
It may be worth talking to the STB vendor and seeing if their MHP implementation has any special requirements on the call collector that's used for their STB. It's more common with closed middleware, but they may be able to provide some more information.
Steve.

Similar Messages

  • MHP serial return channel

    Does anyone know how to use the serial port present in some set-top boxes?
    Is it a RS232 serial port?
    It's intended to provide a way of using other return device than a modem, but since the MHP spec. only defines that the return channel is a TCP/IP connection and the basic connection handle API, I don't know how to setthe return channel to be by the serial port.
    I also need direct access to it, not over TCP/IP, but using streams or something like. Has anyone written some code to talk to this port, or can indicate me som documentation references?

    There is requirement that an MHP box support an RS232 port, hence there are no standard API's to support it. All the Debug boxes I've seen use a serial port for debug (uploading xlets to debug are reading back trace messages written to standard out).
    If you want to use the return channel you'll need to look at the org.dvb.net.rc packages to set up the return channel. For example use:
    RCInterfaceManager.getInstance().getInterfaces();
    to find out what return channel hardware you've got attached to your STB. After you've set up the connection you can use the standard java.io and java.net packages to talk to your remote server.
    Hope this helps,
    Roger

  • Write Files through return channel

    Hi,
    i'm newer in this forum. I'm working in a MHP project, and I want to comunicate STB with the server (in this case, a PC running Apache Server).
    The question is �can I write a file in the server with data obtained on the STB? I think that it is posible via return channel, but i'm not sure. The idea is to write file (on the server) with the solutions entered by TV user in an application that have some tests. �Are other ways besides return channel to do it?
    Thanks ;)
    Regards

    Hello here you an example of login in my application:
    package es.admin.servlet;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import es.admin.bd.PacienteBD;
    import es.admin.beans.Paciente;
    import es.admin.dao.PacienteDAO;
    * Servlet implementation class for Servlet: LoginPatient
    public class LoginPatient extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
       static final long serialVersionUID = 1L;
        /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#HttpServlet()
         public LoginPatient() {
              super();
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              processRequest(request,response);
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              processRequest(request,response);
         private void processRequest(HttpServletRequest request,HttpServletResponse response) throws IOException
              Paciente paciente = new Paciente();
              paciente.setDni(request.getParameter("dni"));
              paciente.setContrasenia(request.getParameter("contrasenia"));
              boolean ok = PacienteBD.compruebaPaciente(paciente.getDni(),paciente.getContrasenia());
              response.setContentType("text/plain;charset=UTF-8");
              PrintWriter p = response.getWriter();
              if (ok)
                   p.println("true");
              else
                   p.print("false");
    public class PacienteBD {
         public static boolean compruebaPaciente(String dni,String password)
              boolean correcto = false;
              Paciente aux = PacienteDAO.BuscarPaciente(dni);
              if ((aux!=null)&&(aux.getContrasenia().equals(password)))
                   correcto = true;
              return correcto;
    }then you use from the java code :
    new URL ("http://admin/login?usuario=xxx&passw=xxx")
    thats all

  • Connect to Return channel: ERROR

    Hi everyone,
    I am testing return channel, using code as following:
    try {
    myRCInterface.reserve(null,null);
         myRCInterface.setTarget(new ConnectionParameters("1269", "vnn1269","vnn1269"));
         myRCInterface.connect();
    //...Here is something for exchange data beetwen receiver and server
    myRCInterface.disconnect();
         myRCInterface.release();
    catch(IncompleteTargetException e)
         System.out.println("IncompleteTargetException: " + e.getMessage());
    catch(PermissionDeniedException e)
         System.out.println("PermissionDeniedException: " + e.getMessage());
    When i test this code on DTT-4500 stb, error occurs just at line myRCInterface.setTarget(...): PermissionDeniedException:null
    I wonder if this code is wrong? or modem of my stb is fault?
    Please tell me why this error occurs?
    I also need help for DTT-4000 much. The function "Modem Test" of this stb always says "connected successfully" while dialing to any phone number (even unavailable numbers).
    What i know is that DTT-4500 are sold mainly in Italia. If someone in Italia or have used this stb, please tell me how to setup modem for it.
    Thanks alot,
    Nghia.

    hi,
    this is quite weird, because it looks like resource reservation did not succeed. but failure to reserve should be reported during the call to reserve().
    this looks pretty much like a bug in the stb (well, this is theoretically possible that something reserved the modem just after your reserve, but very unlikely), but maybe it has something to do with the NULL ResourceClient you pass to reserve() - i think you shouldnt do it, because behavior of reserve() with NULL argument is unspecified. I suggest you write something like
    myRCInterface.reserve(new ResourceClient() { void notifyRelease(ResourceProxy proxy) { ... } ... and so on.
    try this and see if it helps.
    is this is development stb or one from a store shelf? i wonder because later you may hit SecurityException, as access to modem is restricted to applications signed with a certificate, which you will not have unless you have a dev. stb. i dont know that stb, but you may lucky because mhp security model didnt actually survive in the italian dtt market, so maybe there wont be any problem.
    cheers

  • Starting event on a server from a STB via return channel - possible?

    Hello!
    I try to create an application in MHP to send an emergency-call via a STB.
    The STB is permanently connected to a server (intranet). Now I want to launch an event (popup-window, playing sounds, etc.) on the server via the STB.
    I thought of RPC, but didn't get it to work.
    I am able to write files on the server (via FTP). Is ist possible to monitor a directory and kick an event if a file is created?
    Thanks for help!

    It's certainly possilbe on the server side. This is more a question of how your server software is implemented and whether doing this imposes too much of a load on your server.
    I'm surprised that you couldn't get RPC to work. The return channel connection in an MHP box should support any IP traffic, although you will have to implement most of the protocol yourself.
    Steve.

  • Return channel implementation in different STB

    Hi everybody!
    We are testing our application in three different Set Top Boxes (A)Samsung DTB-S500F, B) Philips DTR4600 and C) Humax DTT-4000).
    According to the standard "On devices whose return channel can be connected or disconnected, connecting a java.net.Socket or a java.
    net.URLConnection to a host addressed via the return channel shall automatically setup a connection to the default connection target subject to the application having return channel permission for the default ISP. Such connections shall be automatically isconnected after a time out period defined in the Navigator.".
    When I try to get a Socket in STBs B and C, I must reserve the return channel, connect it and then I can get the socket. But when doing this with STB A, the application fails because the STB tries to reserve and connect the return channel himself.
    I have notice different behaviours in other aspects, such as HSinglelineEntry.
    I suppose that according to the standar, STB A is the correct one; but our application should work on every STB. Any suggestion on what line should we follow? Should we respect the standard and expect that in future every STB will respect it, or should we add some kind of tricks to the code in order to avoid this kind of situations?
    Thanks.

    maybe we can help.
    i have a ?
    did u getting application menu at sceen. ?
    i need to see your DB defult , u may have a variable in wrong position.
    if u eed help, just let me now..
    good day

  • Return channel problem

    Hi guys,
    I have a little problem.
    I am tring to use the return channel. I have an ADB STB.
    My main class try to create the connection using the singleton class RCInterfaceManager. It get a ConnectionRCInterface object and then I use reserve and connect method to establish the connection.
    My main class implements the ResourceClient interface so I pass this object as paramether in the reserve calling.
    I set the new connection target using the ConnectionParameters class.
    The problem is that the application try to dial with the external server and after a few second receives a PPP busy error in the log file.
    What is wrong?
    Thanks to all

    Hi guys,
    I have a little problem.
    I am tring to use the return channel. I have an ADB
    STB.
    My main class try to create the connection using the
    singleton class RCInterfaceManager. It get a
    ConnectionRCInterface object and then I use reserve
    and connect method to establish the connection.
    My main class implements the ResourceClient interface
    so I pass this object as paramether in the reserve
    calling.
    I set the new connection target using the
    ConnectionParameters class.
    The problem is that the application try to dial with
    the external server and after a few second receives a
    PPP busy error in the log file.
    What is wrong?
    Thanks to allHi
    I am trying to get connection with the return channel with a development STB(ADB). I am using this code:
    RCInterfaceManager rcm =
    RCInterfaceManager.getInstance();
    RCInterface[] interfaces = rcm.getInterfaces();
    if (interfaces[0] instanceof ConnectionRCInterface) {
    ConnectionRCInterface myInterface;
    myInterface = (ConnectionRCInterface)interfaces[0];
    try {
    myInterface.reserve();
    ConnectionParameters myConnectionParameters;
    myConnectionParameters = new ConnectionParameters
    ("0199604235697", "username", "password");
    myInterface.setTarget(myConnectionParameters);
    myInterface.connect();
    myInterface.disconnect();
    myInterface.release();
    } catch (permissionDeniedException e) {
    return;
    else {
    } Here there is the log file:
    [1#1] Trying to connect default return channel...
    connected.
    link up...
    waiting up to 30s for IPCP to come up...
    ppp: PPP_EV_PEER_REFUSE
    Disconnecting modem. IPCP is down.
    ppp: PPP_EV_ALREADY_CLOSED
    [1#1] Default return channel connection failed.
    [1#1:2] java.net.SocketException: ECONNABORTED - Software caused connection abort
    [1#1:2] at java.net.PlainSocketImpl.doConnect()
    [1#1:2] at java.net.PlainSocketImpl.connectToAddress()
    [1#1:2] at java.net.PlainSocketImpl.connect()
    [1#1:2] at java.net.Socket.<init>()
    [1#1:2] at java.net.Socket.<init>()
    [1#1:2] at sun.net.NetworkClient.doConnect()
    [1#1:2] at sun.net.www.http.HttpClient.openServer()
    [1#1:2] at sun.net.www.http.HttpClient.openServer()
    [1#1:2] at sun.net.www.http.HttpClient.<init>()
    [1#1:2] at sun.net.www.http.HttpClient.<init>()
    [1#1:2] at sun.net.www.http.HttpClient.New()
    [1#1:2] at sun.net.www.protocol.http.HttpURLConnection.connect()
    [1#1:2] at lib.utility.Connessione.<init>()
    [1#1:2] at viasi.XletNazioni.inCaricamento()
    [1#1:2] at viasi.XletNazioni.paint()
    [1#1:2] at java.awt.Container.paint()
    [1#1:2] at org.havi.ui.HScene.paint()
    [1#1:2] at org.havi.ui.HScene.update()
    [1#1:2] at sun.awt.otk.ComponentModel.handleEvent()
    [1#1:2] at java.awt.Component.dispatchEventImpl()
    [1#1:2] at java.awt.Container.dispatchEventImpl()
    [1#1:2] at java.awt.Window.dispatchEventImpl()
    [1#1:2] at java.awt.Component.dispatchEvent()
    [1#1:2] at java.awt.EventDispatchThread.run()
    What's the problem?Can you help me?

  • Return channel

    I'm developing the return channel. I use a STB with standard modem.
    But the connection failed.
    This is my code:
    RCInterfaceManager rcm = RCInterfaceManager.getInstance();
    RCInterface[] interfaces = rcm.getInterfaces();
    myInterface = (ConnectionRCInterface) interfaces[0];
    //HERE I reserve the interface using the method
    //reserve(ResourceClient resourceClient, Object obj)
    //but I just declare the implement of ResuorceClient in my
    //connection class.
    //All the methods are empty!!!!(COULD BE A PROBLEM???):
    //implements ResourceClient
    //public void notifyRelease(ResourceProxy rsPrx)
    //public void release(ResourceProxy rsPrx)
    //public boolean requestRelease
    //(ResourceProxy rsPrx,java.lang.Object requestData)
    //return true;
    myInterface.reserve(this, null);
    myInterface.setTargetToDefault();
    //I make the call to a ISP from an internal phone line.
    //So I have to use the "0," before the number to the provider
    //Could be the cause of the failure???
    ConnectionParameters myConnectionParameters;
    myConnectionParameters = new ConnectionParameters("0,0643xxxxxxx", "XXXXXX", "XXXXXXXXi");
    myInterface.setTarget(myConnectionParameters);
    myInterface.connect();
    // HERE I do everithing with the connection
    myInterface.disconnect();
    myInterface.release();
    Another question is: can I use ALL providers (for example one that I use with my pc) or I have to search a particular PROVIDER for STB?
    Is it too much what I' m asking??
    JUST IF YOU 'RE HERE : THANK YOU

    I'm developing the return channel. I use a STB with standard modem.
    But the connection failed.
    This is my code:
    RCInterfaceManager rcm = RCInterfaceManager.getInstance();
    RCInterface[] interfaces = rcm.getInterfaces();
    myInterface = (ConnectionRCInterface) interfaces[0];
    //HERE I reserve the interface using the method
    //reserve(ResourceClient resourceClient, Object obj)
    //but I just declare the implement of ResuorceClient in my
    //connection class.
    //All the methods are empty!!!!(COULD BE A PROBLEM???):
    //implements ResourceClient
    //public void notifyRelease(ResourceProxy rsPrx)
    //public void release(ResourceProxy rsPrx)
    //public boolean requestRelease
    //(ResourceProxy rsPrx,java.lang.Object requestData)
    //return true;
    myInterface.reserve(this, null);
    myInterface.setTargetToDefault();
    //I make the call to a ISP from an internal phone line.
    //So I have to use the "0," before the number to the provider
    //Could be the cause of the failure???
    ConnectionParameters myConnectionParameters;
    myConnectionParameters = new ConnectionParameters("0,0643xxxxxxx", "XXXXXX", "XXXXXXXXi");
    myInterface.setTarget(myConnectionParameters);
    myInterface.connect();
    // HERE I do everithing with the connection
    myInterface.disconnect();
    myInterface.release();
    Another question is: can I use ALL providers (for example one that I use with my pc) or I have to search a particular PROVIDER for STB?
    Is it too much what I' m asking??
    JUST IF YOU 'RE HERE : THANK YOU

  • OCAP Return Channel - Xlet Server Communication Problem??

    Hi,
    I am trying to connect Xlet to App Server. I have tried with the Socket and HttpURLConnection both are working fine but i am looking for OCAP API's only through which Xlet can commnicate with the App Server like MHP does.
    thanks

    Hello friends can we expect at least a interest here...

  • Does the 32C120U support Audio Return Channel?

    Hi,
    setting up my first home theater with a 32C120U & cannot find any reference in the manual to ARC.  May I assume then that the 32C120U does not support ARC?
    Basically trying to find out if a Toslink is required with a Yamaha RX-V373 receiver - all HDMI connections.
    thanks

    If they are mp3 you could change the settings for the files in iTunes to remember playback position by highlighting the files and rightclicking and going to "Get Info".   If not there are some apps such as OverDrive Media that will support downloading and playing audiobooks (some free at that) through services provided by some local libraries and OverDrive themselves.

  • Return channel, problems trying to connect

    Hello.
    I am trying to connect my STB and a local PC. I am using an internal modem in my PC in COM3 and my STB is a ADB. The modem tries to connect but then fails saying that the line is occupied but i make a call to reserve before. This is the debug exit:
    NET: (ppp) Preparing Dial-up connection with XT986473723...
    NET: (modem) dialing...
    MDM_GetLineStatus() MDM_LINE_IS_NOT_CONNECTED || MDM_LINE_IS_IN_USE
    NET: (modem) not connected.
    And this is the relevant code that I am using:
           RCInterfaceManager rcm = RCInterfaceManager.getInstance();
            RCInterface[] interfaces = rcm.getInterfaces();
            ConnectionRCInterface myInterface;
            myInterface = (ConnectionRCInterface)interfaces[0];
            try {
                myInterface.reserve(this,null);
            } catch (PermissionDeniedException e) {
                log("Permiso denegado al interfaz");
            ConnectionParameters myConnectionParameters;
            myConnectionParameters = new ConnectionParameters
            ("986473723", "username", "password");
            try {
                myInterface.setTarget(myConnectionParameters);
            } catch (IncompleteTargetException e) {
                log("Error: "+ e.getMessage());
            } catch (PermissionDeniedException e) {
                log("Error: "+ e.getMessage());
            try {
                myInterface.connect();
            } catch (IOException e) {
                log("Error: "+ e.getMessage());
            } catch (PermissionDeniedException e) {
                log("Error: "+ e.getMessage());
            }

    Do not connect your PC's modem directly to the STB's modem port. Use a mini PABX in the middle instead. You can find some for eur 100 or less. Make sure you program it to redirect number 0 or 1 to your PC's modem and use that number from your code.

  • XML content in MHP-Xlet

    Hello!
    I am working on a MHP-application that contacts a server and loads an XML-file, but I have problems, sorting and displaying the XML-content in my Xlet.
    I am using nanoXML to parse the file and via the debug-output of my STB (or the IRT-SW-box) I can see, that this is succesful - but I have no idea how to fill a text-area with the content of my XML-file.
    Has anybody done something like that? And is it possible to write XML-files on a server via the back channel? Maybe with FTP?
    Thanks a lot!

    To answer the other part of the question, it is possible to write files to a server over the return channel. You will need to implement the protocol yourself, however, so in the FTP example you would have to include a simple FTP client in your application.
    Depending on your needs, you may want something more secure than FTP, but this is obviously a design decision for your project.
    Steve

  • MHP to home network connectivity

    Hello,
    I have a case where I want to connect from an MHP box to the home network. Say I want to connect to my home PC to transfer some data from the box. Is my only option going through the return channel and the providers servers, create a socket to my home PC and transfer through there? Seems like a bit of a long way to go if they are actually sitting next to each other.
    Also, are there any good docs available on the limitations of the MHP as opposed to the full Java SDK on a PC? I have read plenty of docs but am yet to see an explicit coverage on this topic. Any help and references would be great.
    thanks,

    The SDK-MHP differences are listed in the MHP spec it seems. Its just 1080+ pages so a bit much but buried in there. Thats where I found the differences. I guess you are more interested on the MHP-home network connectivity though.
    As for accessing the home network I haven't really found anything clearly stated on that. I will need to do some testing on that myself I guess and make do with using the sockets like the examples do until I find clear answers from somewhere. I'm not sure how to test it though since using the dev kit is not a good example for me as it is all located in the same room. That is even the return channel goes to the same room so it might seem to work even if it doesnt if that makes sence. Someone did tell me it should be easy but I think they regarded it as the same as connecting from any networked device and didn't really have exact knowledge on it. So remains to be seen. Let me know if you find something :).

  • MHP and access to Databases

    Hello, I'm developing a MHP 1.0.3 application with Osmosys. The application provides patient the posibility to book an appointment with their hospital. I have finish the GUI of my applicattion and now I'm working in another issue.
    I need to connect to a database to read some fields of a table (where I have stored some information about the hospital). I think that I need JDBC Optional Package CDC. Am I right?
    About Databases: Do I need to work with Db4o or can I choose MySQL?
    Obviously I have and ADSL connection to work with the return channel.
    If somebody has an code example about this, post it please.
    Thank you

    Here you are an example of reading some text from a servlet that access to a database:
    I have copied this method from: http://www.cineca.tv/labs/mhplab/index-en.html
    public static String readHttp(String s)
    String s1 = null;
    if(connected)
    try
    URL url = new URL(s);
    HttpURLConnection httpurlconnection = (HttpURLConnection)url.openConnection();
    httpurlconnection.setDoInput(true);
    LineNumberReader linenumberreader = new LineNumberReader(new InputStreamReader(httpurlconnection.getInputStream(), "UTF-8"));
    s1 = "";
    String s2 = linenumberreader.readLine();
    do
    if(s2 == null)
    break;
    try
    s1 = s1 + s2 + "\n";
    s2 = linenumberreader.readLine();
    continue;
    catch(Exception exception1) { }
    break;
    } while(true);
    System.out.println("MXRc:response: " + s1);
    httpurlconnection.disconnect();
    catch(Exception exception)
    exception.printStackTrace();
    System.out.println(exception);
    return s1;
    The URL is the string that you use to access to your servlet, you always may use GET method to send explicitely the parameters: http://localhost/WebApp/Servlet?param1=3324&param2=23423....
    If the servlet returns a String you can obtain it via readHTTP method,ok?
    If you have more problems ask me again
    Abel

  • TV channel and application launching

    Hello to everybody,
    Does anybody know if it is possible to launch an xlet without the need of beeing previously broadcasted? I mean, Is it necessary having the broadcaster figure to run a MHP application in a real environment?
    What I am talking about is the possibility of running xlet in a STB as if I have PC application. Is it possible?
    Thank-you everybody
    Juanpa

    Built-in applications are supported by MHP (e.g. an MHP application that is put in to the box by the STB vendor). These can appear just like any other MHP application, although how you launch them is defined by the STB vendor - maybe through the same mechanism that you use for launching other (broadcast) applications, maybe not.
    MHP 1.1. does add support for storing applications on the receiver, but these must still be signalled in the broadcast stream and will usually be downloaded from the broadcast stream as well (downloading them over the return channel is possible, but I'm not sure how widely supported it would be).
    In theory, it would be possible to build a service that lets you download and store applications on your STB, but there are a number of things that make this impractical. Stored applications in MHP are normally intended to be used as a way of caching files to improve startup times, and so an application may get automatically deleted when the receiver needs more space. There is also the problem that stored applications may conflict with broadcast apps, and so there is the potential for a lot of interoperability problems. Finally, there is the basic problem that MHP 1.1 is not deployed anywhere at the moment, and there does not appear to be any major push towards launching it.
    Generally, there is no way of instaling or running an Xlet on your set-top box that does not rely on the broadcaster or the STB manufacturer (development systems are an obvious exception to this, and I'm not considering from the for now). Consumers downloading MHP xlets from a web site and installing them on their STB is not going to happen in the forseeable future.
    Steve.

Maybe you are looking for