Skip to content

"Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source

I hate having to set clocks. Most of our clocks at home get the time from Internet or from the DCF77 time signal.

The problem with the DCF77 time signal is that it is quite sensitive to environmental noise from lamps or other appliances, and the reception inside buildings can be problematic in some places.

I recently installed a clock in such a location. Using Udo Klein's DCF77 analysis tool it was clear that it would be nearly impossible to get the clock to work properly as initially planned, so I started looking for solutions:

- bigger antenna (eg this one)
- external antenna
- external receiver
- different time source

For different reasons, the only viable option seemed to be a different time source. But I did not want to change the clock design. While researching a solution, I came across the Chronvertor. Although this would allow to run the clock without DCF77 signal, the clock would still have to be set from time to time (due to lack of precision of the RTC, but at least twice per year for DST adjustments), so I quickly dismissed that option. However it provided inspiration for what I eventually ended up building: a NTP to DCF77 "adapter".

I had experimented previously with the TimeNTP example from the Arduino Time library, and there was plenty of information available online about the DCF77 signal, so this quickly appeared to be a viable option. This is the result: ntp2dcf.ino.
  • Twitter
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source
  • Mixx "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source
  • Bloglines "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source
  • Technorati "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source
  • Fark this: "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at YahooMyWeb
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at Furl.net
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at reddit.com
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at blinklist.com
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at Spurl.net
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at NewsVine
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at Simpy.com
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source at blogmarks
  • Bookmark "Convert" NTP to DCF77 - generate a DCF77 signal on an Arduino using an NTP time source with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

now with IPv6

In anticipation of World IPv6 Launch Day (6 June 2012), this website is now fully reachable over IPv6.
  • Twitter
  • Bookmark now with IPv6 at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg now with IPv6
  • Mixx now with IPv6
  • Bloglines now with IPv6
  • Technorati now with IPv6
  • Fark this: now with IPv6
  • Bookmark now with IPv6 at YahooMyWeb
  • Bookmark now with IPv6 at Furl.net
  • Bookmark now with IPv6 at reddit.com
  • Bookmark now with IPv6 at blinklist.com
  • Bookmark now with IPv6 at Spurl.net
  • Bookmark now with IPv6 at NewsVine
  • Bookmark now with IPv6 at Simpy.com
  • Bookmark now with IPv6 at blogmarks
  • Bookmark now with IPv6 with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

IPv6 test websites

  • Twitter
  • Bookmark IPv6 test websites at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg IPv6 test websites
  • Mixx IPv6 test websites
  • Bloglines IPv6 test websites
  • Technorati IPv6 test websites
  • Fark this: IPv6 test websites
  • Bookmark IPv6 test websites at YahooMyWeb
  • Bookmark IPv6 test websites at Furl.net
  • Bookmark IPv6 test websites at reddit.com
  • Bookmark IPv6 test websites at blinklist.com
  • Bookmark IPv6 test websites at Spurl.net
  • Bookmark IPv6 test websites at NewsVine
  • Bookmark IPv6 test websites at Simpy.com
  • Bookmark IPv6 test websites at blogmarks
  • Bookmark IPv6 test websites with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too)

According to the Wikipedia IPv6 article, Privacy extensions are, except for the Windows platform and Mac OS X since 10.7 as well as iOS since version 4.3, not enabled by default.

In theory, one can enable the IPv6 Privacy Extensions on all interfaces at once using sysctl like this:
sudo sysctl net.ipv6.conf.all.use_tempaddr=2

However, this currently doesn't work as expected, so I'm using this one-liner in /etc/rc.local:
for IF in `/bin/ls /proc/sys/net/ipv6/conf/*/use_tempaddr` ; do echo 2 > $IF ; done

This also sets "use_tempaddr" for "default", which means it should also apply to interfaces added to the system afterwards.

A simple check to verify that the new configuration is working: ipv6-test.com will print your MAC address when available...

See also: Linux Kernel Bug 11655

  • Twitter
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too)
  • Mixx Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too)
  • Bloglines Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too)
  • Technorati Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too)
  • Fark this: Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too)
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at YahooMyWeb
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at Furl.net
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at reddit.com
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at blinklist.com
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at Spurl.net
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at NewsVine
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at Simpy.com
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) at blogmarks
  • Bookmark Enabling IPv6 Privacy Extensions on all interfaces (Ubuntu Linux, may work for other distros too) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

gulp - tcpdump alternative for lossless capture on Linux

tcpdump and wireshark are the tools that usually come to mind when you have to capture network traffic. But in some situations where you have to record a large amount of data and you want to avoid losing packets, tcpdump has some limitations. When I was hit myself by the tcpdump packet loss problem, I quickly found out that I was not alone and that a number of people had already researched the topic and/or provided alternatives.*

In particular, I found two different tools to perform the task: Corey Satten's gulp (http://corey.elsewhere.org/gulp/) and lindump from HP Labs (http://tesla.hpl.hp.com/opensource/)

I also found two interesting papers about capturing high volumes of traffic: http://www.usenix.org/events/fast09/tech/full_papers/anderson/anderson_html/ and http://docs.di.fc.ul.pt/jspui/bitstream/10455/3299/1/thesis-nhenriqu.pdf (the second quotes the first one among others, and also contains useful info to optimally spread the load among different cores)

After some tests I quickly became a happy gulp user, and thanks to the software being open source I was able to add features to it that I missed from the latest tcpdump versions:

-n - allows to change the default filename template
-t - allows to add a timestamp to the filename
-G - rotate pcap file every n seconds
-F - allows to skip the check for an ethernet interface
-Z - allows to specify a command to post-process each capture file

I've sent a patch to Corey Satten, who intends to setup a repository to hold the various contributions he gets for gulp. In the meanwhile, you can find my changes in the attached file (02-gulp-ntGFZ.patch.gz). For your convenience and for completeness, I also provide here the patch from Guy Harris that fixes issues on 64 bit systems (see http://seclists.org/wireshark/2009/Oct/105, apply that one first).

Updates:
2012-08-22: new version of my patch to fix the issue reported by SgtMalicious
2017-02-03: long-standing bug fixed

Downloads:
01-gulp-amd64.patch.gz: fix issues with 64-bit systems
02-gulp-ntGFZ.patch.gz: additional functionality as described above
gulp-1.58-crox.tgz: source with both patches applied

* other people have reported a performance drop with libpcap version 1.0 compared to previous builds, see http://thread.gmane.org/gmane.network.tcpdump.devel/4629 or http://seclists.org/tcpdump/2010/q3/index.html#11
  • Twitter
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg gulp - tcpdump alternative for lossless capture on Linux
  • Mixx gulp - tcpdump alternative for lossless capture on Linux
  • Bloglines gulp - tcpdump alternative for lossless capture on Linux
  • Technorati gulp - tcpdump alternative for lossless capture on Linux
  • Fark this: gulp - tcpdump alternative for lossless capture on Linux
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at YahooMyWeb
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at Furl.net
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at reddit.com
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at blinklist.com
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at Spurl.net
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at NewsVine
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at Simpy.com
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux at blogmarks
  • Bookmark gulp - tcpdump alternative for lossless capture on Linux with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca