RFLink and boot from USB

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Post Reply
Message
Author
manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

RFLink and boot from USB

#1 Post by manjh » 08 Jun 2021, 11:36

I have been using RFLink for a number of years now, without a glitch. It is USB attached to my Raspberry Pi 4.
But I am making changes: in stead of booting from the SD card, my Pi now runs off a USB attached SSD. Because the controller chip in the SATA/USB cable does not properly support UASP, I am running it off USB2 for now (awaiting a new cable with the correct chip, so I can connect to USB3).

This brings me to my question. Sometimes (not always) the Pi refuses to boot. I noticed that this does not happen when I disconnect the RFLink.
After booting with no RFLink attached, I can connect the RFLink cable again and everything is working.
Does this make any sense?

User avatar
Ath
Normal user
Posts: 3386
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFLink and boot from USB

#2 Post by Ath » 08 Jun 2021, 13:02

Sounds like a power issue, can possibly be resolved by using a larger-spec powersupply, or by powering, f.e., the ssd or rflink using an extra power supply.
/Ton (PayPal.me)

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#3 Post by manjh » 08 Jun 2021, 14:30

I use a "real" Raspberry 3A power supply. Rflink is on a separate supply, so there should be enough juice to go around...

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#4 Post by manjh » 08 Jun 2021, 15:46

OK, I think I may have found a workaround.
Just to get to the bottom of this, I pulled the Pi and the RFLink from it's place, and attached it to a HDMI monitor in my office, so I can now at least see what is happening during boot.
When booting with RFLink attached, I get a number of errors about resetting the USB power state, or something like that.
Just for the heck of it, I pulled the dedicated 5V power supply from the RFLink, and let it get power from the Pi through USB.
This removed all errors.... it now boots perfectly!

So the solution is not to add more power, but rather to remove it... less-is-more...

So, although this removes my problem, I still don't really understand. But hey, such is life... :D

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#5 Post by manjh » 30 Jun 2021, 12:09

Yesterday experienced the same problem on a different setup (in my vacation house).
This is a Pi-3 with USB attached RF-Link.
I changed the setup in order to boot the Pi from SSD, and it does not boot! No green LED blinking, no colored screen.
So I pulled the separate power supply for the Arduino and RFLink, and sure enough, it booted. But it gave me undervoltage warnings, even though I used a 3A power supply for the Pi.
Found another power supply that has a higher quality, and now everything is OK.

The conclusion: when you want to boot a Raspberry Pi from USB, and there is a USB attached RFLink, make sure RFLink does NOT have it's own power supply. Let it draw power from the Pi over USB.

This does not "feel" very logical, but there it is.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#6 Post by manjh » 02 Jul 2021, 09:53

It keeps nagging me why this does not work with a dedicated power supply for the Arduino/RFLink.
Does anybody understand this and perhaps give an explanaition here? For education purposes?

User avatar
Stuntteam
Site Beheer
Posts: 786
Joined: 27 Jan 2016, 16:46

Re: RFLink and boot from USB

#7 Post by Stuntteam » 02 Jul 2021, 15:49

Perhaps a ground loop issue?
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#8 Post by manjh » 02 Jul 2021, 16:34

I have no clue. Fact is that this is the case with two separate RFLinks, on R-pi 3 and 4. So it is not a defect, I think.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#9 Post by manjh » 03 Jul 2021, 14:33

Is the designer of the RFLink board still around on this forum? Perhaps some inside view on this problem?

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#10 Post by manjh » 06 Jul 2021, 23:49

I have been running rflink now with power via usb for a number of days now, so without the separate power supply. It runs ok, but I can see frequent "missed" kaku signals, more than before.
Could it be that the rf signal is less powerful this way?

TD-er
Core team member
Posts: 8608
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFLink and boot from USB

#11 Post by TD-er » 07 Jul 2021, 00:06

No idea how the RF-link is designed.
But what I do know is that with RF design and especially the antenna, it is very important to have a proper ground plane and also how this plane is positioned with respect to the antenna.
If you extend this ground plane, or reshape it (by connecting it to another ground plane which isn't in the same geometrical plane) you can greatly affect the antenna's performance.
This can be positive and negative, but assuming the original design was "optimal", it is probably affected negatively.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#12 Post by manjh » 07 Jul 2021, 12:16

OK, just a quick update: I found a workaround.
Even though the setup worked with the USB connection and NO separate power supply for the RFLink, I have a preference to use that additional power. As said before, since the new setup I see frequently "missed" signals.

So: I took an old USB cable and cut it in half. Then soldered the individual leads onto a small piece of stripboard, but disconnected the +5V wire.
Then connected the external power for the RFLink, and the modified USB cable. The setup boots OK from SSD.
Just to verify, I pulled the modified USB and plugged a "normal" USB: black screen, no boot!
So it looks like this is the way.
It's a pity that I donot fully understand why this works, but the main thing is that it does.... :)

TD-er
Core team member
Posts: 8608
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFLink and boot from USB

#13 Post by TD-er » 07 Jul 2021, 12:27

Sounds like the rather standard diode to protect the USB host is not included in the RF link.

So what may happen here is that the USB hub on the Pi does act strange because it is powered from the RF link.
Possibly the USB hub is power cycled by the Pi to reset it, but as long as remains powered via the RF link, it will not reset or at least some registers will not be cleared.

You often see a diode on USB devices that can be powered via an external power to prevent any current to flow from the USB device to the USB host (PC/Pi/etc)
By cutting the +5V you effectively do the same ;)

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#14 Post by manjh » 08 Jul 2021, 13:35

TD-er wrote: 07 Jul 2021, 12:27 Sounds like the rather standard diode to protect the USB host is not included in the RF link.

So what may happen here is that the USB hub on the Pi does act strange because it is powered from the RF link.
Possibly the USB hub is power cycled by the Pi to reset it, but as long as remains powered via the RF link, it will not reset or at least some registers will not be cleared.

You often see a diode on USB devices that can be powered via an external power to prevent any current to flow from the USB device to the USB host (PC/Pi/etc)
By cutting the +5V you effectively do the same ;)
Hmmm.... the RFLink print runs piggyback on a standard Arduino Mega. Power and USB connections are on that Mega, so if the diode wás omitted, then it the Mega is the problem...

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#15 Post by manjh » 08 Jul 2021, 17:20

Correction. Although the system seemed to work OK with the modified USB cable plus separate power supply for the RFLink, it did not.
Some KAKU signals were just fine, but as soon as the distance was a bit more, it did not reach.
So I removed the modified cable and installed a regular one, and removed the separate power supply.
Looks like everything is OK now.

Question is: why...

I had cut the +5V wire, and connected the other three plus the shielding. With this cable, the range of the RF signal was weak.
So perhaps it does have something to do with a ground loop?
I could try to cut the ground wire as well, only leaving the two signal wires...
But to be honest, I am so glad that it now works, I don't want to touch it for the moment... :shock:

TD-er
Core team member
Posts: 8608
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: RFLink and boot from USB

#16 Post by TD-er » 08 Jul 2021, 19:59

Don't use USB without the GND.
That's a good way to damage the USB chips on your py, or the other side.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: RFLink and boot from USB

#17 Post by manjh » 09 Jul 2021, 12:39

TD-er wrote: 08 Jul 2021, 19:59 Don't use USB without the GND.
That's a good way to damage the USB chips on your py, or the other side.
OK, will keep that in mind.

Current situation is: "normal" USB cable, with no separate power supply for the RFLink/Arduino Mega. Effectively means that the Mega pulls power from the Pi over the USB cable.
The Pi boots from my Samsung Evo SSD. The power that this takes, with the power for the Mega, comes out of the 1.2 Amp that the Pi can deliver to the USB bank. Seems to be sufficient.

The Pi is powered by a 5 Amp power supply, this should be more than enough.

RF range is OK now. All KAKU units can be controlled without a hitch, even the more remote units.

Conclusion: even though my gut feeling tells me that a separate power supply for the Mega/RFLink is "better", the reality has shown that this is not the case. I will stick to the current setup.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest