BrickPi: VNC Viewer and Bandwidth issues

Ok, so I have a class of 20 students, and there is an issue with the amount of bandwidth a whole class of 20 Rpis with connected Laptops uses on the Vlan router.

I think the issue maybe VNC. I currently have installed Vnc server, but the Rpis already have NoVNC pre-installed by Dexter and is broadcasting.

I think when VNC Server is also running, the upload bandwidth of the RPI is enormous especially if using a high resolution.

I find I can only get 6 students connected before I start getting issues with the Network and students are disconnected. Is there a way to uninstalled the Dexter noVNC and stop it running on start up?

cheers,
Brad

1 Like

Can you provide more details about how this is set up?

Why are you doing both the VNC server and the VNC that the robots provide?

To be honest, I probably shouldn’t have but vnc viewer seemed faster and I didn’t know about the vnc the robots had until much later. I have been using the Brickpis for a few years now before they had novnc installed.

But now that I have flashed sd cards for each student, I need a simple solution.

2 Likes

Exactly what have you done and exactly how did you do it?

The way Dexter OS is designed, it is designed to be “bulletproof” meaning that it cannot be modified easily - making it “student-proof”.

I really doubt that you will be able to do that as there is really no super-user access.

I tried to do things like that in the past with my GoPiGo robot with no real success.

As I see it, you have two “easy” options:

  1. Remove the VNC server and use the systems as designed.

  2. Download and use Raspbian for Robots, which contains it’s own browser based VNC client and is much more configurable, but doesn’t have things like Bloxter.

Take it from me, trying to make fundamental changes to Dexter OS will cause more problems than it will solve.  I’ve been there, I’ve tried it, and it was a 100% balls-up - and I’m not a newbie to Linux configuration either.

1 Like

Official support for teachers is now via email to support@modrobotics.com

1 Like

Can you be a bit more specific about what you flashed onto those cards?

It sounds like perhaps you installed one of the several old versions of Raspbian For Robots. Which one? What do these commands spit out?

uname -a
cat ~/Dexter/Version

When you type:

systemctl status novnc

Do you see:

$ systemctl status novnc
â—Ź novnc.service - Remote desktop service (noVNC)
   Loaded: loaded (/etc/systemd/system/novnc.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2022-01-05 09:52:23 EST; 1 months 23 days ago
 Main PID: 479 (bash)
    Tasks: 2 (limit: 1939)
   CGroup: /system.slice/novnc.service
           ├─479 bash /usr/share/novnc/utils/launch.sh --vnc localhost:5900 --listen 8001
           └─546 /usr/bin/python2.7 /usr/bin/websockify --web /usr/share/novnc/utils/../ 8001 localhost:5900

CAUTION - USE THE FOLLOWING INFO AT YOUR OWN RISK - BACKUP YOUR SYSTEM FIRST!

You can turn it off temporarily with:

sudo systemctl stop novnc

and start it again with:

sudo systemctl start novnc

and make it not start at boot time with:

sudo systemctl disable novnc

(disabling does not stop it in the current session)

1 Like

Thanks cyclicalobsessive,

that was super useful, and alot of my students are very thankful.

2 Likes

Great to hear that worked for you. Thanks.

Something to think about:

Perhaps during summer break, you could explore changing from “on the robot” software development, to “remote software development” using Visual Studio Code. The bandwidth usage should be much lower, and it would expose the students to the software community’s most used software IDE (Integrated Development Environment).

As an aside - While I have tremendous respect for the developers I worked with at Microsoft in Redmond, Oregon, back in the 1990’s, I have a fair amount of skepticism about the Microsoft ecosystem. Only just this week I decided to try VScode for remote development with my GoPiGo3 robot. I was surprised at how easily VSCode installed on my Mac desktop (10 minutes) and how easy it was to connect to my RaspberryPi 3B+ based robot (about 3 minutes the first time).

This gives me a context sensitive visual editor for files located on the robot, terminal windows to run commands and programs on the robot, (and even a remote debug capability which allows breakpoints, variable value inspection, and line by line execution if desired).

My main interest in VSCode was the context sensitive editor since my debugging has usually been via print or logging statements. The single context sensitive editor pane alleviates needing several github windows to remind me what class methods are available and what the optional parameters are for each method, as well as class constants for the robot and for the sensors.

Just a thought if you find further reduction in bandwidth usage is needed.

1 Like

Thanks for the feedback!

Allow me to absolutely endorse what @cyclicalobsessive has said about using VS Code for remote development.

I would recommend this, quite highly, for the student that is a bit more advanced as opposed to the raw beginner.  (Beginning students can do much with Thonny and get a lot of coding experience in a friendlier IDE-like environment before jumping to “the real thing”.)

The big downside to VS Code, (and why I don’t recommend it for beginners), is its versatility and power.  In essence, it’s a two-edged sword that, in the hands of a more advanced class of students, provides a real-world environment that is like what they would see in “the real world” - in some cases exactly like - as many professionals and companies use VS Code.

With a more advanced class, you can also explore the concepts of source-control, Git, GitHub, and the ins-and-outs of versioning - as this is handled in a very seamless way by VS Code - as if the version control were “built-in” - which it is, in a sense.

If I were going to explore robotics with a group of interested students - assuming no prior programming experience - I would do it something like this:

  1. Introduction to Robotics and Programming:
    • Bloxter - a “scratch” like programming language where pieces fit together to make programs.
    • Elementary robot functional blocks that allow the students to program robot actions.
    • It is important to note that though “simplistic”, Bloxter can be used to make rather sophisticated programs.  I often use it as a “sandbox” environment to “try things out” before committing them to “hard-coded Python”
       
  2. Intermediate Robotics and Programming in Python.
    • Thonny:  Introduction to an “IDE-like” programming environment that allows debugging, tracing, variable inspection, and other more advanced techniques in a simple editor.
    • Introduction to Python and a finer-grained control over the robot using the EasyGoPiGo libraries.
       
  3. Advanced Programming in Python and Advanced Robotics.
    • This is where I would introduce the Visual Studio Code editor.
    • Advanced programming techniques.
    • Advanced program management techniques.
    • Remote programming where the “heavy lifting” is done on the local workstation instead of the robot.
    • Introduction to versioning and version control.  (Git/GitHub)
    • Introduction to collaborative projects where groups can work together on the same code base and then merge their commits.

With these tools, you have the foundation for a first-class series of programming and technology courses that will equip the interested student to tackle more advanced topics later on - in college or in “the real world”.

I mention this particularly because we’ve seen a number of college students who have been “thrown to the wolves” with advanced robotics projects that they were ill equipped to handle.  Given this kind of background your students will be equipped to handle whatever life, (or a sadistic college professor), decides to throw at them.

1 Like

Thanks for all your suggestions.

It’s interesting because at the moment I do use VSCode with students. We introduce it in year 8 (13 years) and then they use it until year 12 (18 years). It is heavy going but I figure it would be harder for students to swap and change IDEs all the time. Everytime we use a different IDE - I feel like it takes two or three lessons in using it. But point taken, Thonny is easier.

We are currently using VSCode with the SSH plugin. Curiously, it seems to create muiltple processes e.g. 12 and use a lot of memory. Also if the robot disconnects suddenly from the WIFI which has been our problem, in some cases I need to delete and reinstall the VSCode extension on the Raspberry Pi.

I still have VNC enabled on the Raspberry Pis because I need to students to be able configure settings, or modify a database file. It’s a fail safe of sorts.

regards,
Brad

1 Like