Remote Desktop
Remote Desktop mode streams the NanoVNA-H display to a connected PC, allowing you to view the screen remotely and control the device through simulated touch input.
How It Works
Section titled “How It Works”When Remote Desktop is enabled:
- The NanoVNA-H sends display updates over USB
- PC software renders the screen in a window
- Mouse clicks are sent back as touch events
- You can control the device without touching the screen
Enable Remote Desktop
Section titled “Enable Remote Desktop”Via Shell Command
Section titled “Via Shell Command”refresh onThis enables display streaming over USB.
Via Menu
Section titled “Via Menu”- Connect to the device via shell
- Send
refresh oncommand - The device begins streaming
Disable Remote Desktop
Section titled “Disable Remote Desktop”refresh offUsing Remote Control
Section titled “Using Remote Control”The firmware supports simulated touch via shell commands:
Touch Commands
Section titled “Touch Commands”# Simulate touch at coordinates x, ytouch 160 120
# Release touch (optional coordinates)releaserelease 160 120Coordinates
Section titled “Coordinates”The coordinate system matches the display:
| Model | Width | Height | Origin |
|---|---|---|---|
| NanoVNA-H | 320 | 240 | Top-left |
| NanoVNA-H4 | 480 | 320 | Top-left |
PC Software Support
Section titled “PC Software Support”NanoVNASharp
Section titled “NanoVNASharp”NanoVNASharp includes remote display:
- Connect to NanoVNA-H
- The display appears in the software window
- Click on the display to interact
NanoVNASaver
Section titled “NanoVNASaver”NanoVNASaver can display the screen:
- Connect to NanoVNA-H
- Go to Display menu
- Enable screen capture/display
Python Script
Section titled “Python Script”Create your own remote display:
import serialimport structfrom PIL import Imageimport tkinter as tk
class NanoVNARemote: def __init__(self, port): self.ser = serial.Serial(port, 115200, timeout=1) self.width = 320 self.height = 240
def enable_refresh(self): self.ser.write(b'refresh on\r\n')
def send_touch(self, x, y): self.ser.write(f'touch {x} {y}\r\n'.encode())
def send_release(self): self.ser.write(b'release\r\n')
def read_screen_data(self): # Read and decode screen data # Format depends on firmware version passData Format
Section titled “Data Format”The remote desktop protocol sends screen regions:
typedef struct { uint16_t x; // Region X position uint16_t y; // Region Y position uint16_t width; // Region width uint16_t height; // Region height} remote_region_t;Followed by pixel data in RGB565 format.
Practical Applications
Section titled “Practical Applications”Demonstration
Section titled “Demonstration”Show NanoVNA measurements on a larger screen:
- Connect NanoVNA-H to laptop
- Enable remote desktop
- Project laptop display
- Control NanoVNA from laptop
Documentation
Section titled “Documentation”Capture high-quality screenshots:
- Enable remote desktop
- Set up the measurement display
- Capture the PC window (better quality than device capture)
Remote Operation
Section titled “Remote Operation”Control the NanoVNA-H from a distance:
- Connect via long USB cable
- Enable remote desktop
- Control from PC while device is in test position
Automated Testing
Section titled “Automated Testing”Script touch interactions for automated tests:
# Automated menu navigationremote.send_touch(160, 120) # Open menutime.sleep(0.3)remote.send_release()remote.send_touch(80, 60) # Select optiontime.sleep(0.3)remote.send_release()Limitations
Section titled “Limitations”Performance Tips
Section titled “Performance Tips”Shell Command Reference
Section titled “Shell Command Reference”# Enable remote displayrefresh on
# Disable remote displayrefresh off
# Send touch event at x,ytouch x y
# Send release eventreleaserelease x yTroubleshooting
Section titled “Troubleshooting”No Display Updates
Section titled “No Display Updates”- Verify
refresh onis enabled - Check USB connection
- Try reconnecting
- Restart the NanoVNA-H
Sluggish Response
Section titled “Sluggish Response”- Use a shorter USB cable
- Close other USB devices
- Reduce sweep points for faster updates
Touch Not Working
Section titled “Touch Not Working”- Verify coordinates are within display bounds
- Check that device isn’t in a modal state
- Try explicit release before new touch