Using VNC on Tablet with Raspberry Pi via RNDIS Gadget support over USB


DD5ET
 

In another thread (Raspberry Pi + QDX + JS8Call), one post (by Mario Vano AE0GL) made reference to using a tablet with VNC to connect to an RPi via the Pi's built in RNDIS Gadget support over USB. When portable, I currently use a tablet with VNC to connect to an RPi via Wi-Fi using the RPi as a hotspot. I'm intrigued by the idea of tethering the tablet to the RPi via USB rather than Wi-Fi and using it as an Ethernet connection.

Can anyone explain how to do this, or point me in the direction of any instructions to do this?

Thanks.


HA3HZ
 

DD5ET,
you can send a message directly to the author of the article.
When you write it as a Reply (to whom you want to send it), click on the Private button.
Then your message will go as a reply to the linked message, without the forum members seeing it.
--
Gyula HA3HZ


DL2ARL
 

On Tue, Mar 28, 2023 at 09:33 AM, HA3HZ wrote:
without the forum members seeing it.
well, I am glad to see the message from DD5ET going so unprivately to AE0GL because I am also interested in the topic and reading about the enthusiasm or dismay of other group members is a welcome source of inspiration for my own doings! This is why we are in a Forum here, a place of friendly exchange and discussion and not in a private communicator ;-)

The only problem with "group dot io" is it's lack of structure and the primitive search function that helps barely. Yes, there are some tags that could be used, but has anybody tried them? This is why I make notes of any messages of interest, in order to follow them and become smarter. If they were private, I would remain dumb.

Jó napot kívánok!
73 de dl2arl


Mario Vano AE0GL
 

If you are happily using a tablet with wifi, the only changes needed are to enable the driver in the pi and figure out its IP address or network name.

Here's what I usually do:

Enable Ethernet over USB

With the memory mounted, append the line dtoverlay=dwc2 to config.txt and add modules-load=dwc2,g_ether to the kernel argument list in cmdline.txt:


Or to put it another way:

$ cd /Volumes/boot

$ echo 'dtoverlay=dwc2' >> config.txt

$ sed -i '' 's/quiet/quiet modules-load=dwc2,g_ether/' cmdline.txt

This does no harm if the driver is not loaded and is a nice routine add to your list of personalizations when making a new card.

There are three complications to the connection process.

1. Your USB cable must be of the correct "sex". For this to work, the Pad or device must see the Pi as a Peripheral. Normally Android devices connect as Peripherals which means they need to have a cable adapter or settings change to enable them to be USB Host devices. This is often called a USB to GO cable or adapter.

2. You need to use a real USB port for the connection on the Pi end. On most Pi's the regular USB sockets work fine, but there's some confusion over the role of the power socket on some models. The network connection will work on either socket on a pi mini. Unless you can power your pi mini from the host device over USB (usually not a good idea if the Host is phone or Pad) then you need to sort this out to make it work. It can be hard to do without a lot of extra junk.

On the other hand, you can plug a Pi mini via it's "power connector" directly into a Macintosh desktop or notebook "A" connector using any ordinary USB cable and it will immediately work properly (including getting power from the mac). This is also possible on Windows devices, but finding an RNDIS driver may be difficult. (Odd - since RNDIS is a Microsoft invention!)

3.  You need to figure out the IP addresses. The Pi is designed to use an automatic DNS system called "Bonjour" that is common on Apple. linux and some other devices will automatically set up an "ad hoc" network correctly for a single device when used like this. It is NOT supported directly by Android devices at all. Using this, the device will immediately show up as "whateveryourpihostnameis.local" and connections are immediately possible.

To connect to an android device, you will need to figure out the Pi's RNDIS IP address. Without a console device, this can be tricky. But once you figure it out, it will usually be the same every time after booting the pi if you only use the ONE RNDIS connection. You can also give the USB IP device a static address - but static addressing is beyond the scope of this post.

In any case - this will be the address you enter in VNC for the pi - either "hostname.local" if your pad supports it or the numeric IP address if it doesn't.

Android devices are difficult to talk about because there are many variations in older versions of settings and options. In most cases USB networking is enabled in the network settings under "other".


OTHER COMPLICATIONS:

The cabling situation is in flux on all devices right now. If your device (of any brand or flavor) uses usbc it's not always clear how to get the correct "role" enabled - but it's usually possible. In theory this will get much less confusing once USB-c is universal (not just via adapters and funny cables).

For older Apple Pads with lightning connectors, the role of the RNDIS is reversed and to get the correct function you need to use an apple "camera connection kit" dongle which is similar in purpose to the "USB to go" dongles for android devices.

Unless your Pi is powered via some other mechanism, it can be hard finding a way to power the Pi and  connect to the iPad easily. I believe this is much easier on iPads with Usb-c, but don't have one to play with.


This all works great, but can be frustrating to figure out due to the lack of documentation about the cabling and driver settings on some devices...

I'll be glad to help all I can, and perhaps others who are actually doing this can jump in here. Please avoid trying to offer help if you don't actually know how to do this. The DNS situation can quickly get into a tailspin if everyone starts giving their favorite advice from other network situations on other systems. Most DIY static DNS setups are incorrect if you don't understand modern networking...

hope this helps!

M

 


Mario Vano AE0GL
 

In case my last post scared people away, I wish to make clear that the setup is really very simple, but it is hard to explain all the possible variations needed for various host computers without confusing people.

If you want more detailed help on the subject it's very important to specify what model Pi you are using, what OS you want to use on it, exactly what your Host device model is and what kind of USB connection it has, and what OS it is using.

(Oh, and PLEASE stay on topic - avoid remarks about operating systems and hardware vendors - these threads usually degenerate into platform wars and just fizzle out!)

The setup process is usually very straightforward then!

thanks,

M


Mario Vano AE0GL
 

Here's a picture of one of my field FT8/4 setups using a Lenovo pad, QDX, AT100 antenna tuner (just used for the swr bridge), and a LiPo battery pack...

Sorry for the poor picture quality - bright sunlight is not a great spot to shoot tech photos!



M


ve3ega
 

So, if I understand this correctly, DD5ET post is all about 'Building-Blocks'?

So, let's simplify. All you need is

A Radio

A Computing Device / with Monitor / With WSJTX Software (or variant)

Power Source

An Antenna

VNC, NoMachine, Tailscale will all (or in combination) allow remote/headless communication, however, I cannot see the need for any of this when everything sits right next to each other on a 'Park-Bench'!

A USB Audio Dongle and 2 (Stereo) Cables for Mic and Speaker is all you need for the simplest VOX operation with most vintage Computers.

If your Radio/PC Support USB, its an even easier setup - You may need a micro to USB2 (and an OTG adaptor on your Tablet or PC) - but the concept is to simply connect the two and configure them to talk to each other!

WSJTX (and most variants) makes this very easy with pretty much 'any radio'.. 

There you have it - see you on your next activation!

73


Mark Phillips
 

If the RPi has Ethernet then why would you need all the other stuff? Alternatively you could set up a WiFi hotspot on the RPi and connect your tablet to that. 

VNC should be all you need here. 

On Thu, Mar 30, 2023, 07:51 ve3ega <ve3ega@...> wrote:
So, if I understand this correctly, DD5ET post is all about 'Building-Blocks'?

So, let's simplify. All you need is

A Radio

A Computing Device / with Monitor / With WSJTX Software (or variant)

Power Source

An Antenna

VNC, NoMachine, Tailscale will all (or in combination) allow remote/headless communication, however, I cannot see the need for any of this when everything sits right next to each other on a 'Park-Bench'!

A USB Audio Dongle and 2 (Stereo) Cables for Mic and Speaker is all you need for the simplest VOX operation with most vintage Computers.

If your Radio/PC Support USB, its an even easier setup - You may need a micro to USB2 (and an OTG adaptor on your Tablet or PC) - but the concept is to simply connect the two and configure them to talk to each other!

WSJTX (and most variants) makes this very easy with pretty much 'any radio'.. 

There you have it - see you on your next activation!

73


Mario Vano AE0GL
 

This is the third time a thread on this subject has been derailed here by people not really interested in doing things - only in telling people that what they want to do is stupid!

Once again, I'm leaving the discussion to the cynics. Do you guys ever DO anything or just talk?

If anyone needs help actually doing what the topic suggests. Please contact me directly via the email address on my QRZ page, or request membership in my own "radiohat" technical mailing list here on groups.io.

73

M