Dan Toma - YO3GGX - email@example.com
This is a very simple to use multi-platform Java application which can be used to redirect one of your computer serial ports and one audio port to Ethernet. In this way you will be able to connect to any serial port (embedded, USB/Serial modules or Bluetooth modules) remotely over the network and transport audio too with a special client. Some of my Android applications, are able to serially connect over the Ethernet so this can be a nice addition. PocketRXTX Android application can use the secure authentication feature to securely connect and control (CAT) your radio transceiver over Internet, with audio support.
Current version of the application has the following features:
Can be run on Windows, Linux or Mac (with Java Runtime installed)
The application is fully portable, nothing is modified in the Registry and contains only the executable (JAR) and a simple text configuration file
You can select any local serial port (COMx in Windows, /dev/ttySx or /dev/ttyUSBx in Linux, etc)
You can select Audio In and Audio Out devices from a list. Audio feature is bi-directional, with a mic level meter for better control;
Display your local IP address
You can set the TCP port which will allow remote connections. Next TCP port is used for audio, if audio activated.
Configurable Baudrate (from 110 to 921600)
Settings are saved in a configuration file, so no need to enter values again at next start
Auto server start at application startup (unattended)
Auto disconnects if loosing link going back to “wait for connection” mode
Current version of the application has the following limitations:
Cannot be run as a Service as it is (but you can simply do it with extra configuration);
Not tested, but most probably work on Mac computers too.
Use this application on your own risk. I cannot be held responsible for any damage caused to your system.
To start the application in Windows, if you have previously installed Java Runtime (from Oracle), just click on the file (jAReC.jar). You will get the following window:
Using a terminal enter the following command when you are in the folder containing the program:
java –jar jAReC.jar
You will get the following window:
From the File menu select “Security”. You will get the following window.
Check to select/unselect authentication. Encryption is not available in the current version, only secure authentication. Authentication is selected by default. Enter a secret in the white field. This must be a string longer than 3 chars and cannot contain ‘*’ char. When you’re ready click “OK”
From the File menu select “Audio”. You will get the following window.
You need to select Audio In and Audio Out device to point to the audio interface connected to the transceiver.
Check “Use Audio” and press OK.
In order to use the application you need to configure the following parameters:
Serial port to be used (COMx for Windows or ttyUSBx / ttySx for Linux).
Serial Baudrate. You have the following available values: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, 256000, 460800 and 921600.
TCP Port. This can be any integer value between 1 and 65535. The computer will listen on this port for network connections to be redirected to the serial interface. If the port is in use, you will get an error message when trying to start listening.
NOTE: Please be aware that if you use audio, next TCP port after the one you entered will be used for audio streaming, so it must be a free one.
After you configure all 3 parameters, click START button to start listening on that port. If the chosen port is free, then the computer will start listening on that port and the window background will go yellow:
The IP address of the computer will be displayed in the upper part of the window as “MyIP: xxx.xxx.xxx.xxx”
You can now remotely connect to that socket (pair of IP address and TCP port, in the upper example: 192.168.33.2:9876).
The application window background will go yellow when listening for remote connections.
When the remote connection is established successfully, the window background will go green and the remote IP address will be displayed instead of local IP, as in the following picture:
All the parameters are now saved in the configuration file. If you close and then start again the application, the form will be automatically filled with the saved parameters, so no need to configure them again.
If you want that the application to automatically go into the listening mode when started, check “Autostart”.
At any time, if you click on STOP button, the connection will be dropped and the window background will go back gray.
When audio is used and a connection is established, the microphone level will be shown in a bar graph, in the lower right part of the window.
You can simultaneously start several instances of the application, one for each serial port you want to access through the network. If you have multiple transceivers, you can start one instance if the application for each of them. The only requirement is to use different TCP port for each connection, in order to have unique sockets.
Serial Port can be not only a local physical serial port (like COM on the motherboard or USB/Serial interface) but even a virtual COM port, for example the one created by a Bluetooth interface. You can connect in this way to your Bluetooth device over the network.
When you first download the application from my web site, there is no configuration file. This is automatically created at first run, in the same folder as the jar file. You can edit that configuration file using a simple text editor (do not use Word as it can render the file unusable). The filename is jsn.cfg and the format is the following:
#Sun Aug 23 15:36:45 EEST 2015
Each parameter is self-explanatory, corresponding with the ones from the GUI. The authentication/encryption password (secret) is stored as a SHA-1 hash, so you have no way to read it from the configuration file.
Version 0.1 (Feb 27th, 2014). First public release of the application
Version 0.4 (Aug 20th, 2014)
- add secure authentication support - cand be used only with Pocket RXTX Android application as a network client
- add full data encryption support (experimental, buggy)
- add audio support (for the moment only in the GUI, not functional yet)
- detect disconnection and go back to "waiting for connection" mode (yellow background)
Version 0.8 (Aug 23rd, 2015)
- bidirectional audio support with mic level meter
- name changed to jAReC, From (j)ava (A)udio and (Re)mote (Control)
- version number in sync with the Pocket RxTx Android application (for compatible features)
- deactivate START button when already started and STOP button when already stopped.
- changed and bigger icons for security and audio settings
- autostart function added
- reconnect to COM port and restart server if any parameter changed and previously connected
- 128 bytes symmetric key used for password encryption (instead of 64 in the previous version)
- compatible with Java 8
jAReC_v0.8.pdf Bucharest, Aug 23th 2015 – © Dan Toma – YO3GGX – firstname.lastname@example.org