RemoteRF 0.0.4__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {remoterf-0.0.4/src/remoteRF.egg-info → remoterf-0.0.6}/PKG-INFO +1 -1
- remoterf-0.0.6/README.md +130 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/setup.py +1 -1
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/drivers/adalm_pluto/pluto_remote.py +11 -1
- {remoterf-0.0.4 → remoterf-0.0.6/src/remoteRF.egg-info}/PKG-INFO +1 -1
- remoterf-0.0.4/README.md +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/LICENSE +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/MANIFEST.in +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/setup.cfg +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/grpc/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/grpc/grpc_pb2.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/grpc/grpc_pb2_grpc.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/utils/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/utils/ansi_codes.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/utils/api_token.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/utils/list_string.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/common/utils/process_arg.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/acc_login.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/app.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/ca.crt +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/ca.key +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/cert.pem +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/key.pem +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/server.crt +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/certs/server.key +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/grpc_acc.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/core/grpc_client.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/drivers/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF/drivers/adalm_pluto/__init__.py +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF.egg-info/SOURCES.txt +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF.egg-info/dependency_links.txt +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF.egg-info/entry_points.txt +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF.egg-info/requires.txt +0 -0
- {remoterf-0.0.4 → remoterf-0.0.6}/src/remoteRF.egg-info/top_level.txt +0 -0
remoterf-0.0.6/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Remote RF
|
|
2
|
+
|
|
3
|
+
A python API to remotely access signal centric hardware. Courtesy of Wireless Lab @ UCLA.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- **Python 3.12 or later**: This package requires Python 3.12+. If you don’t have Python installed, you can download it from the [official Python website](https://www.python.org/downloads/).
|
|
8
|
+
|
|
9
|
+
To check your current Python version, open a terminal and run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **UCLA VPN**: Please ensure that you are connected to the UCLA VPN. You can download and configure the VPN client from the following link: [UCLA VPN Client Download](https://www.it.ucla.edu/it-support-center/services/virtual-private-network-vpn-clients). If you’re not connected to the VPN, you will not have access to the lab servers.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install remoteRF. It is recommended that you install this package within a [virtual environment](https://docs.python.org/3/library/venv.html).
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install remoteRF
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If `pip install` doesn't work, you can clone the [source](https://github.com/WirelessLabAtUCLA/RemoteRF-Client) directly from github.
|
|
26
|
+
|
|
27
|
+
<!-- 1. **Clone the repository:**
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/WirelessLabAtUCLA/RemoteRF-Client
|
|
30
|
+
cd repository-name
|
|
31
|
+
```
|
|
32
|
+
2. **Install the package using** `pip` **in editable mode:**
|
|
33
|
+
```bash
|
|
34
|
+
pip install -e .
|
|
35
|
+
```
|
|
36
|
+
This command installs the package in "editable" mode, allowing for modifications to the local code without reinstalling. For more details on installing packages from local directories, refer to Python Packaging: [Installing from Local Archives](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-packages-from-local-archives). -->
|
|
37
|
+
|
|
38
|
+
## Reservation
|
|
39
|
+
|
|
40
|
+
Usage of the platform requires you to register a account and reserve a device in order to run scripts remotely.
|
|
41
|
+
|
|
42
|
+
### 1. **Start UCLA VPN**
|
|
43
|
+
|
|
44
|
+
- Start the CISCO Secure client, login and connect to any of the options.
|
|
45
|
+
|
|
46
|
+
### 2. **Register a account**:
|
|
47
|
+
```bash
|
|
48
|
+
remoterf-login # Run in the terminal where the Python library is installed
|
|
49
|
+
|
|
50
|
+
# Typically, this will be the terminal where you’ve activated the virtual environment if you’re using one
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- Input `r` to register a account, or `l` to login to a existing one.
|
|
54
|
+
|
|
55
|
+
<!-- 2. **You will be prompted with this**: -->
|
|
56
|
+
```bash
|
|
57
|
+
Welcome to Remote RF Account System.
|
|
58
|
+
Please login or register to continue. (l/r):
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Once in, input `help` to see all avaliable commands.
|
|
62
|
+
|
|
63
|
+
### 3. **Reserve Device**:
|
|
64
|
+
```bash
|
|
65
|
+
getdev # To view all avaliable devices
|
|
66
|
+
|
|
67
|
+
# Note the device ID. You will need this later to reserve said device
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
getres # To view times not avaliable
|
|
72
|
+
|
|
73
|
+
# Optionally, you can also view all reservations, and determine a time slot you want a specific device reserved
|
|
74
|
+
```
|
|
75
|
+
```bash
|
|
76
|
+
perms # To view your permissions
|
|
77
|
+
|
|
78
|
+
# Depending on your permission levels, you will be given different restrictions
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
resdev # To reserve a device
|
|
83
|
+
|
|
84
|
+
Enter the device ID you would like to reserve: 0
|
|
85
|
+
Reserve Start Time (YYYY-MM-DD HH:MM): 2024-11-20 10:20
|
|
86
|
+
Reserve End Time (YYYY-MM-DD HH:MM): 2024-11-20 11:20
|
|
87
|
+
|
|
88
|
+
# Time is military time. You can also use arrow keys to cycle between previous commands.
|
|
89
|
+
|
|
90
|
+
Reservation successful. Thy Token -> example_token
|
|
91
|
+
|
|
92
|
+
# Take note of this token. You will need it to actually access the device.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Remote Access
|
|
96
|
+
|
|
97
|
+
With this token, you can now run scripts remotely. Please keep in mind that you MUST be connected to the UCLA VPN for this to work.
|
|
98
|
+
Here is a explained sample script to get you going!
|
|
99
|
+
|
|
100
|
+
#### Python Script:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from remoteRF.drivers.adalm_pluto import * # Imports device Pluto SDR remote drivers. Change depending on desired device.
|
|
104
|
+
|
|
105
|
+
sdr = adi.Pluto( # Device initialization.
|
|
106
|
+
token = 'sample_token' # Place the prior token here.
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# You can now use this 'sdr' as you normally would with the default Pluto drivers.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
If converting a existing `non-remoteRF` compatible script:
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
- import existing_device_drivers
|
|
116
|
+
|
|
117
|
+
+ from remoteRF.drivers.device_drivers import *
|
|
118
|
+
|
|
119
|
+
- device = device(init)
|
|
120
|
+
|
|
121
|
+
+ device = device(token = 'sample_token')
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Nothing else needs changing!
|
|
125
|
+
|
|
126
|
+
## Closing
|
|
127
|
+
|
|
128
|
+
This is fundamentally a experimental platform, and there will be many unknown bugs and issues. Some devices do not have universal support for all its functions at the moment, I am working on that aspect.
|
|
129
|
+
|
|
130
|
+
**So please submit feedback!**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from ...core.grpc_client import rpc_client
|
|
2
2
|
from ...common.utils import *
|
|
3
3
|
from ...common.grpc import grpc_pb2
|
|
4
|
+
from ...core.grpc_client import get_tcp_calls
|
|
4
5
|
|
|
5
6
|
class rx_def:
|
|
6
7
|
pass
|
|
@@ -16,14 +17,18 @@ class ad9364(rx_tx_def):
|
|
|
16
17
|
|
|
17
18
|
class Pluto: # client
|
|
18
19
|
|
|
19
|
-
def __init__(self, token=''):
|
|
20
|
+
def __init__(self, token='', debug=False):
|
|
20
21
|
self.token = token
|
|
21
22
|
# self.try_set(function_name="ip", value=grpc_pb2.Argument(string_value=ip))
|
|
22
23
|
|
|
24
|
+
if debug:
|
|
25
|
+
print("Pluto Remote Client Initialized.")
|
|
26
|
+
|
|
23
27
|
def api_token(self, token:str) -> None:
|
|
24
28
|
self.token = token
|
|
25
29
|
|
|
26
30
|
def try_get(self, *, function_name):
|
|
31
|
+
self.test_print() # For debugging purposes
|
|
27
32
|
try:
|
|
28
33
|
return rpc_client(function_name=f"Pluto:{function_name}:GET", args={'a':map_arg(self.token)}).results[function_name]
|
|
29
34
|
except Exception as e:
|
|
@@ -31,10 +36,15 @@ class Pluto: # client
|
|
|
31
36
|
return None
|
|
32
37
|
|
|
33
38
|
def try_set(self, *, function_name, value):
|
|
39
|
+
self.test_print() # For debugging purposes
|
|
34
40
|
try:
|
|
35
41
|
rpc_client(function_name=f"Pluto:{function_name}:SET", args={function_name: value, 'a':map_arg(self.token)})
|
|
36
42
|
except Exception as e:
|
|
37
43
|
input(f"Error: {e}\nHit enter to continue...")
|
|
44
|
+
|
|
45
|
+
def test_print(self):
|
|
46
|
+
if get_tcp_calls() % 50 == 0:
|
|
47
|
+
print(f'TCP Call Number: {get_tcp_calls()}')
|
|
38
48
|
|
|
39
49
|
#region ad9364
|
|
40
50
|
|
remoterf-0.0.4/README.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|