Access server's serial port thru an applet

hello everyone, i am writing a program that will allow remote computer to read and write on server's serial port. currently i am in the testing stage, so i am programming everything on the same computer. i already wrote an application using java comm api to write and read on the serial port. After getting that working i continue to write an applet doing the same thing, reading and writing to the serial port locally. however, i get errors. what i ultimately want to do is allow remote users on the internet to read and write onto my computer (sever)'s serial port. Will RMI able to help me on what i ultimately want to do? do i need to access RMI even if i am running the applet locally?

I think that this is something close to what I need to do for my company. Actually what I do need to sounds pretty simple but I have not been having much luck: I need to create a webpage with an applet that will 1-read a list of file names, 2-allow the user to select one of the files and 3-read the selected file off the server and 4-stream the file down to a local printer. Basically we want to generate printer labels locally...upload them to our web server and allow our user to remotely access them via a webpage and print them. I am new to java and have been able to do this with a java applet on my local machine that reads the file off the internet and streams it down to the printer...but when I fo to put that applet on the server and try it it does not work. Any help or suggestions would greatly be appreciated. Thanks.

Similar Messages

  • Accessing the fielpoint web server using serial port

    hello everyone!
    I would like to use the fieldpoint serial port, instead of the utp port, to
    access the fielpoint internal web server. This means to have the tcp on
    serial port. Is it possible? And how can I do it?
    Thanks,
    Andrea

    There may be some hidden trick method of doing that, but usually, RS232 does not support web access. In order to use a COM port to access the web, you'd normally have to use something like PPP. I don't think there's a PPP client for FieldPoint.
    - Dan

  • Accessing server side EJB directly using remote applet

    Hello, I have some EJB's running on a sun app server and would like them to be invoked directly, if possible, by a remote applet (obviously it would be delivered from my app server). At the moment I am simply testing them using an application client returned by Deploytool.
    I am wondering how difficult this will be, particularly how the applet would look up the beans (is the Context setup similar etc.?) and whether there is a huge difference between the applet code and the app client I have been using.

    I suspected that was the issue - no way for the local system to know when to route to VPN or local.
    Problem with changing the network ranges is often the client network is not something I control - 'client' offices, wireless hotspots, hotels, etc.
    Changing the server network while not impossible would be difficult as everything from printers, servers, network switches, not to mention how X Server so easily allows changing it's primary IP, are effected.
    I can certain test that this is my only problem by reconfig'g my home setup.
    I'm guessing a simpler and more flexible option in my case is creating a 10.0.2.x (VPN only) network internally adding an alias IPs to my XServe and other servers/boxes I would need to access from VPN (which would dish out 10.0.2 client numbers instad of 10.0.1 numbers). The only tricky part is name resolution, but since I control the DNS server and search names handed to the client, I could create a vpn.ourdomain.com and that could be the primary search domain, where all the records for VPN resources would return their 10.0.2.x. Client systems would/should be referencing resources by short name (hp8150).
    Does that make sense - a VPN network on top the existing server network?
    XServe Dual G4

  • Low Level Serial Port Access

    This question has gone unanswered several times on this forum in the past but I thought I would try it once more.
    Is there any Java API that is in, or will work with J2ME to allow direct read and write to the serial port similar to the functionality that javax.comm provides for j2se.
    This would be useful for a project where a palmos device is used to communicate with equipment used to monitor industrial processes.

    Some MIDP 1.0 devices support access to the Serial
    Port.
    I have done it with Motorola i85, i50 (iDen) and
    Motorola T720i.
    I think 95cl also supports it. I'm ALSO having problems with serial port access on
    my T-Mobile Moto T720i phone. I've had MUCH success
    with the Nextel i85, i50, i95cl, etc phones, but the
    same code isn't running on the T720i.
    What do I need to do differently???
    Thanks,
    -Tim

  • Java enabled phones supporting serial port access

    Does anybody know a Java enabled mobile phone beside the Motorola iden family that supports access to the serial port ? As far as I can see there are no such phones on the market.

    simens sl45 and m50

  • Infrared / Serial ports access in MIDP for Palm

    Hello,
    Do you guys know if MIDP for Palm allows to connect to the IR / Serial ports ? If yes, any examples ?
    Thanks,
    Vadim.

    I'm very interested by your discussion, i have searched a lot of information about midp and the access to the serial port.
    The specifications of midp says that the comm protocol is not available in midp.
    The IBM J9 Java VM is supposed to be full midp implementation but only only for x86 processors. The lcdui package is not available with the J9 VM for palm. The lasts contact i have with ibm about this subject, they said that they will implement lcdui but they can't say when .... perhaps in 2002.
    I don't know any other Java VM witch have a full midp implementation ... Kada VM will be but i don't know when ...
    If you have any other information, i'm very interested
    Thanks by advance

  • Communicating Thru COM /Serial port

    Hi,
    I am developing POS system. The Display pole is connected on com1 and cash drawer on serial port. Can anyone help me how if i have a variable var_amt and want to display it on the pole[com1] what command to use i.e. how to open com / serial port thru forms.
    Thanks in Advance

    We have an old Forms application that needed to dial a modem through the serial port. Here's some code to maybe get you started. I'm going to assume you're on Windows.
    Step 1:
    Attach an OLE object to your canvas, and point that to MSCOMMLib.MSComm.1 (the MS serial port handler).
    Step 2:
    Sample code. This is our DIAL_PHONE proedure that receives a phone number, opens the COM port (in our case COM2), sends the modem dial strings, and waits for a respomse back from the mode. I'm not an expert, we just taught ourselves enough to get this one functionality to work.
    /* Receives phone string, including area code, and dials a modem on COM2. Disconnects 9 seconds
    after dialing (S7=09), assuming the telemarketer will have switched control to their headsets by then
    PROCEDURE dial_phone(phone_number IN OUT VARCHAR2) IS
    CommHandle     ole2.obj_type;     -- to hold the interface pointer
    hold          number;
    modem_init     VARCHAR2(30) := 'ATQ0V1E1S0=0X4S7=5';
    dial_string     VARCHAR2(20);
    com_err          VARCHAR2(100);
    outBuf          NUMBER;
    inchar          varchar2(100) := ' ';
    loop_count     NUMBER(9) := 0;
    dial_msg     varchar2(100);
    time_start binary_integer;
    time_end binary_integer;
    z          NUMBER := 0;
    delay      NUMBER := 100000;
    --Return from check exchange
    phone_to_dial     VARCHAR2(15);
    X VARCHAR2(15);
    BEGIN
    IF     phone_number IS NULL
    THEN     x := win_alert('OK','No phone number to dial.');
         raise form_trigger_failure;
    END IF;
    logit(:global.debug,'======== Begin DIAL_PHONE (' || phone_number || ') ==============');
    -- Check exchange #, If it's in local calling area don't use an area code. Will also
    -- add user's long distance data to the number returned, if necessary,
    phone_to_dial := check_exchange(phone_number);
    CommHandle := forms_ole.get_interface_pointer('b_main_prospect_info.mscomm_ocx');
    --Set up the dial string with the passed phone number
    dial_string := 'ATDT9' || phone_to_dial;
    dial_msg := 'Dialing ' || dial_string || '...';
    message(dial_msg,NO_ACKNOWLEDGE);
    synchronize;
    -- Set the com port to COM2.
    OLE2.SET_PROPERTY(CommHandle, 'CommPort', 2);
    -- try to close COM2, in case it was open for some reason. 0 = FALSE, -1 = TRUE
    begin
    OLE2.SET_PROPERTY(CommHandle, 'PortOpen', 0);
    exception
    when others then null;     -- if already open, ignore error
    end;
    -- Set modem to 1200 baud, no parity, 8 data, and 1 stop bit.
    OLE2.SET_PROPERTY(CommHandle, 'Settings', '1200,N,8,1');
    -- Open the port. 0 = FALSE, -1 = TRUE
    OLE2.SET_PROPERTY(CommHandle, 'PortOpen', -1);
    -- find out if the com port has opened successfully. 0 = FALSE, -1 = TRUE
    hold := OLE2.GET_num_PROPERTY(CommHandle, 'PortOpen');
    IF hold = 0 THEN --the com port could not be opened.
    X := WIN_ALERT('OK', 'Your COM2 port (modem) could not be opened. Contact your supervisor');
    RAISE form_trigger_failure;
    END IF;
    -- Send the attention command to the modem. Default setup string
    OLE2.SET_PROPERTY(CommHandle, 'Output', modem_init || chr(13));
    z := 0;
    loop
    z := z + 1;
    exit when z = delay;
    end loop;
    -- Run program that give windows control to process info. in output buffer to modem
    HOST(:global.gtec_dir || 'DEVENTS.EXE');
    --Send the dial string
    OLE2.SET_PROPERTY(CommHandle, 'Output', dial_string || chr(13));
    z := 0;
    loop
    z := z + 1;
    exit when z = delay;
    end loop;
    -- Run program that give windows control to process info. in output buffer to modem
    HOST(:global.gtec_dir || 'DEVENTS.EXE');
    --Clear the dialing string from the input buffer
    OLE2.SET_PROPERTY(CommHandle, 'InBufferCount', '0');
    * Loop until we get a BUSY or NO CARRIER signal.
    loop_count := 0;
    time_start := dbms_utility.get_time; -- store loop start in 1/100's of seconds
    inchar := ' ';
         LOOP
         -- Run program that give windows control to process info. in output buffer to modem
         HOST(:global.gtec_dir || 'DEVENTS.EXE');          
    outBuf := OLE2.GET_NUM_PROPERTY(CommHandle, 'InBufferCount');
         --Read the response data in the serial port, character by character.  Build INCHAR
    inchar := inchar || OLE2.GET_CHAR_PROPERTY(CommHandle, 'Input');
         --message(inchar);
    OLE2.SET_PROPERTY(CommHandle, 'InBufferCount', 0);
         * Check to see if a BUSY has been returned
    IF INSTR(inchar, 'BUSY') <> 0 THEN
         --Close the port
         OLE2.SET_PROPERTY(CommHandle, 'PortOpen', 0);
         -- Release the MSCOMM handle
    OLE2.release_obj(CommHandle);
         --Set the list to busy
         :b_main_prospect_info.CALL_STATUS_LIST := 'BUSY_NO_ANSWER';
         --Process a call marked as Busy/No Answer
         process_busy_no_answer;
    EXIT;
         END IF;
    IF INSTR(inchar, 'RING') <> 0 THEN
         message(inchar || ' ...', ACKNOWLEDGE);
         inchar := ' ';
         END IF;
         * Check to see if a NO CARRIER has been returned
         IF INSTR(inchar, 'NO CARRIER') <> 0 THEN -- happens when they switch to headset. No message shows.
         --message('NO DIAL TONE' || ' ...', ACKNOWLEDGE);
         inchar := ' ';
         GO_ITEM('CALL_STATUS_LIST');
    EXIT;
         END IF;
         *Check to see if a OK has been returned
         IF INSTR(inchar, 'OK') <> 0 THEN
         message(inchar || ' ...', ACKNOWLEDGE);
         inchar := ' ';
         GO_ITEM('CALL_STATUS_LIST');
    EXIT;
         END IF;
    loop_count := loop_count + 1;
    IF MOD(loop_count,1000) = 0
         THEN dial_msg := dial_msg || '.';
              message(dial_msg,NO_ACKNOWLEDGE);
              synchronize;
         END IF;
    time_end := dbms_utility.get_time;
    -- Compare current time to loop start time in 1/100's of seconds. If more than 10 seconds, end.
    if time_end - time_start > 1500
    THEN message('Problem dialing number. Result response not received from modem.', ACKNOWLEDGE);
    message(' ');
         GO_ITEM('CALL_STATUS_LIST');
    EXIT;
    END IF;
         END LOOP;
    OLE2.SET_PROPERTY(CommHandle, 'Output', 'ATH' || chr(13));
    z := 0;
    loop
    z := z + 1;
    exit when z = delay/10;
    end loop;
    --Close the port
    OLE2.SET_PROPERTY(CommHandle, 'PortOpen', 0);
    OLE2.release_obj(CommHandle);
    --Give list box focus
    update tele.gtec_login_tbl
    set last_dialed = phone_number,
    last_dialed_time = sysdate
    where v_user_id = user;
    forms_ddl('commit');
    if to_number(:global.address_id) > 0
    then GO_ITEM('b_main_prospect_info.call_status_list');
    else GO_ITEM('b_manual_call.v_call_outcome');
    end if;
    EXCEPTION
    when others then
    logit(:global.debug,'Error dialing phone');
    --Give list box focus
    if to_number(:global.address_id) > 0
    then GO_ITEM('b_main_prospect_info.call_status_list');
    else GO_ITEM('b_manual_call.v_call_outcome');
    end if;
    END;

  • Xserve serial port console

    I'm considering ordering an OpenGear console server to connect to our Xserve, for access via the serial port. The Xserve User Guide says (pg 20) to set terminal software to 56KB/s, which translates to 458 752 bits per second. The console device that I'm considering:
    http://www.opengear.com/product-cm4001-spec.html
    ...does up to 115 200bps. My question is: can the Apple serial port scale down to more standard serial communication speeds?

    You're misinterpreting the docs. The default speed it 56kbps, or 57,600 bits per second, well within the limits of the unit you're considering.

  • X4200 - static IP configuration  error (using serial port)

    I try to setup a static IP address of ILOM on a Sun X4200 server using serial port
    After login as root I use command from manual:
    set /SP/network pendingipaddress=192.168.2.123 pendingipnetmask=255.255.255.0 pendingipgateway=192.168.2.1 pendingipdiscovery=static commitpending=true
    but system say
    "invalid command syntax"
    Usage: set [target] <property>=value> [<property>=<value>...]
    Problem is with "commitpending" command but i don't know why, anyone know the possible reason?
    Sincerrelyy
    Cyprian Sawicki

    I try to setup a static IP address of ILOM on a Sun X4200 server using serial port
    After login as root I use command from manual:
    set /SP/network pendingipaddress=192.168.2.123 pendingipnetmask=255.255.255.0 pendingipgateway=192.168.2.1 pendingipdiscovery=static commitpending=true
    but system say
    "invalid command syntax"
    Usage: set [target] <property>=value> [<property>=<value>...]
    Problem is with "commitpending" command but i don't know why, anyone know the possible reason?
    Sincerrelyy
    Cyprian Sawicki

  • J2SDK1.5.0 (beta) - serial port support?

    Hello,
    das this version of the JDK support the access to the serial port (OS --> Windows)??

    I mean does it support the access to the serial port, after installing the javacomm20-win32.zip ?
    Or is there any other posible solution to my problem?
    Does anybody know if a new (or updated) version of the javacomm20-win32.zip does exist, or if a new version of this "programm" will be released before july ?

  • Setting serial port in wine

    Hi.
    I installed wine with pacman -S wine.
    I used script from sidenet to configure it.
    I would like to have access to my serial port /dev/tts/USB0 and I added in config in .wine
    [serialports]
    "Com1" = "/dev/tts/USB0"
    but the serial port is still not recognized from my win programms.
    I believe it must be related with adding a win.ini entry but I don't know what to add.
    Can anyone help me?
    Thank you in advance.

    Hi Steven,
    Depending on the serial port, there are several ways to get the memory address of your serial port. If you have a non-plug and play AT serial board, you would manually set the I/O address (via jumpers or switches in most cases). If you are using a built-in serial port,look at your motherboard specs for built-in ports. Otherwise, open the windows device manager, find the port and look at the resources page. After finding this base address, it does not correspond directly to pins. The I/O range is something like 03F8-03FF and that corresponds to the registers that are required to program a 16C550 UART in most cases, but you would need to know what you are doing. If you put in the wrong I/O address you have the potential to destroy your computer because you are writing values in the kernel which has access to the entire computer (hard drive, video driver, etc). There is NO bounds checking.
    If you want to see what damage you could do, open the device manager, and click on View->Resources by type. Expand the I/O folder and you can see all of the things you don't want to accidentally write to: the PCI bus, the system timer, the DMA controller, etc. That one little VI can write to any one of those, and it won't check to see if it's safe. Be careful.
    I would suggest using VISA instead. Read and write these from the VISA property nodes. It is much safer, and you don't have to manually look up the I/O range in the device manager before you get ready to use a port every time. And VISA should be easier.
    I hope this helps.
    Regards,
    Missy S.
    Calibration Engineer
    National Instruments

  • Sunfire E4900 Console Login by Serial port

    How to login in console of SUNFIRE E4900 server by serial port ? Exactly which cable is required to connect with laptop usb ?
    I dont have netmanagement IP.

    Corret.
    You use 25 male connector for connect to SC, DB9 female connector for connect to USB converter, but this cable must be null-modem.
    Minimum required connections:
    DB25 DB9
    2 ---- 2
    3 ---- 3
    7 ---- 5
    Regards.

  • COMMAPI freeing serial port

    I have a question about Java commapi and serial ports. In my application I call close on a SerialPort object and associated input/outputstreams. Later on I try to open the port again by calling open on a CommPortIdentifier object and I get a RuntimeException with message "Device busy". If I close the application and start it again, the serial port is opened without problems. My question is should I do something more when closing the port to free it?
    Code that tries to close the port:
    inStream.close(); //inputstream
    outStream.close(); //outputstream
    inStream=null;
    outStream=null;
    port.close(); //SerialPort
    port.removeEventListener();
    port=null;My platform is Sparc Solaris 10.
    Thanking you in advance,
    Anguinus

    I know this is a very old post, but google came up with it after searching for ttyUSB0 and java, so I thought I'd chip in the solution so that other people arriving here might benefit :)
    The trick is to go into javax.comm.properties and add the ttyUSB0 to the list of serial ports:
    # Implementation specific driver
    driver=com.sun.comm.LinuxDriver
    # Paths to server-side serial port devices
    serpath0 = /dev/ttyS0
    serpath1 = /dev/ttyS1
    serpath2 = /dev/ttyUSB0               # <--- added ttyUSB0
    # Paths to server-side parallel port devices
    parpath0 = /dev/parport0
    parpath1 = /dev/parport1Works fine for me

  • How to access serial port using servlet

    I want to communicate with a microcontroller connected to the serial port of my computer.
    *I am using the following:
    Windows 98 operating system
    Tomcat web server 4.1
    *The directory structure is as given:
    Tomcat 4.1/webapps/myjsp/web-inf/classes/remoteservlets.
    I have placed my jsp files in my jsp folder and classfiles in remote servlets folder.
    **my java program has compiled correctly.**
    ** my simple java application which accesses the serial port works fine.***
    *when I start tomcat I am able to access the sevlet as the servlet responds with the button name i have pressed.
    **** I have also tried the following
    Copied file comm.jar in <JAVA_HOME>\jre\lib\ext
    Copied file javax.comm.properties in <JAVA_HOME>\jre\lib
    Copied file win32com.dll in <JAVA_HOME>\lib and also in c:\windows\system32 and c:\windows\system
    ***************which helped me do away with errors.
    still I don't get any output. I dont get any errors either.
    PLEASE HELP. URGENT. i am at my wits end.
    Thank you.

    Servlet is the one which runs in the server side...if u want to comunicate with the serial port of the server in which ur servlet is running can be done but making use of Communication api available....
    U can download the Api from http://java.sun.com/products/javacomm/index.jsp
    There are three levels of classes in the Java communications API:
    High-level classes like CommPortIdentifier and CommPort manage access and ownership of communication ports.
    Low-level classes like SerialPort and ParallelPort provide an interface to physical communications ports. The current release of the Java communications API enables access to serial (RS-232) and parallel (IEEE 1284) ports.
    Driver-level classes provide an interface between the low-level classes and the underlying operating system. Driver-level classes are part of the implementation but not the Java communications API. They should not be used by application programmers.
    regards
    shanu

  • Applet serial port

    Hello All,
    I need to write an Applet that talks to a serial port and sends some
    information back to the server. Is it possible for an applet to talk to a serial port? If yes, how can I approach it?
    Has anyone done these before? Please give me some hints.
    Thank you so much, MJ.

    It's possible.
    Just use javacomm2 api in your applet. Then you must signe your applet with jarsigner.
    Non signed applet don't working.
    thank's to irene67 and revinkeving1
    see : http://forum.java.sun.com/thread.jsp?forum=63&trhead=132769
    see : http://forum.java.sun.com/thread.jsp?forum=30&trhead=134099

Maybe you are looking for

  • Sound does not work

    I know this is a frequent topic, but i couldn't find the answer in wiki or anywhere else. I have a fresh installation of arch, everything works fine except sound. [root@jachym jachym]# hwd -s|grep Sound Sound(a) : 82801I ICH9 Family HD Audio Controll

  • How to use colspan in data table?

    I have a requiremnt like using colspan in data table. I heared it is possible with some javascripting code . I s it true. If possible pleese send that code.

  • Microsoft word not working........

    Hey guys, i just tried to open microsoft word, it was working about 4 days ago and now it says, The application "Word" could not be launched because of a shared library error: "4<Microsoft Word><CarbonLib><CFMPriv_OpenScripting>". i dont know what ha

  • For VxWorks, the environment can't be used under the dosFs filesystem?

    My dosFs filesystem was created in pentium BSP. I could operate the BDB under my dosFs filesystem without Environment. But when I operae the BDB with the Environment, I got the error message following: unable to join the environment Environment open

  • REstore computer and iTunes settings

    I am using iTunes 6.0 and have many podcasts ( audio and video ) and have gone through all 10,000 of my mp3s and check marked the ones I want to be transferred to my 5g 60GB iPod. I have to REDO my computer and plan to format it completely. Is there