modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/5.10.92-v7+ - raspberry-pi3

I am trying to Configure Lirc for my Rpi 3b+ for a personal project. I am using this guide. When running sudo modprobe lirc_rpiI get the error of modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/5.10.92-v7+ Can anyone help me solve this?

That LIRC should not work on Rpi is a misunderstanding. LIRC works on all linux systems, RPi included, but certainly not on Arduino (Arduino don't run Linux).
The basic problem is that the guide you refer to is severely outdated. In particular, the hardware.conf file is not used on modern LIRC installations.
As for the possible need for a lirc_rpi kernel moduled this depends on the actual use case. In most cases, LIRC uses either the serial ports or the lirc0 device, neither of which needing any specific kernel module.
The complete upstream docs are available at https://www.lirc.org/html/configuration-guide.html. It might be possible to give some more feedback if you describe your use case in more detail.

Lirc is not meant to work on raspberry pi, only other computers. You should use something else like an ardino. Good luck

Related

setting up a development environment for Linux device driver

I am trying to read the LDD book by Jonathan Corbet, Greg Kroah-Hartman, Alessandro Rubini and implement the sample modules. So to begin with, I tried setting up a development system. Installed Ubuntu 16.04 Xenial. Now, I just created a directory and wrote the hello_world module with a Makefile. Got it built and run it, verified the dmesg logs.
Is that all the development setup? I searched online and found articles where they are asking to download and compile the kernel, use a VM to boot the kernel. What is the reason? Or what am I missing?
Is there any better article which clarifies this?
Thanks
hago
You can try one more way:
If you have native windows, install virtual machine software such as
Virtual box. Get your favourite Linux distribution (no bias, just
an example - Ubuntu) and install it through Virtual box.
Get the latest kernel (or of your choice) from kernel.org.
Choose the platform you want to build this kernel for. E.g arm64 or x86.
In case you do not have real boards (e.g RPi for arm variant), you can use qemu-arm64 or qemu-x86 to run your compiled kernel. This is also a good option when users do not have the boards.
Another good use case for using qemu for the newbie kernel developers is even they write some modules which crashes, then the qemu instance is crashed so no harm.
I think using qemu is a good option for people who starts to learn kernel programming and also want to try writing some of their modules and do not intend to purchase hardware at this point of time.
It depends on your target. For your case, you have made a kernel driver for your computer (it run Linux kernel).
But if you want to develop a Kernel driver for another target like Rasberry Pi, ARM board, X86-X64 board, ... you must learn to compile, edit Kernel config, boot Kernel image, ... because each target has different kernel versions.
You can refer to this training for more detail: https://bootlin.com/training/embedded-linux/

Headless setup of NixOS on raspberry pi3

Having followed Zupo's execellent post which was mentioned in a NixOs Weekly, I wondered if it might be possible to setup a rasberry pi3 without the need for a monitor and use wifi rather than an ethernet cable.
There are all ready several blogs that set up raspbian headlessly by the addition of an ssh file in the boot directory and wpa_supplicant.conf in the /etc/wpa_supplicant directory, but I am unsure how to achieve this in the NixOS way.
Any help appreciated.

NodeMCU version unknown

I'm new with NodeMCU firmware use. I have a Amica ESP-12E (v2?) dev kit connected to a DHT22 which I program using the Arduino IDE. All is setup and working fine.
My problem came when I wanted to update NodeMCU firmware. Since I don't really know what came pre installed from China, I downloaded ESPlorer to try to determine NodeMCU version. I get the following "error" when I reset the dev board:
Communication with MCU..Got answer! Communication with MCU established.
AutoDetect firmware...
Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
{{a long string of weird characters that I can't copy and paste appear here}}
At this point I'm totally clueless about what version of firmware I have. Is there a way to obtain NodeMCU firmware version by software via Arduino IDE code, ESPlorer GUI or something similar?
On the other hand, is there a really easy way to compile/download latest NodeMCU firmware BIN file? Even one with all the modules active will be fine for me now, I'm just trying to understand and test things.
You seem to be confusing two very different platforms. I leave out some details as not to confuse you any further.
Arduino: you use Arduino programming in the Arduino IDE then build and install a binary to your device whenever the application changes. No NodeMCU firmware needed!
NodeMCU: you flash the NodeMCU firmware once (e.g. using esptool.py) and then upload Lua code (e.g. using ESPlorer) whenever the application changes. This is more lightweight than the Arduino platform.
On the other hand, is there a really easy way to compile/download
latest NodeMCU firmware BIN file?
Yes, have a look at the NodeMCU documentation at http://nodemcu.readthedocs.io/en/latest/en/build/. The easiest is to use the cloud builder at https://nodemcu-build.com/. I currently suggest to build from the dev branch because flashing is easier with it.
As pointed out you have several options for firmware and you'll need to make a choice as to which suits you going forward. If you are going to stick with the Nodemcu LUA firmware you can determine the version by typing:
print(node.info())
at the command line prompt.
There are alternatives to using ESPlorer e.g. Putty or Coolterm that will give you the raw output from the device with no interpretation. So if you have the correct serial port settings and the device plugged into the USB port it will show the banner when you reset giving an indication of the origin and version of the installed firmware.
In ESPlorer, there is an option under settings which if unchecked will stop looking checking for the version of the code.
For whatever reason, ESPlorer is not designed to read nodemcu version.
The error message throws you off, could lead you to think, there is an error.
At best, the above error can be ignored. It has no impact at all. In background, init.lua is up and running.

RFCOMM Bluetooth in ruby (linux)

I am trying to find a gem/library that has RFCOMM and other bluetooth access on linux through bluez or other means. I am trying to port a python server that interacts with a piece of hardware (https://code.google.com/p/adqmisc/source/browse/#svn%2Ftrunk%2Fliveview) although I can not seem to find any decent bluetooth support for ruby.
I found this: https://github.com/cfiorini/rbluez although it is not in the gem repository so I don't know how to install it. It seems to have basic RFCOMM support and HCI support which seems to be all I need in order to port the project.
So is there any good ruby gems that wrap around RFCOMM/HCI to allow access to a bluetooth adapter on linux?
Thank you.
How would I go about installing that rbluez library which is not in the gems repository?
Or is it possible to initiate a bluetooth socket as you can in C with AF_BLUETOOTH? If so would this done with a client/server example.
You can easily use the rbluez code by creating your own gem. That's easy but it may take you one or a couple of days to get used to it.
Follow the steps described here to create the gem and replace the appropriate files with the ones supplied by rbluez's repository (i.e. extconf.rb and rbluez.c).
I don't guarantee rbluez will compile on your system (you'll have to check dependencies, if any) but I can assure the process described by the steps I linked above work to successfully create your gem.

Linux kernel on virtual machine

I am studying Linux driver programming and in it, it is recommended that I work on self-compiled Linux kernels and not any distributions. I have tried compiling Linux 2.6.9 in ubuntu but the process returns errors in 'make menuconfig' stage.
I would prefer to work with Linux in a virtual environment so that I can fearlessly experiment with the kernel. So, is there any way I can compile and run Linux in a virtual machine (say VMware installed on Windows)? I can use live CDs for the purpose of compiling the kernel.
So in short, please suggest, how can I compile, install and run Linux kernel in a virtual machine in an error-free way?
I searched and read this. But after following these steps when I restarted my computer there was no separate Linux 3.2.17 OS. But my ubuntu 12.04 was now showing 3.2.17 kernel. Although this is the first time I could compile a whole kernel on ubuntu without any error, I want to load that kernel on other partition and use it as an independent OS. So, if anyone can tell, what to do in addition to the steps in the tutorial so that I can achieve this?
The simplest thing to do is probably to install some Linux distribution on a VM, such as VMWare or VirtualBox, and continue from there. You could try using a live-cd, but I'm guessing that the lack of persistent storage might get irritating. There are, of course, ways around that, but installing some distribution is probably simpler, and you don't really need that much disk space for it if all you want to do is compile a kernel.
If all you want to do is compile a kernel module, and if you already have some pre-installed Linux environment, you should also note that modern Linux installations allow you to compile modules without the need to re-compile the entire kernel. You will need the kernel source and headers, though. See, for example, this document.
And BTW, speaking of modern kernels, why did you choose to use 2.6.9? It's almost 8 years old by now. Newer kernels might actually be easier to develop for. Also, there's no guarantee that
modules developed with such an old kernel would still work with current ones.
I suggest you to read this page. This document shows you how to boot your personal kernel on qemu and how to use the debugger on it.
Kernelnewbies is the right place to start kernel hacking. This website contains a set of rich tutorials about kernel hacking and tweaking just for newbie Linux developers. Also, you can join the community and start contributing to some tiny Linux projects.
For a quick start, follow the instruction from the "kernel first patch" tutorial. Since you're cloning the "origin" remote repository in this tutorial, you'll work on the latest branches of Linux kernel. So, there's no need to worry about working on an old version of Linux. Meanwhile, if you're not comfortable working with git trees, you can always download the latest version of Linux from front page of "kernel.org".

Resources