Help needed in serial port connection

I tried to write a midlet such that an emulator can get images from a webcam which shall is attached to the serial port of a cell phone. But I always get the following error message:
IOException:javax.microedition.io.ConnectionNotFoundException: The requested protocol does not exist comm:0;baudrate=9600
My code appears as follows:
InputConnection cc;
DataInputStream inc;
static byte img_data[];
static int frame_len = 30000;
public void start()
try
System.out.println("I am here:");
cc = (StreamConnection)Connector.open("comm:0;baudrate=9600");
//************* I can't pass through here
//I also try to use
//cc = (StreamConnection)Connector.open
//("comm:0;baudrate=9600;bitsperchar=8;stopbits=1;parity=none");
// to do it, but get same problem
inc = new DataInputStream(cc.openDataInputStream());
inc.readFully( img_data);
catch (IOException e)
{   System.err.println("IOException:" + e);  }
finally
// free up the I/O stream after use
try { if (inc != null ) inc.close(); }
catch (IOException ignored) { System.err.println ("Exception:" + ignored); }
// free up the connection after use
try { if ( cc != null ) cc.close(); }
catch (IOException ignored) { System.err.println("Exception:" + ignored); }
System.out.println("I am ok:");
Does anybody know some reasons that probably lead to this error.
thanks in advance

well, as i know, midp 1.0 does not support serial connections, actually, any connection type other than http connection.
this is my problem noeadays too, is it practically possible to use serial connection under midp.
have you had any improvements since than?

Similar Messages

  • Help needed, example (serial port) streams module not working.

    I am trying to make work the tblt.c example of a streams module on Solaris 8.
    This sample is the one provided by Sun in it's Driver Dev. Kit.
    My test program gets blocked in the I_PUSH ioctl (after having successfully
    poped ttcompat and ldterm).
    Debug prints in the module tell me that the tbltopen() stays in the loop
         * Now wait for it. Let our read queue put routine wake us up
         * when it arrives.
         while (tbltd->tbltd_flags & TBLT_IOCWAIT) {
              if (!qwait_sig(q)) {
                   lwp_error = EINTR;
                   goto error;
    done, after
    iocb = (struct iocblk *)mp->b_wptr;
         iocb->ioc_count = sizeof (struct iocblk);
         cb = (struct termios *)datap->b_wptr;
         cb->c_iflag = 0;
         cb->c_oflag = 0;
         cb->c_cflag = CREAD|CS8|B9600;
         cb->c_lflag = 0;
         bzero((caddr_t)cb->c_cc, NCCS);
         datap->b_wptr += sizeof (*cb)/(sizeof (*datap->b_wptr));
         mp->b_cont = datap;
         tbltd->tbltd_flags |= TBLT_IOCWAIT;     /* indicate that we're */
         tbltd->tbltd_iocid = iocb->ioc_id;     /* waiting for this response */
         (void) putnext(WR(q), mp);
    (used to set baudrate, I suppose)
    and only a Ctlr-C of my test prog. makes it return via
    lwp_error = EINTR;
                   goto error;
    A few years ago, I had no trouble with the same Solaris 5 example.
    and my hardware (tablet + cable) works fine on a Solaris 5 system.

    darren,
    thanks for your help here and over on comp.sys.solaris. ultimately the problem was portmon on ttya, and i think i know how it happened. the machine was set up with a keyboard and monitor, and ttya was enabled using admintool. later, with the machine headless, the console was changed over to ttya via eeprom, which produced the conflict i noted above.
    solution:
    # pmadm -l
    PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC>
    zsmon ttymon ttyb u root /dev/term/b I - /usr/
    bin/login - 9600 ldterm,ttcompat ttyb login: - tvi925 y #
    zsmon ttymon ttya u root /dev/term/a - - /usr/
    bin/login - 9600 ldterm,ttcompat neo ttya login: - vt100 y #Terminal
    # pmadm -d -p zsmon -s ttya
    # pmadm -l
    PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC>
    zsmon ttymon ttyb u root /dev/term/b I - /usr/
    bin/login - 9600 ldterm,ttcompat ttyb login: - tvi925 y #
    zsmon ttymon ttya ux root /dev/term/a - - /usr/
    bin/login - 9600 ldterm,ttcompat neo ttya login: - vt100 y #Terminal
    # echo $TERM
    sun-color
    # svccfg
    svc:> select system/console-login
    svc:/system/console-login> setprop ttymon/terminal_type = "vt100"
    svc:/system/console-login> exit
    # echo $TERM
    vt100
    also see
    http://www.bordergatewayprotocol.net/jon/helpful_stuff/solaris/solaris-advanced-sysadmin-guide/ch09/181-186.html

  • Establishing serial port connections through J2ME

    Respected Friends,
    I wanted to establish a connection with the serial port through my J2ME application.I am writting the following code it compiles(build) successfully but it is throwing exception which means that the Sun's J2ME wireless toolkit does'nt supports serial port connection,can any one please tell me the reason why the toolkit is not supporting serial port and if there is any mistake in the code what is it,I am using J2ME Wireless toolkit 1.0(Version 1.0) the code is as follows:
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import java.io.*;
    public class TestSerial extends MIDlet implements CommandListener
    Form form1;
    TextField tf1;
    Display disp1=null;
    Command command1;
    StreamConnection sc;
    OutputConnection oc;
    Connection connection1;
    /****************************DefiningConstructor*****************************/
    public TestSerial()
    disp1=Display.getDisplay(this);
    command1=new Command("Start",Command.OK,1);
    form1=new Form("Serial Port Connection");
    form1.addCommand(command1);
    form1.setCommandListener(this);
    public void startApp()
    disp1.setCurrent(form1);
    public void pauseApp()
    public void destroyApp(boolean b)
    public void commandAction(Command c,Displayable d)
    if(c==command1)
    try
    /************Establishing serial port connection****************/
    connection1= Connector.open("comm:0;baudrate=9600");
    connection1.close();
    catch(Exception e)
    System.out.println(e.toString());
    }Please mail your precious suggestions regarding this problem as soon as possible.
    Thanking You,
    Taqi Raza.

    I am not sure about sun wireless toolkit 1.0,
    check the settings, -> permissions... (We have this in sun wireless toolkit 2.3, where i can set the security options)
    Hope it helps...

  • Hello Forum, you need a serial ports for software icprog to program EPROM and Pic

    Hello Forum, you need a serial ports for software icprog to program EPROM and Pic.I was wondering if this or a similar card is compatible with my Lenovo Desktop h50-50 -->  -> PCI-E 2 serial ports and 1 parallel port PCI-Controller Card 3 Port ► http://fli.zz.mu/cut/scheda-pci-e-2-porte-seriali-1-porta-parallela .
    My my Lenovo Desktop h50-50 upgrade to win 10,  If it is not compatible to win 10. I could use it too virtualizing win Xp? Thank since TIME FOR ANSWERS, I apologize for my bad English.
    THANK Joe  

    Unfortunately, no Sanyo phones are iSync compatible so you will not be able to synchronize your Contacts and Calendars with the phone.
    Also, you may have problems with the Bluetooth adapter you purchased, as the only one officially supported by Apple for use with Macs is the D-Link DBT-120.
    The Official Apple list of iSync compatible devices is here:
    http://www.apple.com/macosx/features/isync/devices.html
    It's always a good idea to check this list before purchasing a new phone.
    Other phones are supported by third party plugins from here and here. But still no Samsung, Sanyo, LG etc. who all use thier own proprietary syncing protocols rather than the industry standard SyncML. These manufacturers also don't provide Mac software with their phones like the do for Windows users.
    I'm afraid you're not going to have much luck if you stick with the Sanyo. I would seriously consider taking it back and swapping it for one of the handsets on the above linked pages. Personally I would recommend a Sony Ericsson model. I've always had excellent Mac compatibility with those.

  • Need faster serial port access

    I am using javacomm for serial port communication and the performance is too
    slow for my needs. I am comming with an embedded app from an NT machine
    with my java app. For benchmark purposes I hava VB app that can also talk
    to this embedded app. The round trip communication time for the VB app is
    20-30 milliseconds but the java app takes ~200 milliseconds. I think I could
    improve performance by writing to the serial port directly instead of going
    through the javacomm api which I think is slowing me down. Is it possible to
    to a low-level file open and write directly to the serial port? And if so, how?
    Thanks,
    Michael

    I am using javacomm for serial port communication and
    the performance is too
    slow for my needs. I am comming with an embedded app
    from an NT machine
    with my java app. For benchmark purposes I hava VB app
    that can also talk
    to this embedded app. The round trip communication
    time for the VB app is
    20-30 milliseconds but the java app takes ~200
    milliseconds. I think I could
    improve performance by writing to the serial port
    directly instead of going
    through the javacomm api which I think is slowing me
    down. Is it possible to
    to a low-level file open and write directly to the
    serial port? And if so, how?
    Thanks,
    MichaelSlowing down of communication process depends upon code content as well. if u can put ur code here, may be u can get some feedback concerned with speed.
    you can not directly talk at a serial level but make a component in say C n can use native methods to access that component. But that component would be very much comparable to Win32com.dll.There would be speed difference but that difference would not be enough to warrant 'too much'
    Jatin

  • Help for r6220 serial port

    As I have brick my router r6220 and fail to recovery via lan port,I need to use serial port to reinstall the FW.However,I dont know where is the port...

    I have on and off problems with printing via my wireless printer. I believe this to be a router problem. One day it works perfectly, the next, I get...

  • Help needed to do port forwarding in ipfw...

    For the last weeks I have been working to get the new open-source content management system Alfresco working. It is a pure Java web application that runs under Tomcat. There is official support for Mac OS X but only Windows and Linux gets true installer binaries with guides and everything.
    The unique thing about this platform is that it has a built in Java-based CIFS/SMB-server to expose the content not only in web browser but as a mounted volume as well. However, it turned out more than difficult to get that working in my Mac OS X Server 10.4.9 running on an XServe G5 2.0Ghz.
    I can run the startup script for the Tomcat as root on my laptop running Mac OS X 10.4.9 and then the CIFS-server can use standard ports like 137, 138, 139 and 445. Finder can mount that as a volume called Alfresco. However, I do not want to run it as root because of several other issues related to X11. There is a note in the installation text that if running the script not as root but as admin or a designated Alfresco user requires port forwarding. That means setting up firewall rules to forward requests from the standard CIFS TCP ports 139/445 to the non-privileged ports the Alfresco CIFS server is listening on (which are 1137,1138,1139 and 1145).
    I have understood that this is not possible through the Server Admin GUI-app but needs to be done either in the terminal or by using an app like WaterRoof. I guess also Apple´s server tools are famous for overwriting config files made by a "third-party" app. However, I can't make it work and ipfw syntax still looks very confusing to me. Any ideas of what I need to do in order to have this port forwarding to work.
    I have tried something like this so far:
    # ! /bin/sh
    echo "Setup CIFS Port Forwarding ..."
    sysctl -w net.inet.ip.fw.enable=1
    sysctl -w net.inet.ip.forwarding=1
    sysctl -w net.inet.ip.fw.verbose=1
    sysctl -w net.inet.ip.fw.debug=0
    #ipfw add 100 count log ip from any to any
    ipfw add 200 allow ip from any to any via lo0
    # Forward native SMB and NetBIOS sessions to non-privileged ports
    ipfw add 300 fwd 192.168.1.2,1445 tcp from any to any dst-port 445 in
    ipfw add 400 fwd 192.168.1.2,1139 tcp from any to any dst-port 139 in
    # Forward NetBIOS datagrams to non-privileged ports
    ipfw add 500 fwd 192.168.1.2,1137 udp from any to any dst-port 137 in
    ipfw add 600 fwd 192.168.1.2,1138 udp from any to any dst-port 138 in
    Windows filesharing i Mac OS X Server is turned off and there are firewall rules to allow traffic on the designated ports.
    http://www.alfresco.com
    Any hints would be very helpful!
    XServe G5   Mac OS X (10.4.9)  

    Ok, thanks for the tip. Had a look at that page and it was only about NAT which is not what I am looking for. I have a server with public IP where I need to forward from one port to another on the same IP. However, I find the information about how to configure IPFW rather limited so I wanted to know if the rules in the first post look right and what pitfalls there are when using the GUI-based server admin tools from Apple

  • Help needed finding display port (NOT mini) to VGA adapter please!

    I bought a macbook in 2009 and urgently need a VGA adapter (female) but I don't have a mini display port! Help! I can't seem to find an adapters that suit macbooks before the mini dislay port was brought out.
    Thanks
    Kirsten

    Welcome to Apple Support Community.
    If you have an earlier MacBook 2006-early 2009, it has a mini-DVI port.
    http://store.apple.com/us/product/M9320G/A/apple-mini-dvi-to-vga-adapter
    Search for 'mini DVI to VGA adapter' online, and you will find many sources for an adapter compatible with your MacBook.

  • Help needed getting an internet connection.

    Hi, I am new to Mac. I run a wireless internet connection using my P.Cs with AOL. I would like to connect my MAC to the internet also. Can it be done (Aol dont seem to support mac). What hardware do i need to insatall etc.
    Any help would be much appreciated.
    Thankyou.

    If you want a wireless connection, get either a wireless PCI adapter of an ethernet bridge.
    http://home.earthlink.net/~metaphyzx/Wireless.htm
    John

  • Help needed getting Palm V connected to a Mac mini

    Hi! I'm trying to get a Palm V connected to a Mac mini (PPC) via USB. We're using a Keyspan serial-to-USB adapter since the Palm V has a serial connector and not a USB connector built-in. I connect the Palm V to the Keyspan connector and connect the USB part of the Keyspan to a USB hub that's connected to the Mac mini. Cool.
    I finally got Palm Desktop 4.2.1 rev D installed and it runs just fine. No errors or problems during installation and all the components start and run when clicked, etc.
    For some reason, the Palm V can't sync with the Mac and the Palm Desktop "HotSync" doesn't seem to see the Palm V, nor does the Palm Desktop itself.
    Is there something obscure or not obvious that I'm missing here?
    EDIT: According to the Palm website, the Palm V is supported by Palm Desktop 4.2.1. Could it be that rev D of this software isn't compatible with Palm V and I must revert back to an older revision?
    Thanks!
    Peace...
    Reply With Quote
      Mac OS X (10.4.5)  

    It's more likely to be a connectivity issue I think than the Palm Desktop software. The first step to checking it is to plug the Palm (via the serial/USB connector of course) directly into one of the USB ports on the back of the mini rather than an external hub and then try to set the sync up.
    If that doesn't work, check the system profiler (Apple menu/about this mac and then click the more info button) and in the list on the left, click on USB. If the Palm isn't showing up there, it would then be likely that your USB/serial adapter is the culprit.

  • Help needed for a port scanning project

    Thank you first.
    This is actually my shcool project. we are writing a little port scanner in Java. I want to know how to
    tell the OS of a target machine.
    tell the UDP and TCP ports( which are UDP ports and which are TCP ports).
    My understanding of telling UDP or TCP ports is that an active UDP ports will not respond and a closed one will generate an error.
    Thank you again for your advice.

    this is the just an idea
    echo, 7
    ftp-data, 20
    ftp, 21
    telnet, 23
    smtp, 25
    time, 37
    name, 42
    bootp, 67
    tftp, 69
    finger, 79
    http, 79
    pop3, 110
    nntp, 119
    login, 513
    printer, 515
    route, 520
    String cIP = "192.168.0.1";
    int nPort = 23;
    Socket test = new Socket( cIP, nPort );
    public Socket(String host, int port) throws UnknownHostException, IOException{
    this(InetAddress.getByName(host), port, null, 0, true);
    try{
    // connection code in here
    catch(Throwable e){}
    String cIP = "192.168.0.";
    int nPort = 23;
    for( int nClassC=0; nClassC<=255; nClassC++ ){
    try {
    Socket test = new Socket( cIP+nClassC, nPort );
    test.close();
    } catch ( Throwable e ) {}
    public class checkSingleIP extends Thread{
    private String cIP;
    private int nPort;
    public checkSingleIP(String cIP, int nPort ){
    this.cIP = cIP;
    this.nPort = nPort;
    public void run(){
    try {
    Socket test = new Socket( cIP, nPort );
    System.out.println( nPort +" disponibile" );
    test.close();
    catch ( Throwable e ) {
    System.out.println( nPort +" NON disponibile" );
    checkSingleIP ip =
    new checkSingleIP( "192.168.0.1", 23 );
    ip.start();

  • Help Needed i can't connect to the router via VPN

    I can not connect to my server via the VPN client i have attached the config. I also havve a bif problem i can't use the webb gui any more and idon't know why.
    Thanks i advance

    You would need to change the NAT from standard ACL to extended ACL as follows:
    access-list 150 deny ip 192.168.1.0 0.0.0.255 192.168.0.0 0.0.0.255
    access-list 150 permit ip 192.168.1.0 0.0.0.255 any
    ip nat inside source list 150 interface ATM0.1 overload
    no ip nat inside source list 1 interface ATM0.1 overload

  • Lynksys E900 Wireless-N300 Router - Help needed to share internet connection from PC to home network

    Hi, I'm hoping someone can help me out with a problem I have:
    I am currently connecting my PC to a mobile phone as a Wireless Access Point to give that PC access the internet. I also have a small home network, with one other PC and a Game Console. I own a Linksys E900 Wireless-N300 Router. My problem is this. How do I share that internet connection with the rest of the home network?
    To the best of my knowledge its not possible to connect my mobile phone directly to my Linksys E900 Wireless-N300 Router, although if anyone has any ideas how to do this I'd love to hear!
    So my alternative idea is to connect to the internet via one PC, set up that internet connection as "Shared." and then allow the other devices on the home network to connect thru this. My question is how do I set up my  Linksys E900 Wireless-N300 Router to allow my other PC and game console connect to the internet? Bridge Mode? PPPoE? Any help or suggestions would be greatly appreciated! PS: both PC's are running on Windows 8

    I have Cisco Linksys E900 router. I want to make my home Wi-Fi zone. But I don’t have Static IP. One more thing is that Service provider have web page Authentication. I have username and pass.
    I am able to make SSID and security for my WI-FI LAN. I can use internet on one device. If I tried from second device again it’s asking me for username and password. While login it’s showing your first session in not logout. (Means I have to logout from 1st device and have to login on 2nd device.)
    Is there any option that I can Use my all devices at same time?   

  • Help with reading information coming from a software into LabVIEW through Serial port

    Hi,
    I am new to LabVIEW and also an amateur in using RS232 for communication. I have this software that has these icons like speed increase/decrease, elevation up/down, start/stop. Now, when I click these buttons on the software, they perform the appropriate functions. For example, if I press start button, the signal must go through a serial COM port into LabVIEW to start the machine. How do I do that? How do I find what format the code word is when I press a button on the software? And how to decode the information to read whether the button pushed is start etc...? Any help would be appreciated.

    I may not be perfect, but I'm all I got!

    That information would be in the programming manual for the device you're controlling. Unless you have a device that has no documentation or you cannot get the documentation that's the first place you should look. If you cannot get the documentation at all then you've got some reverse-engineering to do. To do this you will either need a serial port sniffer (a hardware device), or you can try to use a software-based port capturing program. On Windows PortMon is the most prevalent. This will show you how the port was configured (baud rate, stop bits, etc). Warning: the information is technical.
    As far as how to get it running in LabVIEW, you should take a look at the serial port communication examples that ship with LabVIEW. The most problems occur in figuring out how to (a) terminate a write command, and (b) determining when to stop reading. For (a) this is typically done by appending a carriage return or linefeed to the command. This is device dependent. For (b) this is usually done by the byte stream ending with a character like a linefeed. Again, this is device-dependent. 
    You may also want to peruse this KB article: Serial Instrument Control Tutorial. There are also lots of tutorial on the internet for basic tutorials on serial port communication.

  • Problem connecting N79 to serial port using blueso...

    Greeetings to All,
    I have a big problem, when i connect my n79 using bluesoleil v3.0, i got File transfer, dialup networking and object push services only.
    If i try to start serial port service to connect my n79 to a serial port it displayes error "can not start service".
    i have tried various bluesoleil versions but the problem remains same everytime. on the other hand i can connect my sony k750i to a serial port without any problem.
    can someone tell me how to connect n79 to a serial port using bluesoleil
    OR
    Does N79 not support bluetooth serial port connectivity?
    or is there any other way to connect n79 to a serial port using blesoleil and my bluetooth dongle on a WINXP SP2 system?
    Thanks in Advance

    Yes, PCSuite supports a great deal of Bluetooth drivers. These are all built in so, give it a try.
    Windows Vista x32 en x64 editions:
    Microsoft Windows Bluetooth stack
    Toshiba Bluetooth stack, driver versie 5.10.12
    IVT BlueSoleil Bluetooth stack, driver versie 5.0.5
    Windows XP x64:
    Microsoft Windows Bluetooth stack
    Toshiba Bluetooth stack, driver versie 5.10.12
    IVT BlueSoleil Bluetooth stack, driver versie 5.0.5
    Windows XP:
    Microsoft Windows Bluetooth (enkel in Service Pack 2)
    Toshiba Bluetooth stack, driver versie 4.0, 5.0 and 5.10.12
    WIDCOMM Bluetooth stack, driver versie 1.4.2, 3.x, 4.x and 5.x
    IVT BlueSoleil Bluetooth stack, driver versie 2.x, 3.x and 5.0.5
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

Maybe you are looking for

  • How does load-balancing with WebCache work - is there still a bottleneck?

    Hello, We're migrating an old Forms 6i app to 10.1.2.0.2 (apps servers = Redhat Linux), and are starting to consider using WebCache to loadbalance between two application servers. My question is this - say we have apps servers A and B, both running F

  • I can't navigate anywhere! it says there's a problem loading my page or the url is wrong

    for example...i try type in yahoo.com... and get the page briefly..then this message "Sorry. We can't find "http://www.yahoo.com/" There was a problem loading your page. Try retyping the URL in the browser address bar above or, visiting a related lin

  • PAyment advice for wire payments

    Hi All, I have created payment method "W" for wire payments. Also I have assigned form F110_IN_AVIS to generate payment advice. However while running the automatic payment program, I get error message that "In form F110_IN_AVIS / window MAIN , the el

  • Digital ids created with acrobat- forgot password

    If I created a digital ID in Acrobat Professional, and forgot my password, how can I create a new one?  It won't let me remove an ID without the password.  I can create new IDs, but they all require the original password.  Help!

  • Why are songs duplicated when I drag and drop them?

    I am using iTunes 7.02, not that that matter, since the problem has happened in previous versions too.... Anytime I drag a folder of songs into the iTunes window to add them to the library (i.e. from a folder on the desktop) the songs are all added t