Keyboard keys not working on RPI platform

I just built from master branch and not sure if keyboard is working (doesn’t seem to be) but mouse definitely isn’t…

Did you test it on a Pi?

Yes, I did test on a RPI 3 this time. Only the keyboard though.

Just tested with the mouse attached. It is not only working on my side but it is hot-pluggable too.

Do I maybe need to install some evdev or udev libraries on the pi for it to work? I’m still getting neither working

Also, what operating system are you running on your Pi?

I am using Raspbian Jessie Lite. The prerequisite software packages are listed in https://urho3d.github.io/documentation/1.6/_building.html#Building_Prerequisites.

I never managed to get it working on 1.6 (tried doing everything ‘by the book’ following all instructions on build page), gave up and went back to 1.5 as still the input didn’t work. Since 1.7 came out with a bit in the changelog saying rpi stuff was fixed I thought I would give it a go again. With Raspbian Jesse I had the same problem - input didn’t work in the samples. With Raspbian Stretch (new) there is a more worrying problem. The GLES so on the pi files have been renamed (and changed i presume) to have ‘brcm’ in the name, i.e libbrcmGLES.so so I get ‘/usr/bin/ld: cannot find -lGLESv2’ type errors when trying to build urho. So optimistically I tried changing #define DEFAULT_EGL and following lines in Source/ThirdParty/SDL/src/video/SDL_egl.c to look for the brcm named files - it had no effect. Not really sure what to try next, would love to get 1.7 going!

Sorry to hear that. Maybe you could try to build a simple SDL app from elsewhere to see or to learn how to get it to work. Urho relies on SDL for its input subsystem.

I haven’t heard of the new Raspbian before. Wonder why they do that.

I found this as to why it might be:

"As the mesa arm side GL driver is going to become the standard in the future, we’d like to avoid confusion when linking with either the arm side driver (/usr/lib/arm-linux-gnueabihf) or the gpu driver (/opt/vc/lib).

As such applications built to use the gpu driver should now link with libbrcmEGL.so/libbrcmGLESv2.so rather than the ambiguous libEGL.so/libGLESv2.so libs." - https://www.raspberrypi.org/blog/raspbian-stretch/

Also, finally got it building (running rpi-update on Stretch pulled in old name GLES libs which fixed GL build/linking errors) and input working - it turns out all I needed was to add libibus-1.0-dev (labelled as optional in build instructions but I found it not to be optional for RPi with versions of urho3d 1.6+)

While most samples worked fine, 19_VehicleDemo caused a flashing screen (and nothing else) and the ragdoll sample had strangely all the left legs of the dummies stretching out to a point in the sky.

Thanks for the info. Will have a closer look on the Raspbian Stretch when I have extra time. I could be wrong but don’t think ibus package solved your keyboard issue. Probably it is what got installed together as part of the ibus package.

The GPU on the RPI is not as powerful as we want. The artifact you observed is a known limitation.

We have a new dev branch “upgrade-sdl-2.0.7” which has the attempted fix to get Urho3D/RPI port working for Raspbian Stretch. Can you give the branch a try and report back any issue. Thanks.

I have just come back to this. I can’t see that dev branch but I assume it was merged into master? I have found that with Urho3D 1.7 and Raspbian Jessie, key down works as it should but the text input stops working after modifiers are pressed (CTRL ALT SHIFT) and only way to get text input after that is to close and open the game. Any ideas where this issue might be coming from? Have you come across this?

Yes, it is in the master branch now. No, I haven’t noticed it on Jessie.

I’ve just built Urho3D from the master branch on a clean Stretch image and the input (mouse and keyboard) is not working

The last SDL upgrade for Raspbian Stretch is more about fixing the video support. I have not experienced any keyboard and mouse input problem whatsoever in my last test. I wish there is more I can help but in this case I have running out of idea. For what it’s worth, I usually use the lite version, boot in text mode and without any DE.

I’ll try a few things and report back

Let me tell you everything I ran on a clean, latest image of stretch lite, if you could reply with all your steps that get it working then hopefully we can get somewhere.
I did this:
sudo apt-get update
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install libibus-1.0-dev
sudo apt-get install libasound2-dev
git clone https://github.com/urho3d/Urho3D.git
cd Urho3D
./cmake_rpi.sh …/build
cd …/build
make -j4

I then launch samples and the input does not work

Immediately I can tell you one big difference. I cross-compiled to target RPI instead of building it natively on the device itself. I installed all the prerequisite packages as listed in the online documentation. You can get a hint of the list using this line.

Having said that, building natively on a device should work too provided all the prerequisite packages are installed. And probably I don’t have the time to repeat again all the steps that I have taken. Perhaps it is just me but I don’t think there is anything special about those steps. It is almost like how I set up another Linux VM from scratch.

1 Like

Once I install those additional libs things work! It’s a case of some ‘optional’ libraries (as listed on the building urho3d page) aren’t so optional I suppose.

Glad to hear that. If you can pinpoint exactly what is/are the non optional then we can update the doc accordingly.