Difference between revisions of "Technical details"
m |
|||
Line 40: | Line 40: | ||
The file ''RXTXcomm.jar'' should now be found in the ''lib/ext'' folder of your Java installation. The native libraries ''librxtxSerial.so'', ''librxtxParallel.so'' and more have been copied into the ''lib/i386'' or ''lib/amd64'' folders (32 bit or 64 bit build; Intel 64 bit also uses the amd64 folder). | The file ''RXTXcomm.jar'' should now be found in the ''lib/ext'' folder of your Java installation. The native libraries ''librxtxSerial.so'', ''librxtxParallel.so'' and more have been copied into the ''lib/i386'' or ''lib/amd64'' folders (32 bit or 64 bit build; Intel 64 bit also uses the amd64 folder). | ||
There is a bug in the configure script, resulting in trouble when using a Java 1.6 JDK or higher. You may get an error message | |||
libtool: install: `x86_64-unknown-linux-gnu/librxtxRS485.la' is not a directory | |||
In that case you need to manually add a version string into the configure script. Look for a sequence | |||
1.1*|1.2*|1.3*|1.4*|1.5* | |||
and add a |1.6* behind. This appears multiple times in the configure script; make sure you change it at least for your operating system. | |||
At first you will likely get an error message during Java execution: | At first you will likely get an error message during Java execution: |
Revision as of 13:45, 6 September 2011
On this page I collect some findings that I have not yet put into specific categories (but which should be available nevertheless).
Communication with devices
Here is a commented log when formatting a SSSD floppy disk with the TI disk controller. Actually, this dump was achieved using MESS and putting in some printf lines.
Determine rate register values for TMS9902
The TMS9902 UART (serial interface) is used on various RS232 controller cards. The baud rate is not set by providing some integer number but by configuring a clock divider and multiplier. The baud rate cannot therefore be set precisely but only approximately.
The following illustration shows these approximations, the setting of the clock divider of and the multiplier, and the rate register values below the lines. The favorite values are printed in bold, and the corresponding hexadecimal rate register value is shown in blue below.
Setting up RXTX for Java
RXTX is a serial and parallel port API implementation which is available for Windows, MacOS, and Unix systems, as binary and source code files. The complete documentation and the download location is at http://rxtx.qbang.org/wiki/index.php/Main_Page. You should build the binaries for 64 bit systems from the sources.
Instructions for Windows
Download the RXTX binaries package from http://rxtx.qbang.org/wiki/index.php/Download. Version 2.1-7 is OK. You now have to copy two files manually into the correct folders.
- Locate RXTXComm.jar in the ZIP file.
- Copy this file into your Java installation folder. This should be at C:\Program Files(x86)\Java\jre6 (or a similar name; can't tell what version you have installed). Copy the file into the subfolder lib\ext. You may find some other JAR files there; in that case you are at the right location.
- Locate rxtxSerial.dll in the ZIP file.
- Copy this file into the subfolder bin of the Java installation folder as located above. You should find a lot of dll files there.
You should now be able to use RXTX with your Java applications.
Instructions for Linux
- Unzip the file
- Enter the source directory
- Do a
./configure
- Install missing libraries if errors are reported.
- Create and install
make make install
The file RXTXcomm.jar should now be found in the lib/ext folder of your Java installation. The native libraries librxtxSerial.so, librxtxParallel.so and more have been copied into the lib/i386 or lib/amd64 folders (32 bit or 64 bit build; Intel 64 bit also uses the amd64 folder).
There is a bug in the configure script, resulting in trouble when using a Java 1.6 JDK or higher. You may get an error message
libtool: install: `x86_64-unknown-linux-gnu/librxtxRS485.la' is not a directory
In that case you need to manually add a version string into the configure script. Look for a sequence
1.1*|1.2*|1.3*|1.4*|1.5*
and add a |1.6* behind. This appears multiple times in the configure script; make sure you change it at least for your operating system.
At first you will likely get an error message during Java execution:
check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL
This message appears because you still have no permission to access the ports and to create a lock file. To fix this you must be member of the following groups:
- uucp
- lock
- dialout
Check /etc/group and add your user name behind all lines, or use your favorite system management tool. You must log out and log in again to make these changes effective. After this change, no such error message should be reported on the command line anymore.
Hardware discussions
Using ILA and SENILA
Todo