CRX-COM - Control your radio equipement over network.

 

CRX-COM is an NodeJs application, witch purpose to control your radio station from your webrowser, 
this control is made with websockets technologies, and serialport/gpio management over TCP. 

CRX-COM server is control via CRX-RADIO-CLOUD websites : HAM/SWL :   https://dxham.crx.cloud/ and  CB  :  https://dxcb.crx.cloud/ 
If you want to install this system on your DXCLUSTER/WEBSITE, simply mail me i'll send you JS server package to install,
The code is 100% open-source. 

For CRX-COM, Client CLI control, see here an exemple (PI4+USB Button and WEBSOCAT Client/PHP) : 
https://bastien.barbe.pw/usb-control-and-triggerhappy-on-linux-for-hamradio/

Client side :  (you run a small program CRX-COM that map websocket server command to your TRX serial port). 
crxcomclient

CRX Cloud website : (site use websocket to communicate with your radio equipement via CRX-COM).
The online cloud, support mousse whell for frequency scrolling and also TRX polling system.

crxcom
Doc update : 28/02/2024
Software version : 1.0.4-5  - build 2023-10-22
Support : Icom, Yaesu, Kenwood, Electraft, MCHF.

History : 
- 1.0.4-5 : Update all JS depencies also NodeJS v16 and serialport v10.5.
- 1.0.4-3,4 : add S-METER function.
- 1.0.4-2 : Update all JS depencies (see package.json), tested with NodeJS v14.
- 1.0.4 : add Yaesu FT1000 serie support. 
- 1.0.3 : update to serialport v8.0.7 lastest version of NODEJS serial port control, update certificat in order to remove SSL warning. 
- 1.0.2 : service run in SSL mode (To prevent web browser problem with HTTPS website).
- 1.0.1 : add rotor/cw keyer in beta test. 
- 1.0.0 : start project 04/2019.

How to install CRX-COM service ? 

You have 3 methods to do that : 

DOCKER  (all plateform ).

NODEJS  ( all plateform ).

PACKAGES (64Bits).
 

1.Packages setup :

I've build for 64bits plateform the NODEJS package into a ZIP file for LINUX, MACOS and WINDOWS. 

- Simply unzip program and root it with root/administrator right needed for :
-> SERIAL PORT device operation,
 -> NETWORK Server operation ( open and listen on port 9090 TCP on your computer ). 

- To run, launch :   
./CRX-COM-win.exe   ( launch as administrator if needed ). 
If you want you  have also a WINDOWS INSTALLER see below.

On LINUX/MAC : 
chmod +x CRX-COM-linux
./CRX-COM-linux
or ./CRX-COM-macos

-> For WINDOWS User, it run only on 64 Bits plateform. 
-> Please accept FIREWALL opening port during the setup, it will open TCP 9090 on your network. 
-> For MAC user and LINUX : these binary are generated on DEBIAN-LINUX / WINDOWS 10 plateform so it didnt work all time,  if it's not OK, please use DOCKER or NODEJS install process. 

win
-  Windows installer
Windows no install,zip file.
linux
Linux no install, zip file.
mac
Mac no install, zip file.


After install the program and run-it, please configure SSL PART ( see part 4 ). 

A GIT is available here : https://git.crx.cloud/f4eyq/crx-com

2.  DOCKER setup method :

docker

The DOCKER method consist to run CRX-COM NODEJS server into a DOCKER container, 
With this method, it will run into isolated brick, it very simple to manage the CRX-COM service,
Simply start/stop your DOCKER container.

I've create a DockerFile for this, here the setup process, if you dont already have DOCKER on your computer : 

LINUX : 
# apt-get update
# apt-get install docker

We can download Dockerfile and build image : 

Single one line :
# rm -fr /tmp/crxcom/;mkdir /tmp/crxcom/;cd /tmp/crxcom/;wget https://project.crx.cloud/d/Dockerfile;docker build -t crx-com-docker:latest .;

Or step by step  : 
# rm -fr /tmp/crxcom/;
# mkdir /tmp/crxcom/;
# cd /tmp/crxcom/;
# wget https://project.crx.cloud/d/Dockerfile
# docker build -t crx-com-docker:latest .

Note that the Dockerfile use lastest source version :  https://project.crx.cloud/d/CRX-COM-njs-lastest.tgz

We can now run our DOCKER container : 
For that, we have now 2 images installed : 

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
crx-com-docker      latest              77f14ec91e13        7 minutes ago       319MB
mhart/alpine-node   16                  e0c094882982        8 days ago          80.1MB

To run CRX-COM use this command : 

# docker container run --privileged --publish 9090:9090 --detach --user=root -v /dev:/dev crx-com-docker

Here the map TCP port 9090 of our machine to the TCP 9090 of the container, because CRX-COM need serial port access,
we map our host /dev/ directory to the Docker container. 

You can now control the container via theses commands : 

# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
0c347df97b08        crx-com-docker      "node bin.js"       18 seconds ago      Up 16 seconds       0.0.0.0:9090->9090/tcp   youthful_goldwasser# docker stop 0c347df97b08
0c347df97b08

After install the program and run-it, please configure SSL PART ( see part 4 ). 

3.  NODEJS setup method :


For Raspberry it is here :
https://project.crx.cloud/Remote_ham_radio_station_setup_guide
https://project.crx.cloud/crx-com-rasb-ft817


You can also use DOCKER method see Docker method (2).

Note that this NODEJS method, will work on all plateform, 
i've test NODEJS version 10,11,12 and 14. 

First of all, you need NODEJS engine to run CRX-COM, you can download it here :

Windows : https://nodejs.org/dist/latest-v16.x/ (msi file).

Linux : (DEBIAN/UBUNTU/CENTOS) : via Digital-Ocean website tutorial. 

Mac : https://nodejs.org/dist/latest-v10.x/ (pkg file).

Or choose manualy a version : https://nodejs.org/en/download/ 

Note, i build the app with lastest version (CRX-COM run with NODEJS version 10 to 12). 

Download the CRX-COM NODEJS program : 

Download CRX-COM NODE JS package here  

or directly from GIT : https://git.crx.cloud/f4eyq/crx-com

Uncompress and install depandencies :

Now uncompress the package, and run this command into the CRX-COM folder : 

$> npm i

This will install the NODEJS app. 

Run the CRX-COM 

Now you can run the CRX-COM ( before go to CRX Website ) and configure the software via the "CAT" button on the CRX Website. 

For info, you must run the command with root, because the program need access to serial device. 

$>node bin.js

The server.js is launch via bin.js, it simply a little launcher ! 
Of course, you can build a little script : 

#!/bin/bash
cd /your/path/
node bin.js

And into config.ini  you can change the debug, and put program to silent mode, 
you can also change the TCP port. 

After install the program and run-it, please configure SSL PART ( see part 4 ). 


4.  Configure SSL Part 
 

CRX-COM use a self-signed certificate, valid to 2030, you need to setup this certificat only one time.
For next software update, the certificate doesnt need update on your computer certificats storage. 

To remove all SSL WARNING  from your webrowser : 

-> Follow step 1 and 2.

-> If you dont want to do that go to step 3 ( note for OPERA WEBROWSER you need to do step 1 & 2 ).

For GOOGLE CHROME and FIREFOX you can ignore this step.
The better way is to do theses steps to remove ANY ssl messages. 

Step 1 , import CRX certificate file : 

Open an explorer to :    C:\Program Files (x86)\crx-com\sslcert\     or on LINUX into your sslcert installation folder. 
Right clic on : cert.crt

Choose : install , you can choose actual user  and clic on next button : 

ssl 1      ssl 5

Validate by YES into the security warning, it a normal warning here : 

ssl 7  ssl 9ssl 10

ssl 8

Step 2 , set the name into your host file : 

To remove any SSL warning to your webrowser, we have to map the NAME of the certificat with this IP ADRESS, 
The name is :      crx.com.lan   by default,   if you want to can generate another certificate with custom name (see gen.bash script into ssl folder). 

So For WINDOWS open hosts file :  c:\windows\system32\drivers\etc\hosts

And put this value :    ( 127.0.0.1 mean you run CRX-COM on your computer ). 

127.0.0.1 crx.com.lan

Of course if you run CRX-COM on another computer on your LAN, simply change 127.0.0.1 by the remote computer IP adress. 

ssl

Save the file ( in administrator mode ) ,   restart your webrowser , start CRX COM program. 

Now you can go to : https://crx.com.lan:9090/  without any warning. 

Go now to step 5 to configure now your radio-transceiver and IP information. 


Step 3 , optional, only if you dont want to import certificate : 

If you dont want to install certificate you will have to create security exception like this : 

Now run your web-browser on :   https://[COMPUTER IP/OR NAME]:9090/  
=> accept security warning (about certificate, it's normal). 

webbrowser1
Normally you must see this message : 
webbro2

You can now launch CRX Website, and configure the CAT system part.

Step 5 , configure your radio-transceiver on CRX-CLOUD : 

To launch configuration, click on "Traffic" button then click on the "Cat Paw" button  :
conf1

-> Put  your name or IP adress ( crx.com.lan or 127.0.0.1 or your LAN IP).
-> Click on Run-https button to check and accept webrowser security warning ( SSL certificate ). 
-> Choose your radio transceiver, data bitrate, and clic on "Save apply config, connect" button. 

conf2

Now you can try it, go to dx-cluster, band map, logbook or dx map, and try to clic-on a frequency.

If you want to install CRX CAT-SYSTEM component on your website (dxcluster/logbook), 
i can help you simply contact me on f4eyq ( at ) crx.cloud. 


4.  Configure LINUX Service  

If you want "CRX-COM" launch via SYSTEMD and automaticly on "startup" follow this part : 

Create this file :   /etc/systemd/system/crx_com_tcp.service

Adapt your setup path by changing "WorkingDirectory", here on Raspberry it's running in /opt/crx/crx-com/

[Unit]
Description=crx_com_tcp
Documentation=https://project.crx.cloud/crx-com
After=network.target

[Service]
WorkingDirectory=/opt/crx/crx-com
ExecStart=/usr/bin/node bin.js
User=pi
Type=simple
Restart=on-failure
RestartSec=500ms
RestartSec=1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=crx_com_tcp
Environment=NODE_ENV=prod
[Install]
WantedBy=multi-user.target

 

Now simply restart systemd : 

systemctl daemon-reload

systemctl enable crx_com_tcp.service

systemctl start crx_com_tcp.service

 

 

LAB F4EYQ : 

=> Test to add button to control QRG directly on RASPBERRY    (27/02/2024) :  +USB Multimedia button +FT897 : 
       https://bastien.barbe.pw/usb-control-and-triggerhappy-on-linux-for-hamradio/

=> Test Windows10 +MCHF WINDOWS10PC +TRX-MCHF (FT817 protocol) : https://bastien.barbe.pw/webcontrol-radio-transceiver/

=> Test Mobile Phone / Mumble / m.crx.cloud / CRX-COM (01/10/2021) : https://bastien.barbe.pw/ham-remote-station-on-mobile-phone/

=> Test WIFI/RASPBERRY/FT817 (04/04/2020) : https://bastien.barbe.pw/cat-system-en-wifi/

=> Test FT817+CRX-COM (15/06/2019) :  https://project.crx.cloud/crx-com-rasb-ft817