Open ilker-aktuna opened 4 months ago
I'd first focus on physical aspects - try different ports, cables, check if the same cable and UPS that work on one RPi misbehave on the other. Maybe even switch SD cards and boot with the "successful" OS on the misbehaving one. It may be possible that it is just broken (some soldering went loose, GPIO overlap, firmware wrong, etc.)
We had a fair amount of reports of issues with Raspberries and allegedly RPi3 and RPi5 had problems with USB, RPi4 was better. But I still can't say if that says more about popularity of the platform (so we see many reports with them due to frequent use, reporter's bias) or really about its quality.
thanks. As I wrote , I have already tried diffrent cables. I also tried all ports. There is no physical issue on the PI. Other USB devices work fine. Also other UPS is recognized well.
" switch SD cards and boot with the "successful" OS on the misbehaving one" --> that's something I did not try. I will try and report back.
is there a USB OTG driver that I should update on the Raspbian ?
Can't really say, don't have much experience with Raspberries. I know some HATs require pre-loaded files (DTB, kernel settings args, or whatnot) to function.
what else can I check ?
Looking more at your original post, I see that both devices claim to be Raspberry Pi 3B (or so you say), but have different USB Hub identifiers. Probably different board revisions and maybe variation due to that. Also the not-working one seems to have an Ethernet adapter on the USB bus - is that the built-in port or a separate dongle (can you try seeing the UPS with this port unplugged then)?
One more thought is about USB subsystem perhaps not having enough electrical power to establish a stable connection (e.g. the Ethernet port eats some away?) Can you try feeding this RPi from a more powerful source, to confirm or rule out this possibility?
I just had time to try different combinations. First, I tried with 2 other USB power adapters. Both of them are able to provide up to 45W but the result did not change. RPI3B with Raspbian Buster can not detect what's plugged on USB.
Then as you asked, I checked the board revisions. The working setup's PI is: Raspberry Pi 3 Model B Plus Rev 1.3 Not working setup has: Raspberry Pi 3 Model B Rev 1.2
So they are both RPI3B but one is B+
Also the not-working one seems to have an Ethernet adapter on the USB bus - is that the built-in port or a separate dongle (can you try seeing the UPS with this port unplugged then)?
there is nothing else on the external USB ports of the PI. I assume the ethernet adapter is an internal connection from USB hub.
I tried the working OS SD card on the not-working PI as you suggested. It works ! So the working setup's SD card is successful on the not working RPI.
In conclusion, the problem is not about HW but the OS , kernel or drivers. I have to focus on the software. But what can I try ? I can't upgrade the buster to bullseye. Maybe a kernel upgrade ? Is there a possibility of smooth kernel upgrade on the OS ? Or can I install a kernel module (driver) to support this ?
If I use the working SD on the not working PI, I see the device detection on dmesg output as:
[ 51.642375] usb 1-1.4: USB disconnect, device number 4
[ 70.556968] usb 1-1.4: new low-speed USB device number 5 using dwc_otg
[ 70.671196] usb 1-1.4: New USB device found, idVendor=0001, idProduct=0000, bcdDevice= 1.00
[ 70.671247] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 70.671272] usb 1-1.4: Product: MEC0003
[ 70.671294] usb 1-1.4: Manufacturer: MEC
[ 70.800486] hid-generic 0003:0001:0000.0002: hiddev96,hidraw0: USB HID v1.00 Device [MEC MEC0003] on usb-3f980000.usb-1.4/input0
That's more of an OS question. I gather apt dist-upgrade
is an option to try; you may have to set /etc/apt...
sources to archived package repo URLs, if the distribution is no longer served as active.
If you have spare SD cards, you might want to dd
a clone of the older system in case you would need to roll back.
"apt dist-upgrade" didn't change the release. It updated all packages including kernel kernel came to 5.10.103 from 5.10.63 release is still buster
another "dist-upgrade" does not do anything. is there a way to upgrade to bullseye ?
ok, now following :
1. update all the packages on your current version. apt dist-upgrade
2. edit /etc/apt/souces.list Don't delete any lines just copy them all and chage buster to bullseye save the file.
3. run apt update make sure there are no missing repos or mistyped lines. It should offer you 1000+ packages to upgrade and a few hundred to remove. Check your applications do not need to rely on things like that.
4. Once you are happy with the changes run apt upgrade and wait for everything to upgrade. A newer kernel will be installed so once it is all done, and assuming there are no errors, attempt a reboot and see if it all comes up again.
5. Assuming it all works. Once you are happy it is working as expected, you can run apt autoremove to remove any unnecessary packages. Over time all your updates will come from bullseye and when that happens you can comment out or remove the lines in /etc/apt/sources.list with buster in them
let's see...
with that method I get this error:
1442 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repos.influxdata.com/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
W: Failed to fetch https://repos.influxdata.com/debian/dists/buster/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E
W: Some index files failed to download. They have been ignored, or old ones used instead.
I think I can solve the signature issue and try upgrade again. But in any case, changing the kernel (5.10.63 to 5.10.103) did not solve the problem. So ;
I believe, I need a better USB driver but I know nothing about drivers on linux. I'd appreciate if anyone could jump in and guide me about this USB driver. maybe just change the USB hub driver ???
note: I also tried the OS (buster) from not-working PI setup to the working PI setup (PI3 B+ rev.1.3) It did not work. So this is definitely not PI hardware related and most probably because of something missing in "raspian buster" my best guess is the USB hub driver.
UPDATE: I've successfully updated kernel to 6.6 It was easy with the "rpi-update" command
But the USB device is still not detected:
root@raspbx:~#
uname -a
Linux raspbx 6.6.42-v7+ #1787 SMP Thu Jul 25 17:42:40 BST 2024 armv7l GNU/Linux
root@raspbx:~# lsusb
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@raspbx:~#
root@raspbx:~# dmesg | grep usb
[ 62.823249] usb 1-1.4: new low-speed USB device number 4 using dwc_otg
[ 63.363184] usb 1-1.4: new low-speed USB device number 5 using dwc_otg
[ 63.823396] usb 1-1-port4: attempt power cycle
[ 64.483159] usb 1-1.4: new low-speed USB device number 6 using dwc_otg
[ 65.033209] usb 1-1.4: new low-speed USB device number 7 using dwc_otg
isn't that interesting / weird ?
If I put the bullseye SD card to the same RPI 3B, it can detect the USB device. But when I upgrade my old buster to bullseye , and then even update the kernel, it can not detect the same USB device.
this seems like a missing or old usb device driver (kernel mod) to me. Any ideas ?
Weird indeed. Try to compare lsmod
outputs from the two boot-up cards?
well, I could not find anything about usb in lsmod output.
this is the working one:
root@proxy:~# lsmod
Module Size Used by
xt_conntrack 16384 1
rfcomm 53248 4
nft_chain_nat 16384 3
xt_MASQUERADE 16384 1
nf_nat 49152 2 nft_chain_nat,xt_MASQUERADE
nf_conntrack_netlink 49152 0
nf_conntrack 147456 4 xt_conntrack,nf_nat,nf_conntrack_netlink,xt_MASQUERADE
nf_defrag_ipv6 20480 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
xfrm_user 49152 1
xfrm_algo 20480 1 xfrm_user
xt_addrtype 16384 2
nft_compat 20480 4
nf_tables 237568 57 nft_compat,nft_chain_nat
nfnetlink 20480 4 nft_compat,nf_conntrack_netlink,nf_tables
br_netfilter 32768 0
bridge 204800 1 br_netfilter
cmac 16384 3
algif_hash 16384 1
aes_arm64 16384 3
aes_generic 36864 1 aes_arm64
algif_skcipher 16384 1
af_alg 28672 6 algif_hash,algif_skcipher
bnep 24576 2
hci_uart 53248 1
btbcm 24576 1 hci_uart
bluetooth 565248 31 hci_uart,btbcm,bnep,rfcomm
ecdh_generic 16384 2 bluetooth
ecc 36864 1 ecdh_generic
libaes 16384 3 aes_arm64,bluetooth,aes_generic
overlay 126976 0
8021q 32768 0
garp 20480 1 8021q
stp 16384 2 bridge,garp
llc 16384 3 bridge,stp,garp
vc4 331776 5
brcmfmac 331776 0
snd_soc_hdmi_codec 20480 1
drm_display_helper 16384 1 vc4
cec 53248 1 vc4
drm_dma_helper 20480 1 vc4
brcmutil 24576 1 brcmfmac
drm_kms_helper 204800 3 drm_dma_helper,vc4
snd_soc_core 274432 2 vc4,snd_soc_hdmi_codec
cfg80211 925696 1 brcmfmac
snd_compress 20480 1 snd_soc_core
snd_pcm_dmaengine 20480 1 snd_soc_core
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
raspberrypi_hwmon 16384 0
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
bcm2835_codec 49152 0
bcm2835_v4l2 45056 0
bcm2835_isp 28672 0
rfkill 32768 6 bluetooth,cfg80211
bcm2835_mmal_vchiq 36864 3 bcm2835_codec,bcm2835_v4l2,bcm2835_isp
v4l2_mem2mem 45056 1 bcm2835_codec
videobuf2_dma_contig 20480 2 bcm2835_codec,bcm2835_isp
videobuf2_vmalloc 16384 1 bcm2835_v4l2
videobuf2_memops 16384 2 videobuf2_vmalloc,videobuf2_dma_contig
i2c_bcm2835 16384 0
videobuf2_v4l2 32768 4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,bcm2835_isp
videobuf2_common 69632 8 bcm2835_codec,videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_v4l2,bcm2835_v4l2,v4l2_mem2mem,videobuf2_memops,bcm2835_isp
videodev 274432 6 bcm2835_codec,videobuf2_v4l2,bcm2835_v4l2,videobuf2_common,v4l2_mem2mem,bcm2835_isp
snd_bcm2835 28672 1
snd_pcm 139264 5 snd_bcm2835,snd_soc_hdmi_codec,snd_compress,snd_soc_core,snd_pcm_dmaengine
snd_timer 36864 1 snd_pcm
snd 106496 8 snd_bcm2835,snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm
mc 61440 6 videodev,bcm2835_codec,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem,bcm2835_isp
vc_sm_cma 36864 2 bcm2835_mmal_vchiq,bcm2835_isp
uio_pdrv_genirq 16384 0
uio 24576 1 uio_pdrv_genirq
drm 581632 8 drm_kms_helper,drm_dma_helper,vc4,drm_display_helper
i2c_dev 20480 0
fuse 135168 3
drm_panel_orientation_quirks 28672 1 drm
backlight 24576 1 drm
ip_tables 32768 0
x_tables 53248 5 xt_conntrack,nft_compat,xt_addrtype,ip_tables,xt_MASQUERADE
ipv6 557056 36 bridge,br_netfilter
and this is the non-working one:
root@raspbx:~# lsmod
Module Size Used by
xt_nat 16384 1
xt_tcpudp 16384 3
veth 28672 0
xt_conntrack 16384 1
xt_MASQUERADE 16384 2
nf_conntrack_netlink 49152 0
nft_counter 16384 18
xt_addrtype 16384 2
nft_compat 20480 9
nft_chain_nat 16384 4
nf_nat 49152 3 xt_nat,xt_MASQUERADE,nft_chain_nat
nf_conntrack 139264 5 xt_nat,xt_MASQUERADE,nf_conntrack_netlink,xt_conntrack,nf_nat
nf_defrag_ipv6 20480 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
nf_tables 196608 64 nft_compat,nft_chain_nat,nft_counter
nfnetlink 16384 4 nft_compat,nf_conntrack_netlink,nf_tables
br_netfilter 32768 0
bridge 163840 1 br_netfilter
overlay 106496 2
cmac 16384 1
bnep 20480 2
hci_uart 40960 1
btbcm 16384 1 hci_uart
bluetooth 393216 24 hci_uart,bnep,btbcm
ecdh_generic 16384 2 bluetooth
ecc 40960 1 ecdh_generic
8021q 32768 0
garp 16384 1 8021q
stp 16384 2 garp,bridge
llc 16384 3 garp,bridge,stp
lz4 16384 16
lz4_compress 45056 1 lz4
zram 28672 4
zsmalloc 28672 1 zram
binfmt_misc 20480 1
brcmfmac 327680 0
brcmutil 20480 1 brcmfmac
sha256_generic 16384 0
cfg80211 761856 1 brcmfmac
rfkill 32768 6 bluetooth,cfg80211
raspberrypi_hwmon 16384 0
bcm2835_codec 40960 0
bcm2835_v4l2 40960 0
bcm2835_isp 32768 0
v4l2_mem2mem 36864 1 bcm2835_codec
bcm2835_mmal_vchiq 32768 3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
videobuf2_dma_contig 20480 2 bcm2835_isp,bcm2835_codec
videobuf2_vmalloc 16384 1 bcm2835_v4l2
vc_sm_cma 32768 2 bcm2835_isp,bcm2835_mmal_vchiq
videobuf2_memops 16384 2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2 32768 4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common 61440 5 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
videodev 249856 6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
mc 45056 6 bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
uio_pdrv_genirq 16384 0
uio 20480 1 uio_pdrv_genirq
fixed 16384 0
snd_dummy 20480 1
snd_bcm2835 24576 2
snd_pcm 110592 2 snd_bcm2835,snd_dummy
snd_timer 32768 1 snd_pcm
snd 77824 10 snd_timer,snd_bcm2835,snd_dummy,snd_pcm
ip_tables 28672 0
x_tables 32768 7 xt_nat,ip_tables,nft_compat,xt_tcpudp,xt_MASQUERADE,xt_addrtype,xt_conntrack
ipv6 495616 83 br_netfilter,bridge
maybe it is some package like usbutils.
working:
ipp-usb/oldstable,now 0.9.17-3+b4 arm64 [installed,automatic]
libgusb2/oldstable,now 0.3.5-1 arm64 [installed,automatic]
libusb-1.0-0/oldstable,now 2:1.0.24-3 arm64 [installed,automatic]
libusbmuxd6/oldstable,now 2.0.2-3 arm64 [installed,automatic]
usb-modeswitch-data/oldstable,oldstable,now 20191128-3 all [installed,automatic]
usb-modeswitch/oldstable,now 2.6.1-1 arm64 [installed]
usb.ids/now 2023.01.16-0+deb11u1 all [installed,upgradable to: 2024.01.20-0+deb11u1]
usbutils/oldstable,now 1:013-3 arm64 [installed]
not-working:
libgusb2/oldoldstable,now 0.3.0-1 armhf [installed]
libusb-1.0-0-dev/oldoldstable,now 2:1.0.22-2 armhf [installed]
libusb-1.0-0/oldoldstable,now 2:1.0.22-2 armhf [installed]
libusb-1.0-doc/oldoldstable,now 2:1.0.22-2 all [installed,automatic]
libusbmuxd4/oldoldstable,now 1.1.0~git20181007.07a493a-1 armhf [installed,automatic]
usb-modeswitch-data/oldoldstable,now 20170806-2 all [installed,automatic]
usb-modeswitch/oldoldstable,now 2.5.2+repack0-2 armhf [installed]
usb.ids/oldoldstable,now 2019.07.27-0+deb10u1 all [installed,automatic]
usbmuxd/oldoldstable,now 1.1.1~git20181007.f838cf6-1 armhf [installed,automatic]
usbutils/oldoldstable,now 1:010-3 armhf [installed]
Well, the module lists do differ significantly. I've sorted the two and passed into meld
, to see that among other modules that seem less relevant (backlight , sound, drm, aes, alg* etc.) some present on "proxy" only are: i2c_bcm2835 i2c_dev rfcomm cec vc4 whatever those are. At least the names look hardware-related.
IIRC Raspberries also have a lot of impact from DTB files and other configuration on the card which passes device information and kernel arguments to the Linux which is eventually loaded. Do those differ in an interesting manner?
Well, the module lists do differ significantly. I've sorted the two and passed into
meld
, to see that among other modules that seem less relevant (backlight , sound, drm, aes, alg* etc.) some present on "proxy" only are: i2c_bcm2835 i2c_dev rfcomm cec vc4 whatever those are. At least the names look hardware-related.
Ok but I can't try every possibility. I need some clue to test 1-2 of missing modules.
IIRC Raspberries also have a lot of impact from DTB files and other configuration on the card which passes device information and kernel arguments to the Linux which is eventually loaded. Do those differ in an interesting manner?
Where are those files ?
Where are those files ?
Well, it is your Raspberry. I've only read about them and saw at colleagues' rigs, but did not really get to setting up any myself.
My understanding is that the SD card is usually FAT-formatted for the boot part, and there are text files on it... Can't say more.
Hi,
I have a weird problem and Github issues might not be the correct place to write this. Please forgive me and let me know where to write it in that case.
The problem:
I have a working NUT setup on a raspberry pi 3B with raspbian bullseye. Now I need to move it to another RPI 3B, but the OS is older on this one (buster) In fact, I also have a working NUT setup on this RPI (the one that I am moving to) but it is using a different UPS. So , I have 2 RPI ; lets call them RPI-a and RPI-b Both RPI has working NUT setup but with different UPS. RPI-a is connected to UPS-a , RPI-b is connected to UPS-b
Now I want to connect RPI-b to UPS-a
When I connect the UPS with its USB cable to RPI-b, it does not recognize it as a device. Does not show up in "lsusb" , and all I see in "dmesg" is :
root@raspbx:/boot# dmesg | grep usb [ 841.494024] usb 1-1.4: new low-speed USB device number 8 using dwc_otg [ 842.044035] usb 1-1.4: new low-speed USB device number 9 using dwc_otg [ 842.494267] usb 1-1-port4: attempt power cycle [ 843.154035] usb 1-1.4: new low-speed USB device number 10 using dwc_otg [ 843.694036] usb 1-1.4: new low-speed USB device number 11 using dwc_otg
so I collected these information below from each RPI when UPS-a is connected with a USB cable.
Working PI:
not working PI:
I don't know where to focus so I could only try:
Could you please tell me where to focus ?
note: