Changes between Initial Version and Version 1 of SDR


Ignore:
Timestamp:
03/24/2021 03:49:10 AM (17 months ago)
Author:
Cale Collins
Comment:

first draft

Legend:

Unmodified
Added
Removed
Modified
  • SDR

    v1 v1  
     1= Software Defined Radios - What are they?
     2
     3A software defined radio (SDR) is a radio which can modulate and demodulate radio signals through software commands provided by a computer.   
     4
     5== When should I use one?
     6
     7Software defined radios can be used in any radio application.  The Epiq Sidekiq Z2 used in this testing can tune to any frequency between 40Mhz and 6Ghz.  That covers a lot of air, below FM radio to above standard Wi-Fi signals can be analyzed with this hardware. 
     8
     9== Who is Epiq?
     10
     11From their website, "Epiq Solutions develops cutting edge tools for engineering teams and government-focused organizations requiring situational awareness and detailed insight into their RF environments in order to identify and act against wireless threats".  Not only that they're nice guys, we know because we have worked with them for a long time.  Check out their web page - [https://epiqsolutions.com/]
     12
     13= Configuring the Epiq Sidekiq Z2 to work with Gateworks
     14
     15Materials required:
     16
     17* Gateworks SBC with latest Gateworks-Ubuntu image installed (In this testing GW6300 was used)
     18* Epiq Z2
     19* Two antennas
     20* Serial Console and network connections to the Gateworks SBC
     21
     22The Z2 can be used independently of Gateworks products with its (included) USB adapter. Before connecting your Z2 to a Gateworks board it's best to verify it's functionality and check that your antenna connections are being made correctly.  If you will be using [link to ERA] now is a good time to install it.
     23
     24== Hardware configuration
     25
     26Attach the Z2 to the Gateworks SBC in any slot where USB signaling is provided. 
     27
     28Verify antennas are attached to RX and TX U.FL connectors on the Z2.
     29
     30== Software configuration
     31
     32Follow the instructions [wiki:/ubuntu#SSHServer here] to enable "root" access via SSH.  This requires using the serial console. 
     33
     34With that done log into the Gateworks via SSH as root.  Do not use screen for a serial console.  Screen will be used to connect to the SDR and a screen session should not be ran within another.
     35
     36Access the Z2 via serial console from the Gateworks SBC
     37
     38{{{#!bash
     39screen /dev/ttyACM0
     40}}}
     41
     42Username "root"
     43Password "epiq"
     44
     45Execute the following commands to switch the SDR into USB-CDC mode for Linux
     46
     47{{{#!bash
     48fw_setenv udc_config_mode 1
     49reboot
     50}}}
     51
     52After the SDR had completed its power cycle log back in and verify the changes have been made:
     53{{{
     54fw_print_env udc_config_mode
     55#udc_config_mode=1 will be displayed
     56}}}
     57
     58Exit screen "ctrl + a", ":"", "quit"
     59
     60Verify a network interface has been created, for this testing it is named eth2
     61
     62{{{
     63root@focal-newport:~# dmesg |grep cdc_ether
     64[   12.619443] cdc_ether 3-1:1.0 eth2: register 'cdc_ether' at usb-0000:00:11.0-1, CDC Ethernet Device, 00:e0:22:01:7d:15
     65[   12.619589] usbcore: registered new interface driver cdc_ether
     66
     67}}}
     68
     69{{{
     70root@focal-newport:~# ls /sys/class/net/
     71can0  eth0  eth1  eth2  lo
     72}}}
     73
     74Assign the interface a DHCP address:
     75{{{
     76dhclient eth2
     77}}}
     78
     79If config will show eth2 with the address 192.168.3.9, counterintuitively SSH connections can be made to the Z2 at the 192.168.3.1 address "ssh root@192.168.3.1"
     80
     81== ERA
     82
     83ERA is Epiq's proprietary RF analyzer software.  Check it out [https://epiqsolutions.com/rf-sensing/era/ here]
     84
     85Install Epiq ERA software on the Z2, instructions and files provided by Epiq.
     86
     87Launch ERA and allow the shell to run
     88
     89=== Port forwarding using nftables
     90
     91Nftables allows packets to be forwarded from the Gateworks network interface to the Z2 interface and back out to an external network.  This will allow access to the ERA web interface from a desktop workstation browser
     92
     93Install nftables and start the service
     94
     95{{{#!bash
     96apt install nftables -y
     97systemctl enable nftables.service
     98systemctl start nftables.service
     99}}}
     100
     101
     102Check if ip forwarding is enabled, by default it is not.
     103
     104{{{#!bash
     105root@focal-newport:~# sysctl net.ipv4.ip_forward
     106net.ipv4.ip_forward = 1 #0 is disabled
     107}}}
     108
     109To enable ip forwarding
     110
     111{{{#!bash
     112sudo sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
     113sudo sysctl -p
     114}}}
     115
     116Configure nftables by copying these commands individually, replace 192.168.0.1 with the IP address of the interface on the Gateworks which is connected to your network (the same used for connecting with SSH)
     117
     118{{{#!bash
     119
     120nft flush ruleset # clear existing rule set
     121nft add table nat
     122
     123nft 'add chain nat postrouting { type nat hook postrouting priority 100 ; }'
     124nft 'add chain nat prerouting { type nat hook prerouting priority -100; }'
     125
     126nft 'add rule nat prerouting ip daddr 192.168.0.1 tcp dport { 3000 } dnat 192.168.3.1:3000'
     127
     128nft add rule nat postrouting masquerade
     129}}}
     130
     131Verify your changes
     132
     133{{{#!bash
     134nft list ruleset
     135}}}
     136
     137Make the ruleset persistant
     138{{{#!bash
     139nft list ruleset | tee /etc/nftables.conf
     140}}}
     141
     142Open a web browser on your workstation, connect to the running ERA server by typing 192.168.0.1:3000, really <the Gateworks IP>:3000
     143
     144Enjoy ERA from your workstation. 
     145