Interfacing after installation of driver module? - raspberry-pi

I installed this module and have the corresponding RaspberryPi HAT(Waveshare Rpi 35A) attached to my Raspberry Pi.
After running modprobe ili9486 in the terminal:
In /sys/module, I see the device.
In /dev/ and /dev/spi/, I don't see anything with ili9486 in it's name.
How do I send a command to the device?
In specific how do I send the command to ili9486_probe, which will in turn, send the command to waveshare_command? My goal is to get the command to reach waveshare_command?
I didn't install the dtoverlay on the Waveshare github because I do not want touch screen features. I just want to write to the screen.

Related

Buildroot ir remote using ir-keytable or lirc

I created an image for raspberry pi zero 2 w using buildroot,
Also added overlay gpio-ir in config.txt but not able to receive ir signal.
No logs are printed for gpio in dmesg.
No devices are showing in /proc/bus/input/devices
Can anyone help?
I found solution my self.
Actually buildroot is not start gpio-ir-recv module at boot time.
So we need to load module manually at boot time.
We can load module by this command
modprobe gpio-ir-recv
So i have created one service to load module in /etc/init.d

Reading heart-rate data from a Polarbelt with a Raspberry pi

I am trying to retrieive heart-rate date from a polar belt to use as part of emotion recognition algorithm. I am using a Raspberry pi 3b with raspbian. I am able to connect to the device with bluetoothctl When I open info I get a list of the UUID´s
Here is where it stops. I have tried to use hcitool according to the example below, but that does not work. When I try to connect I get the message: Connection Refused(111)
$ sudo gatttool -i hci1 -b 00:22:D0:33:1E:0F -I
[ ][00:22:D0:33:1E:0F][LE]> connect
[CON][00:22:D0:33:1E:0F][LE]>
So I tried to use bleak and pygatt and I´m not able to make this work. I am quite a newbee, so I am probably doing something wrong. But now I have run out of ideas. Any suggestions will be appreciated.
hciattach, hciconfig, hcitool, hcidump, rfcomm, sdptool, ciptool, and gatttool were deprecated by the BlueZ project in 2017. If you are following a tutorial that uses them, there is a chance that it might be out of date.
For testing it is best to use the bluetoothctl tool.
You say that you have successfully connected and get a list of UUIDs. Was 00002A37-0000-1000-8000-00805F9B34FB one of them?
If it is then select that inside bluetoothctl e.g.
gatt.select-attribute 00002a37-0000-1000-8000-00805f9b34fb
If that is succussful then you should be able to read the value with:
gatt.read
Or to test notifications:
gatt.notify on
This should start data being displayed from the belt.
gatt.notify off will stop the data being sent.
If you have this working with bluetoothctl then reproducing it with Python should be done with confidence that the RPi and belt are able to connect successfully.
There is an example of building a BLE client with Python at:
https://stackoverflow.com/a/63751113/7721752
I noticed in your gatttool example you are using hci1 rather than the more typical value of hci0. This is normally the case if you have added a USB BLE dongle. I the above example you would have to change ADAPTER_PATH = '/org/bluez/hci0' to end with hci1.
There is also the example with Bleak at:
https://stackoverflow.com/a/72541361/7721752
For bleak to select an alternative adapter would add the adapter address to the BleakClient e.g.:
async with BleakClient(address, adapter="yy:yy:yy:yy:yy:yy") as client:

Is there a library for MSR605X that works with Raspberry Pi?

I have been trying to locate a working library for the MSR605X magnetic card reader/writer. At time of writing, I have tried five separate libraries. Only two of these were explicitly for the 605X the other three were for the older 605. All the libraries I have tried either did nothing at all or errored before completing a command (can't figure out the errors either).
I am running Raspberry Pi OS 32 bit on a Raspberry Pi 3 B+ the MSR605X communicates via a USB connection.
So far the library that seems to be most complete is: https://pypi.org/project/msrx/
However, I can not get this library to read or write (either nothing happens or I get a Serial exception "cannot reconfig port).
Any help or links to documentation for this reader is welcome.
EDIT: Adding the commands ran with the above library
msrx -D /dev/input/event4 read
msrx -D /dev/input/jso0 read
The -D is to specify the device path (default is /dev/ttyUSB0 which doesn't exist on my system). I obtained the above two paths by searching for USB serial devices then matching the search result to the device ID which I obtained from lsusb.
Running these commands results in a serial exception (could not reconfig port) which I assume means that I have the wrong device path. I have also checked for any tty* device paths that are changed when I plug in the reader. I consistently get a permission denied error whenever trying to run the above commands with a tty* device path (I am root on this system).
msrx author here — MSR605 requires an external 9V power injected into its cable (via the barrel jack port), otherwise it won't power up properly.

Can I automatically run a program in raspberry pi when it is turned on?

Hi I made some programs that are to be run in a raspberry pi.
The programs are mainly about controlling GPIO pins and analyzing USB camera Videos.
But do I have to manually run those programs all the time?
Is there any way to make the program run after starting os automatically?
Just like an arduino... it remembers what has been uploaded in its memory
Edit your crontab with crontab -e and add:
#reboot yourscript
Be careful about the environment variables PATH because cron could be lauched before some of your services (distibutions start up dependant).

UV4L WebRTC demo seemingly not working, how to fix?

There is a demo which comes with UV4L demo OS for Raspberry PI, https://raspberry:8080/stream/webrtc. When i run it on a macOS computer (Firefox browser), and select that a screen is to be shared, it always says 'no suitable video device found!' and apparently doesn't connect anywhere. Same happens when i go there on a Chromium browser on a Raspberry PI itself. There doesn't seem to be any error messages anywhere - some deprecation warnings but no more than that:
onopen() webrtc:197:25
navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia webrtc:251:32
WebRTC interfaces with the “moz” prefix (mozRTCPeerConnection, mozRTCSessionDescription, mozRTCIceCandidate) have been deprecated. webrtc:105:25
{"iceServers":[{"urls":["stun:stun.l.google.com:19302","stun:192.168.0.101:3478"]}]} webrtc:104:21
onaddstream is deprecated! Use peerConnection.ontrack instead. webrtc:107
peer connection successfully created! webrtc:110:21
URL.createObjectURL(MediaStream) is deprecated and will be removed soon. webrtc:255:60
call(), request={"what":"call","options":{"force_hw_vcodec":false,"vformat":"60"}} webrtc:193:25
message =message webrtc:281:25
Where shall i look into?
Clarification: i can see my desktop in a 'local' box, so sharing has been successful, same on Raspberry PI. But it never goes to the other side, i can't even use the data channel - it is greyed out - so apparently no connection happens, at all.
The following command runs an instance of UV4L that allows to mirror your desktop or window to the Raspberry Pi HDMI display. Note that you must pass the SSL certificates .key and .crt (see the UV4L installation instructions to know how to generate them):
uv4l --enable-server --driver dummy --server-option '--use-ssl=yes' --server-option '--ssl-private-key-file=/home/pi/selfsign.key' --server-option '--ssl-certificate-file=/home/pi/selfsign.crt' --verbosity=7 --server-option '--enable-webrtc-video=no' --server-option '--enable-webrtc-audio=no' --server-option '--webrtc-receive-video=yes' --server-option '--webrtc-renderer-fullscreen=yes' --server-option=--webrtc-renderer-window=0 0 1920 1080 --server-option '--webrtc-receive-datachannels=yes' --server-option '--webrtc-receive-audio=yes' --auto-video_nr --server-option '--webrtc-receive-audio=yes --server-option '--port=9000'
You can then access the WebRTC streaming page at:
https://raspberry:9000/stream/webrtc
You must explicitly enable screen sharing in firefox or chrome according to the instructions written in the the same page.
I would check if the camera module on the pi itself is attached correctly. Did you try to capture a test image using something likeraspistill -o test.jpg yet? I've seen the 'No Suitable devices found' problem come up when I either didn't enable the camera on raspi-config or I didn't insert the camera's ribbon cable correctly. You can also check if you've connected the GPIO corresponding pins right.