开云体育

Date

Locked Re: Looking for a brave soul to try a Windows installer

Jon Miller
 

Robin,
Before I retired I had a program on the computer at work that made
icons. Can't remember the name of it. Real simple program but as it was
some time ago it was probably 16 color also.
Download.com has all sorts of icon creators, like 121 programs. I would
try but am not an artist so not sure how they would turn out. Looks like
some do a picture capture and create an icon out of it.

Jon Miller
AT&SF
For me time has stopped in 1941
Digitrax DCC owner, Chief system
NMRA Life member #2623
Member SFRH&MS


Locked Re: Looking for a brave soul to try a Windows installer

Robin Becker
 

Bob,

I have a simple program that will create a Windows ico file with a set of
icons in different resolutions / color depths. Unfortunately it is old and
will only do up to 16 colors so I can't make the 256 color icons that are
used now. Some of the basic icon format are:

16x16 16 color (small)
32x32 16 color (large)
32x32 2 color (does any have a monochrome display anymore?)
32x16 2 color (old CGA format?)

48x48 256 color seems to be common now but as mentioned I can't make this
one.

The developer supports the icon sizes in the file that they feel like.
Windows is supposed to figure out which one to use. For starters just
"small" and "large" will be more than enough I think.

If you send me a .bmp file that is around 32x32 I can try to make a simple
icon file.

Robin

-----Original Message-----
From: Bob Jacobsen [mailto:Bob_Jacobsen@...]
Sent: Friday, June 28, 2002 12:10 AM
To: jmriusers@...
Subject: [jmriusers] Looking for a brave soul to try a Windows installer


I've created a first version of a Windows installer. I'd like to have
somebody try it and tell me how to make it better.

Also, does anybody know how to make a "Windows icon file"? If I can
get one of those, the installer can set the various icons to
something less generic.


Locked Re: Looking for a brave soul to try a Windows install er

 

Bob,

I downloaded the file and tried it on Windows 98, 2K and XP Pro. All failed
with the error message: 'Setup cannot write to the destination file
"\lib\javax.comm.properties".' Is there any preparation needed on the
computer before running the installation program? Also, when the installer
splash screen opens, the program pauses until a key is struck or the mouse
is clicked with the cursor within the white area. We probably need a
"Strike any key to continue" message or a "Continue" button. Otherwise, it
just seems to hang without any clue as to what action to take.

Hope this is helpful. I'll be watching for others' responses as well as
your comments.

Jerry Drews


---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
jmriusers-unsubscribe@...



Your use of Yahoo! Groups is subject to


Locked Re: Looking for a brave soul to try a Windows installer

Alex Shepherd
 

Ok, I have installed onto Win2K

Seemed to install ok although I noted that the installer didn't ask which
JVM I wanted to use and stuck the comm.jar file into the JVM under
C:\JBuilder4\jvm Maybe there is a way/option to let the user choose which
JVM to put the comm stuff into

I had to modify the DecoderPro Menu Shortcut and specify a value for the
"Start In" directory to:

"C:\Program Files\JMRI"

I also had to modify the DecoderPro.bat file and change the classpath
definition from:

java -Djava.class.path=".;jmri.jar;lib\collections.jar;lib\log4j.jar;lib\jdo
m-jdk11.jar;lib\crimson.jar;lib\comm.jar;$VFS" apps.DecoderPro.DecoderPro

to

javaw -classpath
".;jmri.jar;lib\collections.jar;lib\log4j.jar;lib\jdom-jdk11.jar;lib\crimson
.jar;lib\comm.jar;$VFS" apps.DecoderPro.DecoderPro

as it was complaining about not finding the main class. Must be a MacOS /
Windows thing...

We have just got JBuilder7 at work and it has the ability to build a native
executable wrapper to lauch Java applications and it is supposed to be able
to setup specific classpath and which JVM to use etc - haven't played with
it yet but maybe I should...

Cheers

Alex


Locked Re: new decoder selection list boxes

Alex Shepherd
 

I shortened the list to just manufacturers that have one or more
decoders defined. That does make it cleaner, thanks. A manufacturer
will also show up if one of their decoder is seen when doing an
identify, just so it's clear what was seen by the programmer; in that
case there's still no decoder name shown though.
This is the first time I have tried this for a while so I haven't seen all
the intermediate versions but I like this a lot more that what we had
before. I think it is good.

I guess the smoke is still comming off this version, but after I first went
in, created a new roster entry, read all the CVs from one of my locos
values, saved the config and then tried to reload by selecting the roster
entry at the top of the screen, it throws a NullPointerExecption at this
line in CombinedLocoSelListPane:

String modelString = locoEntry.getDecoderModel();

Here is the stack trace

Exception occurred during event dispatching:
java.lang.NullPointerException
at
jmri.jmrit.symbolicprog.CombinedLocoSelListPane.setDecoderSelectionFromLoco(
CombinedLocoSelListPane.java:233)
at
jmri.jmrit.symbolicprog.CombinedLocoSelPane$3.actionPerformed(CombinedLocoSe
lPane.java:135)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:870)
at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:894)
at javax.swing.JComboBox.contentsChanged(JComboBox.java:950)
at javax.swing.JComboBox.intervalRemoved(JComboBox.java:1017)
at
javax.swing.AbstractListModel.fireIntervalRemoved(AbstractListModel.java:137
)
at
javax.swing.DefaultComboBoxModel.removeAllElements(DefaultComboBoxModel.java
:167)
at javax.swing.JComboBox.removeAllItems(JComboBox.java:568)
at jmri.jmrit.roster.Roster.updateComboBox(Roster.java:107)
at
jmri.jmrit.symbolicprog.CombinedLocoSelPane.propertyChange(CombinedLocoSelPa
ne.java:245)
at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.ja
va:152)
at jmri.jmrit.roster.Roster.firePropertyChange(Roster.java:290)
at jmri.jmrit.roster.Roster.addEntry(Roster.java:70)
at
jmri.jmrit.symbolicprog.CombinedLocoSelPane.openNewLoco(CombinedLocoSelPane.
java:403)
at
jmri.jmrit.symbolicprog.CombinedLocoSelPane.openButton(CombinedLocoSelPane.j
ava:362)
at
jmri.jmrit.symbolicprog.CombinedLocoSelPane$5.actionPerformed(CombinedLocoSe
lPane.java:175)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
n.java:1504)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:3
78)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
.java:216)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:230)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:926)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:131)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

It seems that there is a problem with either

locoBox.getSelectedIndex()
or
locoBox.getSelectedItem()

in CombinedLocoSelPane around line 133

IMHO I think the whole roster thing is overkill and has added a level of
complexity that we could do without right now. I would be happier with just
saving a locos config to discrete files with the decoder address as the
filename and pop-up a file Load/Save dialog box that would let me choose
subdirectories etc so I can manage where things end up.

Anyway no matter how this stuff works - this is way better than fumbling
with the manual and my DT400 while doing hex conversions in my head... even
if I don't save anything to rosters etc and load it all from scratch out of
the loco...

Cheers

Alex


Locked Re: Looking for a brave soul to try a Windows installer

Alex Shepherd
 

I'm downloading it now...

Alex


Locked Looking for a brave soul to try a Windows installer

 

I've created a first version of a Windows installer. I'd like to have somebody try it and tell me how to make it better.

Also, does anybody know how to make a "Windows icon file"? If I can get one of those, the installer can set the various icons to something less generic.

The installer can be downloaded from:



As you can see from the name, this is a new version. Testing is not complete (the installer is really meant to test the _installer_, not the new version). It has the updated decoder selection GUI of the 9.3 test version, with only a little additional tuning. The Lenz LI100 support seems to be working, though, and there are a couple of other minor improvements.

Because this is a test version, it will install "alongside" any existing install you've got. This means that you'll have to set it's preferences, etc, but on the other hand you won't lose your locomotive roster and settings if the installer doesn't work.

Thanks in advance, I appreciate the feedback.

Bob
--
--------------
Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957)
Am working off a huge email backlog, call if it's urgent.


Locked Re: new decoder selection list boxes

 

Sorry for the slow reply, it's been a busy week. Also, I've rearranged the paragraphs below so the reply makes more sense, and coincidentally to put the good news first.

At 3:30 PM -0700 6/19/02, Robin Becker wrote:
Bob,

Tried out 0-9-3-2 today. Sorry if these comments seem overly critical, and
of course they are just one person's opinion.
No problem. I _like_ getting feedback like this, and wish there was more of it.


Ok. First I think the programmer display is too busy now. Could the
Manufacturer name list be converted to a combo box? That might help. The
mfr list is quite long, but many don't have any decoders available. Perhaps
suppressing those would make it easier to get through the list. In any
case, I would suggest making the mfr default to the one that was selected
the last time the programmer was used would be a good thing.
I shortened the list to just manufacturers that have one or more decoders defined. That does make it cleaner, thanks. A manufacturer will also show up if one of their decoder is seen when doing an identify, just so it's clear what was seen by the programmer; in that case there's still no decoder name shown though.

Making it default is a good idea, I'll try to do that.

I tried to switch back to a combobox (selection box) for the manufacturer, but with the decoders in a list it looks really ugly. But that got me thinking of another approach, see below.

Would it be possible to update the mfr and decoder list selections when the
user selects an item from the "Use locomotive settings for" combo box? This
would be a handy way of checking roster entries to see what decoder types
were used.
Great idea! I did that.

The mfr name list was scrambled when I first ran the update. After
reindexing it appeared in alphabetical order.
Right, that's due to the auto-index-on-update feature that's still missing. I've got to get to that pretty soon...

I was able to open more than one programmer setup window at the same time.
Hadn't noticed this before. Wouldn't think you would want this for
programming track use. If Ops mode programming gets supported this might be
good, but you would probably want to supress programming of the loco ID in
this case?
This is just laziness on my part. I was putting off fixing this until I had ops mode programming working, but it's not yet ready yet. The idea was that you could open as many ops-mode windows as you want, but only one that used the programming track. I'd prefer to not fix it now, as I'd rather fix it as part of reworking the first screen to include an ops-mode button. OK?

It looks like the decoder family names show up in the decoder list. I found
this very confusing. This might be ok if there was a way to see that there
were two distinct types of items in the list - family names and decoder
names. For example indenting, bolding, or something else might make it
more apparent, especially if the app would prevent the user from selecting a
family name (but I fear that would not be easy to implement). I was able to
open a programmer with a family name selected, but the config did not match
any of the members of that family for the Throttle-Up decoders I checked.
(maybe this is really a problem in the throttle-up decoder files I made?)

In the case where there is only one decoder in the family it was especially
confusing since it seemed unclear which name to select. For example, under
Throttle-Up there is "Soundtraxx DSD Diesel decoders" on one line followed
by "DSD Diesel" on the next line. Maybe changing the word "decoders" to
"family" would help, but I don't think that will be enough to eliminate all
confusion. (Selecting the DSD diesel family name produces a programmer with
only 4 columns in the function map, while selecting the DSD diesel decoder
name produces the correct function mapping with 12 columns.)
All of these points are correct, and important.

When I was working on this interface, I was mostly concentrating on the case of Digitrax and Lenz decoders (which I have). They have a large number of defined decoders in a couple of families. For them, the interface seems to work OK. You select "Digitrax", and get a pretty long list, and just look for your decoder; you can ignore the family names. But people tend to refer to decoders as "FX decoders", so if that's what you think you've got, you can select that family and it also works. And when you push "ident", it shows you a nice list of the possible specific models within the family that was identified by CV7.

Unfortunately, it seems that this breaks down for Soundtraxx. They've done a better job of identifying specific _decoders_ with CV7, so there's less of a need for the "family" idea. And the list of all Soundtraxx decoders you get when you select the manufacturer is _really_ hard to read because of that.

I started to think of a way to use indenting to make all this clearer, but it soon occurred to me that I was recreating a "tree" structure.

So let me ask the accumulated wisdom on the list: Would a tree GUI work better?

The idea would be to have a single part of the selection window (probably with scroll bars) that shows a tree ala the various "Explorer" things. The tree would have three levels: Manufacturer, with family below that, and decoder below that. For cases like Soundtraxx DSD Diesel, where there's no clear distinction between family and model, just the model would appear directly under the manfacturer name.

At first, just the list of manufacturers would appear. You could click on one to open it, and see all the families and decoders. Selecting a decoder or family would let you push the open-programmer button. Only one could be selected at a time.

If you use the ident button, the tree would be closed-up except for the part of it that satisfies the identify results. If that's a specific decoder, that'll be open and selected. If a family was identified (e.g. Digitrax FX), the tree will be open to them, with the general family selected, and all the individual decoders visible. If the model (CV7) wasn't recognized, all the decoders for that manufacturer will be unfolded. Etc.

The only thing that I can think of that this would make _more_ difficult is "I've got a DH142 decoder, and I can't remember which manufacturer made it"; in that case, the user would have to open all the manufacturer names to look for it. (I could start with everything open in the tree, but that's really annoying to people who're looking for a specific thing). And in that case, clicking ident will go to the right place anyway.

This has the other advantage of being easy to code.

What do people think? Should I code it up so people can try it?

Bob
--
--------------
Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957)
Am working off a huge email backlog, call if it's urgent.


Locked For suggestion in Europe

broman40de
 

Bob,
for suggestion in Euerope i need for user groups and friends a german
version of the thesis on .. discribtion. I have made a translation
from the C/MRI in 1986 for german language. We need it for CTC panels
directed by computers. We need it also for train control and
signalisation in a Swiss SBB model-layout.

Now we control DCC, and we want to do the same. I sent you the
text. There are short sentenceses for operating control statements.

Is it allowed?

dieter

------


Locked new decoder selection list boxes

Robin Becker
 

Bob,

Tried out 0-9-3-2 today. Sorry if these comments seem overly critical, and
of course they are just one person's opinion. And no I'm not just miffed
because the flyouts weren't possible :-) As always I am very appreciative
of all your efforts and for the opportunity you have provided for us to
provide input and voice opinions.

Ok. First I think the programmer display is too busy now. Could the
Manufacturer name list be converted to a combo box? That might help. The
mfr list is quite long, but many don't have any decoders available. Perhaps
suppressing those would make it easier to get through the list. In any
case, I would suggest making the mfr default to the one that was selected
the last time the programmer was used would be a good thing.

It looks like the decoder family names show up in the decoder list. I found
this very confusing. This might be ok if there was a way to see that there
were two distinct types of items in the list - family names and decoder
names. For example indenting, bolding, or something else might make it
more apparent, especially if the app would prevent the user from selecting a
family name (but I fear that would not be easy to implement). I was able to
open a programmer with a family name selected, but the config did not match
any of the members of that family for the Throttle-Up decoders I checked.
(maybe this is really a problem in the throttle-up decoder files I made?)

In the case where there is only one decoder in the family it was especially
confusing since it seemed unclear which name to select. For example, under
Throttle-Up there is "Soundtraxx DSD Diesel decoders" on one line followed
by "DSD Diesel" on the next line. Maybe changing the word "decoders" to
"family" would help, but I don't think that will be enough to eliminate all
confusion. (Selecting the DSD diesel family name produces a programmer with
only 4 columns in the function map, while selecting the DSD diesel decoder
name produces the correct function mapping with 12 columns.)

Other stuff

Would it be possible to update the mfr and decoder list selections when the
user selects an item from the "Use locomotive settings for" combo box? This
would be a handy way of checking roster entries to see what decoder types
were used.

I was able to open more than one programmer setup window at the same time.
Hadn't noticed this before. Wouldn't think you would want this for
programming track use. If Ops mode programming gets supported this might be
good, but you would probably want to supress programming of the loco ID in
this case?

The mfr name list was scrambled when I first ran the update. After
reindexing it appeared in alphabetical order.


Robin


Locked New GUI for selecting decoder type

 

I've tried to put together people's suggestions on how to improve the process of selecting a decoder for DecoderPro. Robin, sorry, but I just couldn't get pop-down menus to work well.

I'd like your opinions on whether this is an improvement, what should be changed, and even whether we should go back to the old one.

To try it, download



then install it by copying the unzipped files to your existing directory (you should probably keep your old files just in case).

The decoder selection panel is now two lists: on the left, a list of all manufacturers, and on the right a list of decoders. It starts with all decoders we know about listed. If you pick a manufacturer, the right list becomes just those decoder models. The ident button works basically as before.

There's new logic for handling unknown manufacturer codes, unknown decoders from known manufacturers, and certain errors. The status at the bottom of the window is much more verbose, and hopefully more informative.

I'm looking forward to comments.

Bob
--
--------------
Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957)


Locked Re: Serial port too slow? Can anything work.

 

It's not quite so simple. I'm not completely fluent in Java so I'll
only sketch the theoretical solution to the problem and hopefully
someone can fill in the Java details.

Here's the problem. The windows serial driver has a built in
function/dialog that allows you to configure the serial port.
If you use the port settings under the device manager, you will see
that you are presented with a dialog that has a dropdown list for
setting the baud rate. The list doesn't include 16457. And you can't
type in 16457. So there's no way to set it to 16457 through the
device manager. If you use MSCOMM in VB, you can use the settings
property to set the baud rate, etc. Again, it won't accept 16457 for
the same reason. The package javax.javacomm apparently has the same
problem---it just won't accept 16457 because it is using the serial
driver's list of valid baud rates.

Of course, programs like LocoNetMon, RR&Co, and Winlok work just fine
on the same computers that MSCOMM,javax.javacomm, etc don't work. Why?
Well, if you look at the source code for LocoNetMon (available from
the loconethackers group), you will see that it opens the Com Port
using Win32K's CreateFile function wich returns a file handle/file
descriptor. This file handle is used in the function GetComState
which gets the current device control block (dcb). You can then set
the baud rate in the dcb to 16457. Then use SetCommState to apply the
new settings.

So the theoretical solution to the problem of not being able to set
the baud rate to 16457 through javax.javacomm is:
1) get hold of the file handle/file descriptor
2) use JNI to call a C/C++ function which uses GetCommState,sets
dcb.BaudRate = 16457, and calls SetCommState

Now come the parts of the puzzle I don't completely know.

First, for part (1), how do we get hold of the file descriptor that
javax.javacomm is using? I've scoured the docs and I don't see
anywhere where it gives access to the file descriptor. However, you
will see that comportidentifier has two forms of Open. One form has a
file descriptor as it's parameter. So, it might be possible to first
create a file handle/file descriptor, use the second form of open and
then pass the file descriptor to the C/C++ function to update the
baud rate. Java folks: in the comportidentifier's open method, is the
file descriptor parameter call by value like in C/C++ (i.e., in only)
or call by reference (i.e., if the method changes the value of the
file descriptor, do we get it back so we can pass it to the C/C++
function?)

If so, then all is well. Otherwise, we need another way of gettig
hold of the file descriptor. Again, it might be obvious for someone
more fluent in Java but here's my next guess:

Probably the InputStream you get from CommPort in javax.javacomm is
actually a FileInputStream. If so, where you getInputStream in
LnPacketizer (I think), you could cast it to a FileInputStream and
use the method getFD() which returns the underlying file descriptor.
If so, then bingo, you can now can the C/C+ function and pass the
file descriptor.

Well, that's it. Can anyone fill in the missing pieces?

Scott Goodwin


--- In jmriusers@y..., Bob Jacobsen <Bob_Jacobsen@l...> wrote:
This is great!

We've been hacking around in some quite complicated code trying to
fix this. It's only (so far) a problem on Windows, and I've be
very
happy to add the JNI code to call that function.

Would you be willing to compile it and send me a library? I don't
have any build tools on my test windows machine. Or perhaps
somebody
else could do that?

Thanks!

Bob

--- In jmriusers@y..., "greggeeca" <ggee@g...> wrote:
Well, I installed JMRI on my 1 year old laptop and it says that
my
COM port can only be set to 9600. I don't understand the
reasons
why. Anyway, if this is true for JMRI, what about other loconet
apps?
Will any software work on my laptop, such as pr1dos, ... with an
MS100 or PR-1?

If I get a Locobuffer, will that work either?

Thanks,
Greg
The problem is that the javacomm package uses the serial driver's
list of valid baud rates which doesn't include 16457. You can get
around this under windows (don't know about unix) by getting hold
of the handle used to open the com port and then using jni to call
a
C function to set the baudrate to 16457. Use something like:

DCB dcb;

FillMemory(&dcb, sizeof(dcb), 0);
if (!GetCommState(hComm, &dcb)) // get current DCB
// Error in GetCommState
return FALSE;

// Update DCB rate.
dcb.BaudRate = 16457;

// Set new state.
if (!SetCommState(hComm, &dcb))
// Error in SetCommState.

--
--------------
Bob Jacobsen (Bob_Jacobsen@l..., 510-486-7355, fax 510-495-2957)


Locked Re: Serial port too slow? Can anything work.

 

--- In jmriusers@y..., "Harlan Warden" <hdwarden@n...> wrote:
Just out of curiosity, did anyone try setting the windows port
option
as I posted on this thread on 6/1? I've no successful experience
with
Java yet, but IMHO it would help to try to reset the windows default
value. I've not worked with Win2K or XP, but it does apply for '98,
'95, and 3.1
Harlan

Same problem here as with the javacomm package. Setting the port
options (on windows---don't know about unix) uses the driver supplied
list of valid baud rates which doesn't include 16457. Same problem
with anyone trying to use MSCOMM in VB. However, using the Win32 API
functions GetComm/SetComm, you can set the baud parameter in the
device control block (dcb) to 16457.

Scott Goodwin


Locked Re: Serial port too slow? Can anything work.

dale_gloer
 

Harlan,

I have Win2K and I tired your suggestion. I set the port speed to
57600 and when I started DecoderPro I got 2 messages, one saying
it couldn't set 16600 and the second saying it was trying to set
16457. then the pop up window appeared saying for the serial port
speed error. So no go.

Dale.

--- In jmriusers@y..., "Harlan Warden" <hdwarden@n...> wrote:
Just out of curiosity, did anyone try setting the windows port
option
as I posted on this thread on 6/1? I've no successful experience
with
Java yet, but IMHO it would help to try to reset the windows default
value. I've not worked with Win2K or XP, but it does apply for '98,
'95, and 3.1
Harlan


----- Original Message -----
From: "Alex Shepherd" <ashepherd@w...>
To: <jmriusers@y...>
Sent: Wednesday, June 12, 2002 4:11 PM
Subject: Re: [jmriusers] Re: Serial port too slow? Can anything
work.


Would you be willing to compile it and send me a library? I
don't
have any build tools on my test windows machine. Or perhaps
somebody
else could do that?
I downloaded all the RXTX development package and tried to build
it
but it
looks like it is intended to be built using a Linux system that
maybe cross
compiles for win32. So I didn't get very far with it on my Win2K
system -
sorry

Alex


------------------------ Yahoo! Groups
Sponsor ---------------------~-->
Will You Find True Love?
Will You Meet the One?
Free Love Reading by phone!

--------------------------------------------------------------------
-~->

To unsubscribe from this group, send an email to:
jmriusers-unsubscribe@y...



Your use of Yahoo! Groups is subject to



Locked Re: Serial port too slow? Can anything work.

Harlan Warden
 

Just out of curiosity, did anyone try setting the windows port option
as I posted on this thread on 6/1? I've no successful experience with
Java yet, but IMHO it would help to try to reset the windows default
value. I've not worked with Win2K or XP, but it does apply for '98,
'95, and 3.1
Harlan

----- Original Message -----
From: "Alex Shepherd" <ashepherd@...>
To: <jmriusers@...>
Sent: Wednesday, June 12, 2002 4:11 PM
Subject: Re: [jmriusers] Re: Serial port too slow? Can anything work.


Would you be willing to compile it and send me a library? I don't
have any build tools on my test windows machine. Or perhaps
somebody
else could do that?
I downloaded all the RXTX development package and tried to build it
but it
looks like it is intended to be built using a Linux system that
maybe cross
compiles for win32. So I didn't get very far with it on my Win2K
system -
sorry

Alex


------------------------ Yahoo! Groups
Sponsor ---------------------~-->
Will You Find True Love?
Will You Meet the One?
Free Love Reading by phone!

--------------------------------------------------------------------
-~->

To unsubscribe from this group, send an email to:
jmriusers-unsubscribe@...



Your use of Yahoo! Groups is subject to



Locked Re: Serial port too slow? Can anything work.

Alex Shepherd
 

Would you be willing to compile it and send me a library? I don't
have any build tools on my test windows machine. Or perhaps somebody
else could do that?
I downloaded all the RXTX development package and tried to build it but it
looks like it is intended to be built using a Linux system that maybe cross
compiles for win32. So I didn't get very far with it on my Win2K system -
sorry

Alex


Locked Re: Serial port too slow? Can anything work.

 

This is great!

We've been hacking around in some quite complicated code trying to fix this. It's only (so far) a problem on Windows, and I've be very happy to add the JNI code to call that function.

Would you be willing to compile it and send me a library? I don't have any build tools on my test windows machine. Or perhaps somebody else could do that?

Thanks!

Bob

--- In jmriusers@y..., "greggeeca" <ggee@g...> wrote:
Well, I installed JMRI on my 1 year old laptop and it says that my
COM port can only be set to 9600. I don't understand the reasons
why. Anyway, if this is true for JMRI, what about other loconet
apps?
Will any software work on my laptop, such as pr1dos, ... with an
MS100 or PR-1?

If I get a Locobuffer, will that work either?

Thanks,
Greg
The problem is that the javacomm package uses the serial driver's
list of valid baud rates which doesn't include 16457. You can get
around this under windows (don't know about unix) by getting hold
of the handle used to open the com port and then using jni to call a
C function to set the baudrate to 16457. Use something like:

DCB dcb;

FillMemory(&dcb, sizeof(dcb), 0);
if (!GetCommState(hComm, &dcb)) // get current DCB
// Error in GetCommState
return FALSE;

// Update DCB rate.
dcb.BaudRate = 16457;

// Set new state.
if (!SetCommState(hComm, &dcb))
// Error in SetCommState.
--
--------------
Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957)


Locked Re: Serial port too slow? Can anything work.

 

--- In jmriusers@y..., "greggeeca" <ggee@g...> wrote:
Well, I installed JMRI on my 1 year old laptop and it says that my
COM port can only be set to 9600. I don't understand the reasons
why. Anyway, if this is true for JMRI, what about other loconet
apps?
Will any software work on my laptop, such as pr1dos, ... with an
MS100 or PR-1?

If I get a Locobuffer, will that work either?

Thanks,
Greg
The problem is that the javacomm package uses the serial driver's
list of valid baud rates which doesn't include 16457. You can get
around this under windows (don't know about unix) by getting hold
of the handle used to open the com port and then using jni to call a
C function to set the baudrate to 16457. Use something like:

DCB dcb;

FillMemory(&dcb, sizeof(dcb), 0);
if (!GetCommState(hComm, &dcb)) // get current DCB
// Error in GetCommState
return FALSE;

// Update DCB rate.
dcb.BaudRate = 16457;

// Set new state.
if (!SetCommState(hComm, &dcb))
// Error in SetCommState.


Locked Re: Serial port too slow? Can anything work.

dale_gloer
 

Bob,

I'm not very competent in UNIX or Java so I am wondering if it will be
possible to get the Windows RXTX API code from the jmri download site.
I am interested in trying it out if I can get it. I have 2 PCs and
neither supports setting the required rate for the MS100. One is a
generic P133 machine with W95 and the other is an IBM Thinkpad T20
with WIN2K.

Dale.

--- In jmriusers@y..., Bob Jacobsen <Bob_Jacobsen@l...> wrote:
At 9:58 AM +1200 6/4/02, Alex Shepherd wrote:
If we go down this path does it mean that we will have to migrate
the
current JMRI port access from using the SUN CommAPI to this RXTX
API or does
the RXTX api fit under the existing SUN commAPI and implement the
same
driver interface. Guess it will become clear to me after I dig into
it a
bit...
The RXTX folks have two versions of their library, called 1.4 and
1.5. The member function names and arguments, classnames,
functionality, etc, are identical between the two. Version 1.4,
which is what Mike used on Linux if I recall correctly, implements
the same API as Sun's javax.comm, so it works without any changes to
JMRI. That's nice, because we can use RXTX on some machines, and
other implementations on other machines. Right now we use RXTX on
Linux & MacOS X, Patrick Beard's implementation on MacOS classic,
Sun's on Windows, and IBM's on OS/2.

The RXTX version 1.5 puts all the classes in an "org.gnu.io" package
tree, instead of the javax tree. Apparently this is important for
certain uses which are intended to be 100% "free" software.

So as long as we stick with the 1.4 version, we should be OK.

Bob
--
--------------
Bob Jacobsen (Bob_Jacobsen@l..., 510-486-7355, fax 510-495-2957)


Locked Re: Serial port too slow? Can anything work.

 

At 9:58 AM +1200 6/4/02, Alex Shepherd wrote:
If we go down this path does it mean that we will have to migrate the
current JMRI port access from using the SUN CommAPI to this RXTX API or does
the RXTX api fit under the existing SUN commAPI and implement the same
driver interface. Guess it will become clear to me after I dig into it a
bit...
The RXTX folks have two versions of their library, called 1.4 and 1.5. The member function names and arguments, classnames, functionality, etc, are identical between the two. Version 1.4, which is what Mike used on Linux if I recall correctly, implements the same API as Sun's javax.comm, so it works without any changes to JMRI. That's nice, because we can use RXTX on some machines, and other implementations on other machines. Right now we use RXTX on Linux & MacOS X, Patrick Beard's implementation on MacOS classic, Sun's on Windows, and IBM's on OS/2.

The RXTX version 1.5 puts all the classes in an "org.gnu.io" package tree, instead of the javax tree. Apparently this is important for certain uses which are intended to be 100% "free" software.

So as long as we stick with the 1.4 version, we should be OK.

Bob
--
--------------
Bob Jacobsen (Bob_Jacobsen@..., 510-486-7355, fax 510-495-2957)