J2ME Serial connection timeout

From: yehoram (y_shenhar_at_yahoo.com)
Date: 12/30/03


Date: 30 Dec 2003 14:06:13 -0800

Hello,

I am writing a j2me location based application that reads GPS data
from a serial connection (it is MIDP2.0 app).

I ran into the following problem:
I am using a CommConnection connection type to open input stream to a
serial port. I use something like

commConnection = (CommConnection)
Connector.open("comm:2;baudrate=4800", Connector.READ, timeout);

to open the connection. However, when timeout = true, i don't seem to
get any timeout exceptions, even after 60 seconds. (I am currently
running only on the WTK2.0 emulator).
I would like to have exception thrown if nothing comes from the serial
within a certain time period.

Any help would be appreciated,

Yehoram Shenhar



Relevant Pages

  • Re: A month with a Nokia n95 (long)
    ... and can't play. ... One of these days I will get around to writing a small app to do it all on the fly. ... HSDPA works well and you can have more than one internet connection going at once. ... For example I can use it as a modem for my laptop and also "listen again" to a Beeb radio programme. ...
    (uk.telecom.mobile)
  • Re: ADO Connection.Execute Method leaves Open SQL Process
    ... Have the App create a single ADODB.Connection object, ... requesting only one connection from a single ADO Connection ... Pool, thus if all requests are sequenced and not over-lapping ...
    (microsoft.public.vb.database.ado)
  • Re: ADO Connection.Execute Method leaves Open SQL Process
    ... your first paragraph where it talks about "a VB6 app". ... requesting only one connection from a single ADO Connection ... ' at this point a new SQL process HAS been created!! ...
    (microsoft.public.vb.database.ado)
  • Memory leak with ADO
    ... When the app runs through the loop 2k times about 16-30 megs ... procedure TForm1.SpeedButton1Click(Sender: TObject); ... Caption = 'Connection String' ... object Connection: TADOConnection ...
    (borland.public.delphi.database.ado)
  • Re: What is the perfect application model?
    ... If your app is only being used on an intranet or on a high speed internet connection fine. ... For the fiber connections it would be fine, but for the DSL users their productivity would drop considerably by forcing them to run all their apps through the network. ...
    (microsoft.public.dotnet.general)