Loops

Running in circles

Another run without earphones was completed last night – I’ve reverted to using a Polar chest strap hear rate monitor whilst the Jabras are in their non-working state. Relatively faster and slow interval running last night – at over 30C and high humidity it’s not much fun. Jabra have offered to check my failed earphones to help determine root cause analysis (it’s a refreshing change to be on the other end of an RCA issue!), and have offered to send me a set of Sport Coach earphones. They don’t have an integrated heart rate monitor, but are a further development from the Sport Pulse earphones that keep failing on me. The plan is that if these work, then Jabra could incorporate changes to the Sport Pulse headset and resolve the problem I am continually suffering from. Result!

Programming loops …

Last night, The Son figured that 3:45am was a good time to ‘ask’ for his milk. As usual, I have a lower resistance to staying in bed that the OH, so up I got to prep the milk. He wasn’t in a good mood – we think he’s teething again (although if he had teeth for all the times we thought he was teething he’d have about 30 by now!). Sad, but true, upon walking in to his room, one of my initial thoughts was ‘it’s pretty warm in here, and the aircon hasn’t automatically kicked in’. Milk was duly delivered and drank, followed up by a dose of Nurofen – at which point the OH appeared to provide comfort as well (The Son was noisy enough to ruin her chances of a restful night too!).

Whilst OH was settling The Son, as I was fully awake by now I couldn’t help myself but to check the thermostat code. As I suspected, the code had entered an infinite loop and then been called again and again every 5 minutes. I’m still not sure why the Raspberry Pi is occasionally unable to reach the WiFi enabled plug, and that it stays unreachable, as it did last night. I performed some manual pings from the Raspberry Pi, checked arp tables, and the WiFi plug (seemingly) randomly started responding to pings, which cleared the looped thermostat scripts, and kicked in the air con unit to work.

We were back to bed for 4:15am or so, and I then had my brain pondering why the plug occasionally becomes non-responsive and how to ‘fix’ this.

  • Restrict the looping code to 5 iterations and then exit with an error code (probably a good idea)
  • Try a different (or additional) connection to the WiFi plug (maybe using UDP?)
  • Clear the arp table prior to pinging
  • Try an arping instead of a regular ICMP ping

It’s stuff like this that is keeping me awake at night … that and The Son of course!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: