Comments (10)
That usually happens when we build the module using kernel headers of a different version from the kernel being used. Have you built the module in the same system into which you are trying to load it? Have you updated the kernel?
from soft_uart.
Thanks for the reply @adrianomarto ,
Yes actually I got that and also upgraded the Linux kernel headers but the make file was still trying to find Linux-headers-4.4.50-v7+ so I downloaded them from web and installed it but its still giving me the same error.
And Yes I am using the same Raspberry PI Model 3 to built and load the module.(using the steps given by you on the https://github.com/adrianomarto/soft_uart )
from soft_uart.
Hello @adrianomarto can you please help me out for the solution. As I need this in my production.
Thanks,
from soft_uart.
Hi @ESLHemantSangle,
I would try the following:
- Type "uname -a" on the command prompt and take note of the indicated kernel version.
- Go the folder where you are building the module and type "make clean" and then "make". The printouts will indicate the kernel headers' version used to build the module. That must be exactly the same number as indicated in step 1.
If you find that the versions are different then you found the problem.
You can also try to load the module using "insmod ./soft_uart.ko" to make sure you are loading the module in the current folder instad of something in the search path.
You can also use the command modinfo to verify the module parameters.
If that does not help, please send the output of all those commands. That can help me to understand what is going on.
Cheers,
Adriano.
from soft_uart.
Hi @adrianomarto
I did as you suggested but still the error is same please find the output of steps given by you below
-
uname -a
command output
root@raspberrypi:/home/pi/soft_uart# uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
-
make clean
command output
root@raspberrypi:/home/pi/soft_uart# make clean
make -C /usr/src/linux-headers-4.4.50-v7+ M=/home/pi/soft_uart clean
make[1]: Entering directory '/usr/src/linux-headers-4.4.50-v7+'
CLEAN /home/pi/soft_uart/.tmp_versions
CLEAN /home/pi/soft_uart/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-4.4.50-v7+'
-
make
command output
root@raspberrypi:/home/pi/soft_uart# make
make -C /usr/src/linux-headers-4.4.50-v7+ M=/home/pi/soft_uart modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.50-v7+'
CC [M] /home/pi/soft_uart/module.o
CC [M] /home/pi/soft_uart/raspberry_soft_uart.o
CC [M] /home/pi/soft_uart/queue.o
LD [M] /home/pi/soft_uart/soft_uart.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/pi/soft_uart/soft_uart.mod.o
LD [M] /home/pi/soft_uart/soft_uart.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.50-v7+'
-
make install
command output
root@raspberrypi:/home/pi/soft_uart# make install
sudo install -m 644 -c soft_uart.ko /lib/modules/4.4.50-v7+
sudo depmod
-
insmod soft_uart.ko
command output
root@raspberrypi:/home/pi/soft_uart# insmod soft_uart.ko
insmod: ERROR: could not insert module soft_uart.ko: Invalid module format
-
insmod ./soft_uart.ko
command output
root@raspberrypi:/home/pi/soft_uart# insmod ./soft_uart.ko
insmod: ERROR: could not insert module ./soft_uart.ko: Invalid module format
-
modinfo soft_uart.ko
command output
root@raspberrypi:/home/pi/soft_uart# modinfo soft_uart.ko
filename: /home/pi/soft_uart/soft_uart.ko
version: 0.1
description: Software-UART for Raspberry Pi
author: Adriano Marto Reis
license: GPL
srcversion: 583A908CEF3BB3E6F1F7BE3
depends:
vermagic: 4.4.50-v7 SMP mod_unload modversions ARMv7
parm: gpio_tx:int
parm: gpio_rx:int
As the output of step 1,2 and 3 referring to same kernel version i.e. linux-headers-4.4.50-v7+
but still the module is not starting.
Thanks,
Hemant
from soft_uart.
Hi @ESLHemantSangle,
Have you noticed that the version indicated by modinfo is 4.4.50-v7 whilst your kernel is 4.4.50-v7+? I don't know exactly from where you downloaded the kernel headers, but it is not exactly the same version as the kernel you are using.
I would try to use the linux kernel and linux-headers from raspbian repository instead of downloading them from anywhere else.
Just some tips:
- The plus at the end of the version indicates that the source files have been modified.
- Do not use rpi-update. It created a mess in my system in the last time I tried to use it. Use apt-get instead.
Cheers,
Adriano.
from soft_uart.
Thank very much @adrianomarto with your help I have solved the issue of kernel and the soft_uart module is running now thank you so much for your code and time
from soft_uart.
I am glad that the problem is solved.
from soft_uart.
Hi @adrianomarto,
I am trying to connect GSM module as PPP modem to ttySOFT0 but the connection is failing. I tried steps given by you to test the SOFT UART and they are working but still the connection is failing. So is there any way I can test the SOFT UART using different steps if yes then please let me know.
Thanks,
Hemant
from soft_uart.
How can we load the driver for 2 devices such as SOFT0 and SOFT1 (and select the appropriated pins) ? As both will run on very low baud rate I believe we will not face any performance issue. Thanks
from soft_uart.
Related Issues (20)
- keeps hanging up and not responding
- Doesn't compile on Arch for Arm
- soft_uart Transmission ends marking OR spacing
- Cannot allocate memory HOT 3
- Not working on Orange Pi
- Linux headers not found HOT 1
- lunix headers not found HOT 1
- Readme
- Pi Zero data corruption on RX, can you add a RX Buffer?
- repeatable problem, when sending continous data with datasize greater than the TX-buffersize HOT 1
- Can you please support CTS and RTS?
- Is it possible to have several of these devices concurrently? HOT 1
- Can it work with Raspberry Pi 4 ? HOT 2
- BUG: scheduling while atomic: ksoftirqd/0/3/0x00010102
- Bit error when in AR9331 HOT 2
- Type in install instructions HOT 1
- Multiple instances HOT 6
- not working on fingerprint scanner
- Compile time error "invalid operands to binary / " HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soft_uart.