OpenNTPd with wireless connection

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

OpenNTPd with wireless connection

Postby MaxG » Sun Jan 27, 2013 3:34 pm

I have a Raspberry PI with D-Link "nano" USB WiFi dongle with static IP (via netcfg).

When Raspberry is connected via Ethernet, it picks up the date/time via NTP during boot but it doesn't work using WiFi. Why?
I have tried POST-UP='sleep 10' in wlan profile without results.
I'm using OpenNTPd (default on archlinux).

Can anyone help me?
MaxG
 
Posts: 8
Joined: Thu Jan 03, 2013 8:57 pm

Re: OpenNTPd with wireless connection

Postby pepedog » Sun Jan 27, 2013 4:09 pm

https://wiki.archlinux.org/index.php/Network_Configuration#Run_DHCP_at_boot
Basically if netcfg starts before network comes up, insert the module as described
ie if module is called r8169
$this->bbcode_second_pass_code('', 'echo "r8169" > /etc/modules-load.d/r8169.conf')

Please do not take this literally, you module is probably not r8169, lsmod will tell you
Likely your module is 8192cu
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: OpenNTPd with wireless connection

Postby MaxG » Mon Jan 28, 2013 6:23 pm

My module is r8712u. I have tried to create r8712u.conf in modules-load.d and with PRE_UP='sleep 10' in wlan profile (ipv6.disable=1 /boot/cmdline.txt file), but my PI is stuck at 1970.
Any help?
MaxG
 
Posts: 8
Joined: Thu Jan 03, 2013 8:57 pm

Re: OpenNTPd with wireless connection

Postby pepedog » Mon Jan 28, 2013 6:32 pm

It looks like your looking at this too
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=53&t=30570
Can we see the interface config files, please. Wired one too.
Ie files in /etc/network.d/
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: OpenNTPd with wireless connection

Postby MaxG » Tue Jan 29, 2013 12:55 am

Yeah.

My ethernet profile:
$this->bbcode_second_pass_code('', 'CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection'
INTERFACE='eth0'
IP='static'
ADDR='192.168.1.5'
GATEWAY='192.168.1.1'
DNS='127.0.0.1'
')

My wireless profile:
$this->bbcode_second_pass_code('', 'CONNECTION='wireless'
DESCRIPTION='A wpa_supplicant configuration based wireless connection'
INTERFACE='wlan0'
SECURITY='wpa-config'
WPA_DRIVER='wext'
WPA_CONF='/etc/wpa_supplicant.conf'
IP='static'
ADDR='192.168.1.5'
GATEWAY='192.168.1.1'
DNS='127.0.0.1'
HIDDEN=yes
')
MaxG
 
Posts: 8
Joined: Thu Jan 03, 2013 8:57 pm

Re: OpenNTPd with wireless connection

Postby pepedog » Tue Jan 29, 2013 1:55 am

Did you read this thread?
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=53&t=31332#p271492
Also only have gateway on one device. The one you will use.
Why is dns set as 127.0.0.1 ? you have a dns server all set up?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: OpenNTPd with wireless connection

Postby MaxG » Tue Jan 29, 2013 8:05 am

Yes i have a dns server on my PI. The first profile is wlan. I have not read anywhere that only one profile can contain a gateway. Removing the gateway from the ethernet profile, OpenNTPD work?
It is possible that OpenNTPD has the bug and is unable to work with the wireless?
Should I try with ntpd?
MaxG
 
Posts: 8
Joined: Thu Jan 03, 2013 8:57 pm

Re: OpenNTPd with wireless connection

Postby pepedog » Tue Jan 29, 2013 9:35 am

I pointed out that thread where putting wireless config all in one file got it working, ie no separate wpa conf file
If that doesn't work, post the new config
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: OpenNTPd with wireless connection

Postby MaxG » Wed Jan 30, 2013 9:59 am

Nothing at all. I also tried with Google DNS instead of local DNS server, but OpenNTPD does not work.
But if i try again with the ethernet, time and date are synchronized.

This is my new config file:
$this->bbcode_second_pass_code('', '
CONNECTION='wireless'
DESCRIPTION='A simple WPA encrypted wireless connection'
INTERFACE='wlan0'
SECURITY='wpa'
WPA_DRIVER='wext'
ESSID='XXXXXXX'
KEY='xxxxxxxxxxxxxxxxx'
IP='static'
ADDR='192.168.1.5'
GATEWAY='192.168.1.1'
DNS='8.8.8.8'
HIDDEN=yes
')
MaxG
 
Posts: 8
Joined: Thu Jan 03, 2013 8:57 pm

Re: OpenNTPd with wireless connection

Postby MaxG » Thu Jan 31, 2013 12:18 am

I discovered the problem of no time sync is due to local dns server (on the same machine). OpenNTPD can't recognize the time using wireless connection AND local dns server.
I have installed NTP (that remove OpenNTPD for conflicts).
Now it's all right.
Thank you.
MaxG
 
Posts: 8
Joined: Thu Jan 03, 2013 8:57 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest