mirror of
				https://github.com/fairwaves/UHD-Fairwaves.git
				synced 2025-11-04 05:53:17 +00:00 
			
		
		
		
	Compare commits
	
		
			11 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					dc5718daea | ||
| 
						 | 
					25394541fa | ||
| 
						 | 
					3c240a2ab2 | ||
| 
						 | 
					e4c59df63e | ||
| 
						 | 
					ad8ff4a345 | ||
| 
						 | 
					4f909bcfa2 | ||
| 
						 | 
					9309e3c548 | ||
| 
						 | 
					6b5ff4a460 | ||
| 
						 | 
					53e7e5597f | ||
| 
						 | 
					a89917faae | ||
| 
						 | 
					b600665303 | 
							
								
								
									
										19
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,22 @@
 | 
				
			|||||||
 | 
					umtrx (1.0.7) trusty; urgency=low
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * host: Properly handle most corner cases in VSWR calculations
 | 
				
			||||||
 | 
					  * host: Add "STRING" to umtrx_monitor error output
 | 
				
			||||||
 | 
					  * host: Add string getters/setters to the Python property tree library
 | 
				
			||||||
 | 
					  * host: Checking in umtrx_query_versions.py
 | 
				
			||||||
 | 
					  * debian: packaged python utils in host/utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 -- Kirill Zakharenko <earwin@gmail.com>  Mon, 25 Dec 2015 19:35:56 +0100
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					umtrx (1.0.6) trusty; urgency=low
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * host: make boost property tree thread safe
 | 
				
			||||||
 | 
					  * host: support string type in JSON query
 | 
				
			||||||
 | 
					  * debian: build now produces an additional package with debug symbols
 | 
				
			||||||
 | 
					  * umtrx_firmware: fixed typo preventing it from working
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 -- Kirill Zakharenko <earwin@gmail.com>  Mon, 21 Dec 2015 14:23:56 +0300
 | 
				
			||||||
 | 
					
 | 
				
			||||||
umtrx (1.0.5) trusty; urgency=low
 | 
					umtrx (1.0.5) trusty; urgency=low
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  * host: disable umtrx_fifo_ctrl cache of spi config
 | 
					  * host: disable umtrx_fifo_ctrl cache of spi config
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@@ -31,3 +31,10 @@ Conflicts: umtrx-uhd
 | 
				
			|||||||
Replaces: umtrx-uhd
 | 
					Replaces: umtrx-uhd
 | 
				
			||||||
Description: Fairwaves UmTRX driver - UHD plugin module
 | 
					Description: Fairwaves UmTRX driver - UHD plugin module
 | 
				
			||||||
 The industrial grade dual-channel wide-band SDR transceiver.
 | 
					 The industrial grade dual-channel wide-band SDR transceiver.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Package: umtrx-dbg
 | 
				
			||||||
 | 
					Section: debug
 | 
				
			||||||
 | 
					Architecture: any
 | 
				
			||||||
 | 
					Depends: umtrx, uhd-umtrx, ${misc:Depends}
 | 
				
			||||||
 | 
					Description: Fairwaves UmTRX driver - debug symbols
 | 
				
			||||||
 | 
					 The industrial grade dual-channel wide-band SDR transceiver.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@@ -16,3 +16,6 @@ export DH_OPTIONS
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
override_dh_auto_configure:
 | 
					override_dh_auto_configure:
 | 
				
			||||||
	dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)"
 | 
						dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					override_dh_strip:
 | 
				
			||||||
 | 
						dh_strip --dbg-package=umtrx-dbg
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								debian/umtrx.install
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/umtrx.install
									
									
									
									
										vendored
									
									
								
							@@ -1,2 +1,4 @@
 | 
				
			|||||||
usr/bin
 | 
					usr/bin
 | 
				
			||||||
images/u2plus_umtrx_v2.bin images/umtrx_txrx_uhd.bin usr/share/umtrx/firmware
 | 
					images/u2plus_umtrx_v2.bin images/umtrx_txrx_uhd.bin usr/share/umtrx/firmware
 | 
				
			||||||
 | 
					host/utils/umtrx_property_tree.py host/utils/umtrx_vswr.py usr/share/umtrx
 | 
				
			||||||
 | 
					host/utils/umtrx_query_sensors.py host/utils/umtrx_query_versions.py host/utils/umtrx_net_burner.py usr/share/umtrx
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								debian/umtrx.links
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								debian/umtrx.links
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					/usr/share/umtrx/umtrx_net_burner.py /usr/bin/umtrx_net_burner
 | 
				
			||||||
 | 
					/usr/share/umtrx/umtrx_query_sensors.py /usr/bin/umtrx_query_sensors
 | 
				
			||||||
 | 
					/usr/share/umtrx/umtrx_query_versions.py /usr/bin/umtrx_query_versions
 | 
				
			||||||
@@ -128,6 +128,10 @@ if (UNIX)
 | 
				
			|||||||
    list(APPEND UMTRX_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
 | 
					    list(APPEND UMTRX_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#make boost property tree thread safe
 | 
				
			||||||
 | 
					#http://stackoverflow.com/questions/8156948/is-boostproperty-treeptree-thread-safe
 | 
				
			||||||
 | 
					add_definitions(-DBOOST_SPIRIT_THREADSAFE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
########################################################################
 | 
					########################################################################
 | 
				
			||||||
# Helpful compiler flags
 | 
					# Helpful compiler flags
 | 
				
			||||||
########################################################################
 | 
					########################################################################
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -187,7 +187,8 @@ void umtrx_impl::client_query_handle1(const boost::property_tree::ptree &request
 | 
				
			|||||||
    else if (action == "GET")
 | 
					    else if (action == "GET")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        const std::string type = request.get("type", "");
 | 
					        const std::string type = request.get("type", "");
 | 
				
			||||||
        if (type.empty()) response.put("error", "type field not specified: BOOL, INT, DOUBLE, SENSOR, RANGE");
 | 
					        if (type.empty()) response.put("error", "type field not specified: STRING, BOOL, INT, DOUBLE, SENSOR, RANGE");
 | 
				
			||||||
 | 
					        else if (type == "STRING") response.put("result", _tree->access<std::string>(path).get());
 | 
				
			||||||
        else if (type == "BOOL") response.put("result", _tree->access<bool>(path).get());
 | 
					        else if (type == "BOOL") response.put("result", _tree->access<bool>(path).get());
 | 
				
			||||||
        else if (type == "INT") response.put("result", _tree->access<int>(path).get());
 | 
					        else if (type == "INT") response.put("result", _tree->access<int>(path).get());
 | 
				
			||||||
        else if (type == "DOUBLE") response.put("result", _tree->access<double>(path).get());
 | 
					        else if (type == "DOUBLE") response.put("result", _tree->access<double>(path).get());
 | 
				
			||||||
@@ -218,7 +219,8 @@ void umtrx_impl::client_query_handle1(const boost::property_tree::ptree &request
 | 
				
			|||||||
    else if (action == "SET")
 | 
					    else if (action == "SET")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        const std::string type = request.get("type", "");
 | 
					        const std::string type = request.get("type", "");
 | 
				
			||||||
        if (type.empty()) response.put("error", "type field not specified: BOOL, INT, DOUBLE");
 | 
					        if (type.empty()) response.put("error", "type field not specified: STRING, BOOL, INT, DOUBLE");
 | 
				
			||||||
 | 
					        else if (type == "STRING") _tree->access<std::string>(path).set(request.get<std::string>("value"));
 | 
				
			||||||
        else if (type == "BOOL") _tree->access<bool>(path).set(request.get<bool>("value"));
 | 
					        else if (type == "BOOL") _tree->access<bool>(path).set(request.get<bool>("value"));
 | 
				
			||||||
        else if (type == "INT") _tree->access<int>(path).set(request.get<int>("value"));
 | 
					        else if (type == "INT") _tree->access<int>(path).set(request.get<int>("value"));
 | 
				
			||||||
        else if (type == "DOUBLE") _tree->access<double>(path).set(request.get<double>("value"));
 | 
					        else if (type == "DOUBLE") _tree->access<double>(path).set(request.get<double>("value"));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,6 @@
 | 
				
			|||||||
# Build and Install the UmTRX utils
 | 
					# Build and Install the UmTRX utils
 | 
				
			||||||
########################################################################
 | 
					########################################################################
 | 
				
			||||||
INSTALL(PROGRAMS
 | 
					INSTALL(PROGRAMS
 | 
				
			||||||
    umtrx_net_burner
 | 
					 | 
				
			||||||
    umtrx_nmea
 | 
					    umtrx_nmea
 | 
				
			||||||
    umtrx_gps_coord
 | 
					    umtrx_gps_coord
 | 
				
			||||||
    umtrx_auto_calibration
 | 
					    umtrx_auto_calibration
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case word in
 | 
					case $1 in
 | 
				
			||||||
    flash )
 | 
					    flash )
 | 
				
			||||||
        umtrx_net_burner --addr=192.168.10.2 --fpga=/usr/share/umtrx/firmware/u2plus_umtrx_v2.bin --fw=/usr/share/umtrx/firmware/umtrx_txrx_uhd.bin --reset
 | 
					        umtrx_net_burner --addr=192.168.10.2 --fpga=/usr/share/umtrx/firmware/u2plus_umtrx_v2.bin --fw=/usr/share/umtrx/firmware/umtrx_txrx_uhd.bin --reset
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,6 +59,10 @@ class umtrx_property_tree:
 | 
				
			|||||||
    self._send_request('GET', path, value_type='RANGE')
 | 
					    self._send_request('GET', path, value_type='RANGE')
 | 
				
			||||||
    return self._recv_response()
 | 
					    return self._recv_response()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def query_string_raw(self, path):
 | 
				
			||||||
 | 
					    self._send_request('GET', path, value_type='STRING')
 | 
				
			||||||
 | 
					    return self._recv_response()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
  # Getters (value)
 | 
					  # Getters (value)
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
@@ -83,6 +87,10 @@ class umtrx_property_tree:
 | 
				
			|||||||
    res = self.query_range_raw(path)
 | 
					    res = self.query_range_raw(path)
 | 
				
			||||||
    return res['result']
 | 
					    return res['result']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def query_string_value(self, path):
 | 
				
			||||||
 | 
					    res = self.query_string_raw(path)
 | 
				
			||||||
 | 
					    return res['result']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
  # Setters
 | 
					  # Setters
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
@@ -99,6 +107,10 @@ class umtrx_property_tree:
 | 
				
			|||||||
    self._send_request('SET', path, value_type='DOUBLE', value=val)
 | 
					    self._send_request('SET', path, value_type='DOUBLE', value=val)
 | 
				
			||||||
    return self._recv_response()
 | 
					    return self._recv_response()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def set_string(self, path, val):
 | 
				
			||||||
 | 
					    self._send_request('SET', path, value_type='STRING', value=val)
 | 
				
			||||||
 | 
					    return self._recv_response()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
  # Check path presence and list paths
 | 
					  # Check path presence and list paths
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								host/utils/umtrx_query_versions.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								host/utils/umtrx_query_versions.py
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env python
 | 
				
			||||||
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##########################
 | 
				
			||||||
 | 
					###  Query sensors
 | 
				
			||||||
 | 
					##########################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from umtrx_property_tree import umtrx_property_tree
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					s = umtrx_property_tree()
 | 
				
			||||||
 | 
					s.connect()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mb_path="/mboards/0"
 | 
				
			||||||
 | 
					fpga_version = s.query_string_value(mb_path+"/fpga_version")
 | 
				
			||||||
 | 
					fw_version = s.query_string_value(mb_path+"/fw_version")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					print "FPGA bitstream version: %s" % fpga_version
 | 
				
			||||||
 | 
					print "ZPU firmware version: %s" % fw_version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					s.close()
 | 
				
			||||||
@@ -46,6 +46,8 @@ class umtrx_vswr:
 | 
				
			|||||||
    gamma = self._gamma
 | 
					    gamma = self._gamma
 | 
				
			||||||
    if gamma == 1.0:
 | 
					    if gamma == 1.0:
 | 
				
			||||||
      return float("inf")
 | 
					      return float("inf")
 | 
				
			||||||
 | 
					    elif gamma > 1.0:
 | 
				
			||||||
 | 
					      return float("nan")
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
      return (1+gamma)/(1-gamma)
 | 
					      return (1+gamma)/(1-gamma)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -54,15 +56,21 @@ class umtrx_vswr:
 | 
				
			|||||||
    gamma = self._gamma
 | 
					    gamma = self._gamma
 | 
				
			||||||
    if gamma == 1.0:
 | 
					    if gamma == 1.0:
 | 
				
			||||||
      return float("-inf")
 | 
					      return float("-inf")
 | 
				
			||||||
 | 
					    elif gamma > 1.0:
 | 
				
			||||||
 | 
					      return float("nan")
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
      return -10.0 * math.log(1.0-gamma*gamma, 10)
 | 
					      return -10.0 * math.log(1.0-gamma*gamma, 10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def pf_rate(self):
 | 
					  def pf_rate(self):
 | 
				
			||||||
    ''' Estimated reflected power rate, % '''
 | 
					    ''' Estimated reflected power rate, % '''
 | 
				
			||||||
    gamma = self._gamma
 | 
					    gamma = self._gamma
 | 
				
			||||||
 | 
					    if gamma > 1.0:
 | 
				
			||||||
 | 
					      return float("nan")
 | 
				
			||||||
    return 1.0 - gamma*gamma
 | 
					    return 1.0 - gamma*gamma
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def pr_rate(self):
 | 
					  def pr_rate(self):
 | 
				
			||||||
    ''' Estimated reflected power rate, % '''
 | 
					    ''' Estimated reflected power rate, % '''
 | 
				
			||||||
    gamma = self._gamma
 | 
					    gamma = self._gamma
 | 
				
			||||||
 | 
					    if gamma > 1.0:
 | 
				
			||||||
 | 
					      return float("nan")
 | 
				
			||||||
    return gamma*gamma
 | 
					    return gamma*gamma
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user