[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rxtx
Subject:    Re: [Rxtx] Writing Hex data to the Serial port (Could it be a bug?)
From:       Wido den Hollander <wido () pcextreme ! nl>
Date:       2010-03-05 10:11:20
Message-ID: 1267783880.2704.2.camel () wido-desktop
[Download RAW message or body]

Hi Andy,

Yes, i'm aware of that. I think it was not RXTX to blame, but a bug in
de C code on the receiver side.

Don't know what it exactly was, but that's what i heard of the
programmer.

It works now, thank you all!

-- 
Met vriendelijke groet,

Wido den Hollander
Hoofd Systeembeheer / CSO
Telefoon Support Nederland: 0900 9633 (45 cpm)
Telefoon Support België: 0900 70312 (45 cpm)
Telefoon Direct: (+31) (0)20 50 60 104
Fax: +31 (0)20 50 60 111
E-mail: support@pcextreme.nl
Website: http://www.pcextreme.nl
Kennisbank: http://support.pcextreme.nl/
Netwerkstatus: http://nmc.pcextreme.nl


On Thu, 2010-03-04 at 10:53 +0000, Andy Eskelson wrote:
> Don't forget that on many Linux distros that the permissions
> on /dev/ttyUSBn devices don't normally allow for user access.
> 
> Andy
> 
> 
> On Thu, 04 Mar 2010 11:10:23 +0100
> Wido den Hollander <wido@pcextreme.nl> wrote:
> 
> > Hi,
> > 
> > Well, yes. I just got the original win32comm.dll working and it seems to
> > be working just fine?
> > 
> > I'm really stunned here, a dll from 2002 is working fine right now?
> > 
> > My Java app is now working on Windows, Linux is still a problem.
> > 
> > Really weird.. I'll search for a answer somewhere, because there has to
> > be a reason why it isn't working with RXTX.
> > 
> > -- 
> > Met vriendelijke groet,
> > 
> > Wido den Hollander
> > Hoofd Systeembeheer / CSO
> > Telefoon Support Nederland: 0900 9633 (45 cpm)
> > Telefoon Support België: 0900 70312 (45 cpm)
> > Telefoon Direct: (+31) (0)20 50 60 104
> > Fax: +31 (0)20 50 60 111
> > E-mail: support@pcextreme.nl
> > Website: http://www.pcextreme.nl
> > Kennisbank: http://support.pcextreme.nl/
> > Netwerkstatus: http://nmc.pcextreme.nl
> > 
> > 
> > On Thu, 2010-03-04 at 08:15 +0000, Ivan Maidanski wrote:
> > > Hi!
> > > Wido den Hollander <wido@pcextreme.nl> wrote:
> > > > Hi,
> > > > 
> > > > It's still keeping me busy and i think i'm running into a problem with
> > > > RXTX.
> > > 
> > > Did you also try Sun Comm API implementation?
> > > 
> > > > 
> > > > I told Andy in a mail directly to him that i'm working wireless, that's
> > > > not the fact here, in the production setup it uses wireless RS232, but
> > > > right now i'm using a USB cable, see:
> > > > http://zooi.widodh.nl/rxtx/20100304_001.jpg
> > > > 
> > > > Yesterday evening i found the non-free tool Serial Port Monitor, see
> > > > this screenshot:
> > > > http://zooi.widodh.nl/rxtx/serial_port_monitor_works.png
> > > > 
> > > > Now, that is working! I hear the relais clicking and the game is
> > > > starting.
> > > > 
> > > > So on my Windows platform:
> > > > 
> > > > * .Net application: Works
> > > > * Java application: Does not work
> > > > * Serial Port Monitor: Works
> > > > 
> > > > Now the problem remains with the Java application, while other software
> > > > on the same peace of hardware and OS are working (using them concurrent
> > > > here).
> > > > 
> > > > As you can see, the difference stays the EOF, XON and XOFF.
> > > > 
> > > > I have been playing with a lot of Java settings, but i can't seem to be
> > > > able to edit these variables.
> > > > 
> > > > Could it be that this is not supported by RXTX? Of could i be hitting a
> > > > bug here?
> > > > 
> > > > It confuses me that the other applications are all working and that
> > > > Java/RXTX keeps giving problems while everything seems fine.
> > > > 
> > > > -- 
> > > > Met vriendelijke groet,
> > > > 
> > > > Wido den Hollander
> > > > Hoofd Systeembeheer / CSO
> > > > Telefoon Support Nederland: 0900 9633 (45 cpm)
> > > > Telefoon Support België: 0900 70312 (45 cpm)
> > > > Telefoon Direct: (+31) (0)20 50 60 104
> > > > Fax: +31 (0)20 50 60 111
> > > > E-mail: support@pcextreme.nl
> > > > Website: http://www.pcextreme.nl
> > > > Kennisbank: http://support.pcextreme.nl/
> > > > Netwerkstatus: http://nmc.pcextreme.nl
> > > > 
> > > > 
> > > > On Wed, 2010-03-03 at 18:49 +0000, Wido den Hollander wrote:
> > > > > Hi Andy,
> > > > > 
> > > > > Yes, i'm aware of the fact that some settings are not the same, like EOF, \
> > > > > Xon en Xoff, but with RXTX i can't find a way to set those settings. 
> > > > > Source: http://java.sun.com/products/javacomm/reference/api/index.html
> > > > > 
> > > > > I've tried "setFlowControlMode" but that didn't seem to work either.
> > > > > 
> > > > > Right now i'm trying to make the bridge with VSPE and capture the ourput \
> > > > > with terraterm. 
> > > > > Thank you again for your input! I hope i'll find it soon.
> > > > > 
> > > > > Wido
> > > > > 
> > > > > -----Original message-----
> > > > > From: Andy Eskelson <andy@g0poy.com>
> > > > > Sent: Wed 03-03-2010 18:27
> > > > > To: rxtx@qbang.org; 
> > > > > Subject: Re: [Rxtx] Writing Hex data to the Serial port
> > > > > 
> > > > > > 
> > > > > > As with any comms protocol, you have to get the parameters correct. The
> > > > > > Java setup for EOF, Xon Xoff is wrong. 
> > > > > > You have a working system, (the .net) so use the same settings. 
> > > > > > 
> > > > > > 
> > > > > > However, you are apparently not using any of the codes, I cannot see them
> > > > > > being sent from your listings. So the first thing to do is verify that
> > > > > > the setup code you have is correct.
> > > > > > 
> > > > > > 
> > > > > > You also appeared to be sending the same command sequence several times.
> > > > > > Was that just you trying several times? or did the apps send the command
> > > > > > more than once. the traces show the .net sending the data twice, and the
> > > > > > java 4 times.
> > > > > > 
> > > > > > 
> > > > > > Create a binary file of the code you want to send, and then use teraterm
> > > > > > to send that to the game control box. If that does the job then you have
> > > > > > the correct code and the problem is within your java app.
> > > > > > 
> > > > > > If the code does not work then perhaps you don't have the correct code (a
> > > > > > bit unlikely but it could happen)
> > > > > > 
> > > > > > Use VSPE and set up a couple of virtual com ports connected to each other
> > > > > > (not quite as useful as a spare machine, but it does a good job)
> > > > > > You can also use VSPE's port monitoring as another check. Do note that
> > > > > > you can only monitor in one direction at a time
> > > > > > 
> > > > > > Point the .net app at one, and teraterm at the other, make sure you have
> > > > > > the settings correct, (4800 8N1 and then use teraterm to capture the
> > > > > > output of the .net app.
> > > > > > 
> > > > > > Close the capture and then examine it with a hex editor.
> > > > > > 
> > > > > > That should confirm what is going on.
> > > > > > 
> > > > > > 
> > > > > > You can use the same method to capture the output of your java app, the
> > > > > > two captured files should be the same.
> > > > > > 
> > > > > > 
> > > > > > You could also send that captured file to the game controller via \
> > > > > > teraterm and that should trigger the reset. (this should be exactly the \
> > > > > > same as sending the binary file suggested above)
> > > > > > 
> > > > > > 
> > > > > > If this does not trigger the game controller, it may be that you have
> > > > > > missed some other setup codes. i.e. there may be a sequence that puts the
> > > > > > controller into command mode. Or perhaps a whole sequence of commands
> > > > > > that initialise the controller.
> > > > > > 
> > > > > > Once you verify that the codes are correct, you will at least know that
> > > > > > the problem is in the app.
> > > > > > 
> > > > > > 
> > > > > > Hope this helps a bit.
> > > > > > 
> > > > > > Andy
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Wed, 03 Mar 2010 14:18:57 +0100
> > > > > > Wido den Hollander <wido@pcextreme.nl> wrote:
> > > > > > 
> > > > > > > Hi Andy and Mariusz,
> > > > > > > 
> > > > > > > Thank you for your input!
> > > > > > > 
> > > > > > > I've made three screenshots of the Windows envirionment (stopt using
> > > > > > > Linux for now, just to be sure): http://zooi.widodh.nl/rxtx/
> > > > > > > 
> > > > > > > As you can see, they both run on the Windows machine and the .Net
> > > > > > > application is working.
> > > > > > > 
> > > > > > > Now, i'm interested in starting a game, this is done by sending:
> > > > > > > 
> > > > > > > EE FF FF 00 01 11 01 01 00 EE CC
> > > > > > > 
> > > > > > > As far as i can tell my Java application (also attached) sends this
> > > > > > > correctly and both the parity and baudrate are OK.
> > > > > > > 
> > > > > > > Don't mind the first data (length 10) send by the .Net application, \
> > > > > > > this is for requestion scores, not needed before starting a game.
> > > > > > > 
> > > > > > > Now before i keep searching and searching: Could this be a problem with
> > > > > > > the EOF, ERR or any of those settings?
> > > > > > > 
> > > > > > > I've tried the programs from Andy, but the problem is that i don't have
> > > > > > > two PC's with a serial port, these days they don't ship PC's with a
> > > > > > > serialport anymore, that's why i'm using the USB to Serial converter.
> > > > > > > 
> > > > > > > And i can verify that the .Net application is working fine, next to me
> > > > > > > is the hardware and i can see the LED's lighting up when i hit "start"
> > > > > > > on the app.
> > > > > > > 
> > > > > > > I'm still using PortMon since this seems the best application to \
> > > > > > > monitor a local COM port when you don't have the luxury to hook up two \
> > > > > > > PC's with a null-modem cable.
> > > > > > > 
> > > > > > > Now i'm getting paranoia, but could it be a feature that i need which \
> > > > > > > is not supported by RXTX?
> > > > > > > 
> > > > > > > Any help is really appreciated since this is driving me crazy at the
> > > > > > > moment :-)
> > > > > > > 
> > > > > > > 
> > > > > > > -- 
> > > > > > > Met vriendelijke groet,
> > > > > > > 
> > > > > > > Wido den Hollander
> > > > > > > Hoofd Systeembeheer / CSO
> > > > > > > Telefoon Support Nederland: 0900 9633 (45 cpm)
> > > > > > > Telefoon Support België: 0900 70312 (45 cpm)
> > > > > > > Telefoon Direct: (+31) (0)20 50 60 104
> > > > > > > Fax: +31 (0)20 50 60 111
> > > > > > > E-mail: support@pcextreme.nl
> > > > > > > Website: http://www.pcextreme.nl
> > > > > > > Kennisbank: http://support.pcextreme.nl/
> > > > > > > Netwerkstatus: http://nmc.pcextreme.nl
> > > > > > > 
> > > > > > > 
> > > > > > > On Tue, 2010-03-02 at 19:25 +0000, Mariusz Dec wrote:
> > > > > > > > Hi,
> > > > > > > > What I would like suggest is to check XON/XOFF role in the protocol.
> > > > > > > > 
> > > > > > > > This is very dangerous idea to use software flow control if you are
> > > > > > > > transferring 8 bit binary, and you arn't sure that this may be NOT
> > > > > > > > ONLY 7-bit ASCII data in transmission stream.
> > > > > > > > 
> > > > > > > > And FIRST OFF ALL in this case:
> > > > > > > > SECOND TERMINAL connected THROUGH CABLE until success with cable and
> > > > > > > > transmission speed for simple  'ABCDEF'.
> > > > > > > > 
> > > > > > > > Posts many hours later....
> > > > > > > > Do you did that?
> > > > > > > > 
> > > > > > > > BTW: FT232R is wondefull chip and drivers from FTDI works for me VERY
> > > > > > > > GOOD in Win/Mac/Linux.
> > > > > > > > I am almost 100% sure that from this side everything is ok.
> > > > > > > > 
> > > > > > > > Regards
> > > > > > > > Mariusz
> > > > > > > > 
> > > > > > > > 
> > > > > > _______________________________________________
> > > > > > Rxtx mailing list
> > > > > > Rxtx@qbang.org
> > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx
> > > > > > 
> > > > 
> > > > _______________________________________________
> > > > Rxtx mailing list
> > > > Rxtx@qbang.org
> > > > http://mailman.qbang.org/mailman/listinfo/rxtx
> > > > 
> > 
> > _______________________________________________
> > Rxtx mailing list
> > Rxtx@qbang.org
> > http://mailman.qbang.org/mailman/listinfo/rxtx
> _______________________________________________
> Rxtx mailing list
> Rxtx@qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx

_______________________________________________
Rxtx mailing list
Rxtx@qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic