Raspberry pi 2 I2C0 doesnt' show any device - i2c

im trying to use the I2C-0 on RPI 2 but when i run i2cdetect -y 0 nothing appears .i pulled up the 27 and 28 pin to 3V3 using 4K7 resistors and no device detected. any ideas. thx in advance

Related

We are trying to use ov7251 camera in raspberry pi bullseye system but facing issues in opening camera

Facing issues in integrating camera in raspberry pi (ov7251)
Steps we have followed
sudo raspi-config
Turn on the i2c interface
legacy camera is disabled
reboot
config.txt change gpu_mem = 128
libcamera-hello
libEGL warning: DRI2: failed to authenticate
Made X/EGL preview window
[0:02:41.853640220] [1549] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3866-0c55e522
ERROR: *** no cameras available ***
If anyone knows smooth integration of camera interfacing for raspberrypi please reply

Interfacing after installation of driver module?

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.

CodeSys killing eth0 on Raspberry Pi 4?

I'm running into a very strange issue attempting to run CodeSys on a 4GB RasPi-4. Long story short, the Pi works fine right up until I start running the CodeSys project. When I do, within 60sec, eth0 goes down and cannot be brought back up. Even rebooting the Pi has no effect. The only way I've found to recover eth0 is to re-burn RasPiOS from the source image from Raspberrypi.org (which I've done about 30 times over the past few days, trying to trial-and-error my way out of this).
Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux
I have eth0 set to a static IP using /etc/dhcpcd.conf. Whatever is causing this issue is not altering my settings there. Attempts to use ifconfig eth0 up/down have no effect -- no errors, no feedback, just nothing. Checking eth0's state shows "waiting for carrier," despite being connected to an active switch (I've also swapped out all the cables and the switch to eliminate them as the source of the problem).
When I re-burn the Pi and install CodeSys, eth0 stays up indefinitely (24hrs+ in my longest test). It's starting the CodeSys project that kills eth0. A reboot after etho "dies" gives a series of bcmgenet messages that appear to be related:
pi#raspberrypi:~ $ dmesg | grep bcmg
[ 1.033665] bcmgenet fd580000.ethernet: failed to get enet clock
[ 1.033685] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[ 1.033709] bcmgenet fd580000.ethernet: failed to get enet-wol clock
[ 1.033730] bcmgenet fd580000.ethernet: failed to get enet-eee clock
[ 1.044648] libphy: bcmgenet MII bus: probed
[ 9.528502] bcmgenet fd580000.ethernet: configuring instance for external RGMII
[ 9.535175] bcmgenet fd580000.ethernet eth0: Link is Down
I also tried creating a new CodeSys project from scratch that had no eth0 drivers (ModBus, Ethernet/IP) installed, only the GPIO driver. That didn't help either -- eth0 dies within 60sec.
The strangest part is, only eth0 seems to be affected. The GPIO pins keep cycling as controlled by the CodeSys project (I have a simple LED-blinking program running), and I can still SSH into the Pi using wifi. But since my main reason for setting this Pi up is to use Ethernet/IP and ModBus....
This thread: at GitHub is the only place I've found anyone describing anything similar to what I'm experiencing, but in that case CodeSys is not installed. I did try adding genet.skip_umac_reset=n to my cmdline.txt as suggested in the thread, but it had no effect.
So, it turned out this was an issue configuring the GPIO pins.
CodeSys has two difference "device" files for adding the GPIO pins to the project device tree. The default selection is for older Pi models, and the alternate choice (labelled only for B+ and Pi2) is the correct one for the Pi4.
As it turns out, the outdated GPIO device file will work on a Pi4, mostly. But using the wrong device file allows CodeSys to try configuring GPIO pins that shouldn't be tampered with. In this case, GPIO 28 and 29. Setting either of them to Output mode killed eth0.
Using the correct device file removes 28&29 from the list of configurable GPIO pins. It also gives the correct list of available GPIO pins for the newer Pi models, hopefully avoiding other potential config issues that I didn't trip over.
In CodeSys, right-clicking on the GPIOs element in the device tree offers the option to "Update the Device." Select this option to get the list of available device files, and select the correct one before using the "Update Device" button in the bottom of the window.

How to turn USB port power on and off in Raspberry PI 4

On a Raspberry PI 3B+, it's simple to turn power on its four USB ports off and on. Simply write a "0" to /sys/devices/platform/soc/3f980000.usb/buspower to turn power off and a "1" to turn power on.
The same method doesn't work on Raspberry PI 4B, 4GB (the hex number before ".usb" is different, that's NOT the problem). I have tried uhubctl and hub-ctl as well without any success. I have used a USB power meter to measure the voltage on the ports. It doesn't change. Un a PI 3B+ it changes as expected.
Does the PI 4 support turning USB power off and on in software at all? If it does, how to do it? Or is there a bug somewhere that has to be fixed to make it work? I use the newest Rapbian on both the Pi 3B+ and the Pi 4.
Yes, uhubctl supports RPi4B, I have recently added support for it - you need to use uhubctl version 2.4.0 or later (or build it from master branch). It is also necessary to update USB firmware using sudo rpi-eeprom-update to make power switching actually work.
Note that you are missing out by using sysfs method to turn USB off on RPi3B+ - using uhubctl you can control either all 4 ports, or 2 of them independently. RPi4B only supports turning off all ports at once.
As far as I read Raspberry Pi and Linux issues on GitHub, it seems that there was a bugfix released for uhubctl on 2019 July. Patch I'm refering to: mvp/uhubctl#4aae44c. It should be merged to master. So...
Another thing to have in mind, it seems that RRi 4B hardware only supports "ganged power switching", which means... that You can only turn on and off ALL the USB ports. Not every single one in particular.
To shut off power for USB ports and Ethernet type the following into the Raspberry Pi Terminal and press enter:
echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/unbind
For that you need to install:
sudo apt-get install uhubctl
For turn on again use this command:
echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/bind

how to get beaglebone black wifi with buildroot

I am trying to build beaglebone black wifi with buildroot but it seems that there are several configuration , for u-boot and kernel.
What is the right def config , am335-evm or omap3-beagle for BBB wireless?
What is the right kernel and def config for BBB wireless?
U-boot should be the target image format u-boot.bin or u-boot.img?
Does anyone has a git repo of a working beaglebone black ( wireless or not) working?
What are the minimum uEnv.txt settings to get u-boot start working?
Thanks!
You can use beaglebone_defconfig configuration file:
make beaglebone_defconfig
It enables support for multiple am335x boards like BBB, am335x-evm etc. This BR configuration provides U-Boot and U-Boot's internal scripts would read the board ID and load corresponding device tree blob. At the end of the build process you'll get a SD card image, that you can directly burn onto your SD card.
The only things missing are WiLink firmware and wpa_supplicant. Just select following packages in BR's menuconfig:
BR2_PACKAGE_WILINK_BT_FIRMWARE
BR2_PACKAGE_WPA_SUPPLICANT
Ok, so it does work, but i was waited to see on the HDMI the login.
After I connected UART using this post:
https://codechief.wordpress.com/2013/11/11/beaglebone-black-serial-debug-connection/ ( but i did replace tx and rx)
Pressed the S2 button i do see the linux prompt.