Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Tuesday, August 11, 2020

Kali Linux Virtual Box and the AWUS1900 USB WiFi Adapter

This is a continuation of the previous post.  Now that WiFi is enabled in the Kali Linux virtual machine.  I have to log out, shutdown the machine and then plug in the AWUS1900 into the Windows host with the appropriate driver already installed from https://store.rokland.com/pages/rokland-technologies-support..

After Windows recognizes the AWUS1900 adapter,  I return to the Virtual Box setting for USB and add a USB 3.0 controller for "Realtek 80211ac NIC".

Then I unplug the WiFi Adapter and start the Kali Linux Virtual machine.

Inside the Kali Linux Virtual machine I open a browser and follow  https://www.youtube.com/watch?v=81bWw7VOlVA&feature=youtu.be to install the AWUS1900 Linux Drivers.

Then I plug back in the AWUS1900 WiFi adapter and after left clicking the network connection icon at the top of the Kali desktop screen, I see available networks.

Hallelujah, sweet Mary, mother of Jesus.

Kali Linux Virtual Box Enable Wireless Interface

After installing the virtual machine: "VirtualBox-6.1.10-138449-Win.exe" and the extension for it: "Oracle_VM_VirtualBox_Extension_Pack-6.1.12.vbox-extpack", I imported the appliance: "kali-linux-2020.2a-vbox-amd64.ova" and discovered that when right clicking on the network icon in the top right corner of the the Kali desktop there was no option for "Enable WiFi".

I followed the instructions at https://thetechrim.com/fix-wireless-drivers-problem-in-kali-linux2020/.

The only difference is that I used "sudo make unload" and "sudo make load".

Now I will see if I can get the Kali Linux virtual machine to recognize the USB Wifi adapter.

PS: I also saved a copy of the necessary files at https://drive.google.com/file/d/1TyZSLGacFpv2GxpUwQ1GAShIUqi6IDPg/view?usp=sharing


Sunday, August 9, 2020

Kali Linux, HackRF One and GNURadio Not Generating Osmocom Sink

sudo apt-get install hackrf libhackrf_dev libhackrf0
sudo ldconfig
sudo hackrf_info
sudo apt-get install gnuradio gr-osmosdr gr-gsm
sudo ldconfig
sudo gnuradio-companion

The following construct kept generating errors in the Python code that alternated among gain_mode0, irq_balance0 or dc_offset NOT FOUND.  I installed GNURadio with sudo apt-get install gnuradio gr-osmsdr gr-gsm.

Mind you that Osmocom source generated okay but not Osmocom Sink.  After repeatedly failing to build gr-osmosdr from source, I went directly to the file "/usr/share/gnuradio/grc/blocks/osmosdr_sink.block.yml" and removed all the code between:

"make: |
    osmosdr.sink(
        args="numchan=" + str(${nchan}) + " " + ${args}
    )"

AND

"documentation: |-
  The osmocom sink block:"

Then I put back only the following lines:

self.${id}.set_sample_rate(${sample_rate})
    % if context.get('nchan')() > 0:
    self.${id}.set_center_freq(${freq0}, 0)
    self.${id}.set_freq_corr(${corr0}, 0)
    self.${id}.set_gain(${gain0}, 0)
    self.${id}.set_if_gain(${if_gain0}, 0)
    self.${id}.set_bb_gain(${bb_gain0}, 0)
    self.${id}.set_antenna(${ant0}, 0)
    self.${id}.set_bandwidth(${bw0}, 0)
    % endif
  callbacks:
    - set_sample_rate(${sample_rate})
    - set_center_freq(${freq0}, 0)
    - set_freq_corr(${corr0}, 0)
    - set_gain(${gain0}, 0)
    - set_if_gain(${if_gain0}, 0)
    - set_bb_gain(${bb_gain0}, 0)
    - set_antenna(${ant0}, 0)
    - set_bandwidth(${bw0}, 0) 

And I set defaults in "/usr/share/gnuradio/grc/blocks/osmosdr_sink.block.yaml" to what I would normally use.

Now this construct interacts with a Harbor Breeze ceiling fan using a file that contains the captured signal between the remote and the fan.  

Oh joy.

 

Saturday, August 8, 2020

HackRF One and Harbor Breeze Ceiling Fan

Using a software defined radio (SDR) program call GNURadio, I was able to control a Harbor Breeze ceiling fan from my computer. Imagine replacing "Harbor Breeze" with "Mercedes Key Fob". How secure is your car? 

 PS: I followed the instructions here to install GNURadio on Windows 10. https://www.youtube.com/watch?v=gzrjkZJCBvI 


Files were obtained from here  https://drive.google.com/file/d/1E-fl3C55wpAZyqESjt1S5UyDY5Q_1sy2/view

Most of the wheel files were installed with pip install [package name], e.g.:

pip install lxml

pip install numpy

pip install PyQt5

pip install PythonQwt

pip install Cheetah3

pip install PyOpenGL

pip install setuptools==3.8.1

pip install PyGTK

Finally GNURadio was installed from http://www.gcndevelopment.com/gnuradio/downloads.htm 


Used v3.7.11 because 3.8 threw an error while trying to find the QT plugin.

Saturday, August 1, 2020

Kali Linux Building GNURadio from Source to Possibly Enhance Performance

This is where I keep notes to remind me of what I am doing, because I tend to rush through solutions and forget what I did just 2 minutes ago,

Turns out that pybind may be important later on when studying GSM signals.
Found out that I cannot simply do a "pip install pybind11", because only C header files are downloaded with no cmake configuration.
So build from source:
git clone https://github.com/pybind/pybind11
cd pybind11
mkdir build
cd build
cmake ..
sudo make install
Somewhere in the above process I got an error on pytest.
So, pip3 install pytest
Then, export PATH=$PATH:/home/mya55/.local/bin , which happens to be where pytest landed.
Then, continue with cmake .. , sudo make install. (SUDO because may not have write access on target directories.)
Now follow instructions starting at the section Installing Volk. https://wiki.gnuradio.org/index.php/InstallingGR#Step_2:_Installing_Volk

During make, got "cannot find -lgsl::gsl", so
sudo apt-get install libgsl-dev.
Then start over with
sudo cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../

Now what's messed up is that I also ran
sudo apt-get install gnuradio
to see what would happen.
Now there is a /bin/gnuradio-companion and
/usr/bin/gnuradio-companion and
/usr/local/bin/gnuradio-companion
The shell execution path is /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
For now, I will leave things alone, because simply typing "gnuradio-companion" on the first shell prompt works.
Now I will test the HackRF One's ability to detect GSM signals coming from my own phone. See https://osmocom.org/projects/gr-gsm/wiki/Installation