Project

General

Profile

JeeLink causing system hang?

Added by jbyrnes almost 6 years ago

Hi, I have two jeenodes and a jeelink from a couple of years ago. Currently the nodes send humidity and temp data back to the ’link, where it is read by a python process on a Raspberry Pi and posted to cosm. However, I have a problem where the Pi will hang anywhere from a few hours to 48 hours, and suspect it may be due to the JeeLink. It needs a hard restart to recover, which is quite annoying while trying to collect long-term data without intervention.

I have eliminated virtually everything else, the only other thing connected is a wifi adapter, and I’ve tried 3 different ones.
The power supply seems stable, and I’ve tried others and different ways of connecting it.
The hang doesn’t seem to happen at any particular time. There is nothing in the logs; it just totally locks up.
I have tried a 2nd, older Pi and the same thing happens.

I originally had the ’link on a mac-mini and it was doing something similar, hanging after a while. I don’t remember exactly what happened as it was a while ago.

Has anyone had any problems with a JeeLink?

I have noticed that the FTDI drivers are quite flaky, this could be related. On Mac I notice sometimes they cause a complete system freeze (with the darkened screen telling you to reboot) with the USB FTDI adapters for jeenodes. Mostly if you unplug while using the serial port, but sometimes just randomly while using the arduino IDE with one connected. I imagine the drivers for linux and mac are similar.

Thanks
Joel


Replies (8)

RE: JeeLink causing system hang? - Added by JohnO almost 6 years ago

I am currently using a JeeNode Micro to feed my Pi asynchronously using software serial into the Pi header. I am using a modified, slimmer version of RF12Demo. I wonder, do you have your Jeelink set up to a specific group or group 0? Also, have you tried setting the JeeLink to quiet (1q) such that it doesn’t display noise & bad CRC packets?

RE: JeeLink causing system hang? - Added by jcw almost 6 years ago

> I have noticed that the FTDI drivers are quite flaky

Definitely - 75% chance of a kernel panic on the Mac when unplugging an FTDI device while a serial session is open. It’s been like that for years.

But I have no problems with it in normal use. There’s a JeeLink on my server which collects all data, and it runs for months on end - only interrupted by occasional reboots few times a year (for unrelated reasons).

If you disable the RPi’s console output in /boot/cmdline.txt and ttyAMA0 in /etc/inittab, then you can use the Pi header pins as JohnO describes, i.e. a JeeNode without FTDI / USB in between. See http://jeelabs.org/2012/09/20/serial-hookup-jeenode-to-raspberry-pi/

RE: JeeLink causing system hang? - Added by jbyrnes almost 6 years ago

Thanks for the fast responses guys!

I believe my nodes and link are set up on the default group, I guess that’s 0. I’m not using the rf12demo on it, just a really simple sketch which displays the node ID and whatever string was received (it’s a simple string-based protocol). I don’t know how it would handle bad packets, though sometimes it does print a funky one. If a packet is not valid though, I think it ignores it.
Is this 1q quiet setting rf12demo-specific?

I also had a go with the serial hookup to the Pi, I got it working with one of my nodes. I didn’t want to have to keep the node where the Pi is though, the idea is remote monitoring wherever I put them in the house, and also having two allows me to contrast. But it could be worth trying for a week to see that there are no crashes. Or maybe I could use the link like a node by bypassing the FTDI? I’m not sure those pins are exposed.

RE: JeeLink causing system hang? - Added by mjl almost 6 years ago

jbyrnes wrote:
> Hi, I have two jeenodes and a jeelink from a couple of years ago. Currently the nodes send humidity and temp data back to the ’link, where it is read by a python process on a Raspberry Pi and posted to cosm. However, I have a problem where the Pi will hang anywhere from a few hours to 48 hours, and suspect it may be due to the JeeLink. It needs a hard restart to recover, which is quite annoying while trying to collect long-term data without intervention.

How up to date is the software on the Pi? A lot has (and still is being) changed in the area of USB in the last few months so updating might help. If you feel particuarly daring you could try Gordon’s latest experimental bits (see the raspberyy Pi forum). I used to have a jeelink on a Raspberry Pi about a year ago and suffered from the same mysterious hangs (headless Pi with only the jeelink connected to USB). Due to this I switched to using a jeenode connected to the serial port and as that works flawlessly, I stopped looking into getting the jeelink to work reliably (I now use that on my test rig that gets power cycled often enough so it’s not a problem there)

RE: JeeLink causing system hang? - Added by jbyrnes almost 6 years ago

I came across RPi-Monitor and thought it would be useful and might help narrow down issues if there is a trend (memory use or something). In doing so I did an update, it had probably been a couple of months since a full update. So far it’s been up for 1 day 20 hours which is pretty good - maybe just the update helped!

RE: JeeLink causing system hang? - Added by lwitt-fr over 5 years ago

JohnO wrote:
> I am currently using a JeeNode Micro to feed my Pi asynchronously using software serial into the Pi header. I am using a modified, slimmer version of RF12Demo. I wonder, do you have your Jeelink set up to a specific group or group 0? Also, have you tried setting the JeeLink to quiet (1q) such that it doesn’t display noise & bad CRC packets?

Hi JohnO,

Can you share your modified version of RF12demo you used to feed the Raspi?

Are both simply hooked through AIO2/DIO2 of the Jeenode Micro?

RE: JeeLink causing system hang? - Added by JohnO over 5 years ago

It is the second post on http://jeelabs.net/boards/7/topics/2119?r=2120\#message-2120

It can use the rfmods branch of jeelib to show the db level of the received signal, that is commented out.

    (1-8/8)