Openwisp Device Configuration

482 views
Skip to first unread message

stefania fratto

unread,
Jul 10, 2018, 9:29:11 AM7/10/18
to OpenWISP
Hi Federico, 
I'm configuring my AP with Openwisp, and I want to register my device automatically in the Openwisp controller (which is already installed and it works), but I cannot complete the registration of the device. 
When I try to configure the openwisp file in /etc/config/ I've this output:

Tue Jul 10 13:02:51 2018 daemon.info openwisp: Registering device...
Tue Jul 10 13:02:52 2018 daemon.err openwisp: Registration failed! error: unrecognized secret
Tue Jul 10 13:02:57 2018 daemon.info openwisp: Registering device...
Tue Jul 10 13:02:57 2018 daemon.err openwisp: Registration failed! error: unrecognized secret
Tue Jul 10 13:03:02 2018 daemon.info openwisp: Registering device...
Tue Jul 10 13:03:03 2018 daemon.err openwisp: Registration failed! error: unrecognized secret
Tue Jul 10 13:03:08 2018 daemon.info openwisp: Registering device...
Tue Jul 10 13:03:09 2018 daemon.err openwisp: Registration failed! error: unrecognized secret
Tue Jul 10 13:03:09 2018 daemon.info procd: Instance openwisp_config::instance1 s in a crash loop 6 crashes, 1 seconds since last crash
Tue Jul 10 13:04:56 2018 daemon.info openwisp: OpenWISP config agent started
Tue Jul 10 13:04:56 2018 daemon.info openwisp: Registering device...
Tue Jul 10 13:04:57 2018 daemon.err openwisp: Registration failed! error: unrecognized secret
Tue Jul 10 13:06:16 2018 daemon.info openwisp: OpenWISP config agent stopping
Tue Jul 10 13:06:19 2018 daemon.info openwisp: OpenWISP config agent started
Tue Jul 10 13:06:19 2018 daemon.info openwisp: Registering device...
Tue Jul 10 13:06:19 2018 daemon.err openwisp: Registration failed! error: unrecognized secret

I don't understand if I forget anything in the initial configuration. This is my configuration file:

config controller 'http'
        option url 'https://openwisp2.localiving.it'
        #option interval '120'
        option verify_ssl '0'
        option shared_secret 'L0c4l1v1ng123'
        option consistent_key '1'
        option mac_interface 'eth0.2'
        #option merge_config '1'
        #option test_config '1'
        #option test_script '/usr/sbin/mytest'
        option uuid ''
        option key '7URB2bCK7nOxwHgrohqsl6ySFsJC4k96JXffoLAV+j8='
        list unmanaged 'system.@led'
        list unmanaged 'network.loopback'
        list unmanaged 'network.@switch'
        list unmanaged 'network.@switch_vlan'
        # curl options
        #option connect_timeout '15'
        #option max_time '30'
        #option capath '/etc/ssl/certs'
        #option cacert '/etc/ssl/certs/ca-certificates.crt'
        # hooks
        #option pre_reload_hook '/usr/sbin/my_pre_reload_hook'

Another question is : Is correct to suppose that the key option value is the shared-key which is stored in the cache of the device?
My device is a TP-link tl-wr841n v.13.
My apologies for my english.

Thanks,

Stefania Fratto 

Federico Capoano

unread,
Jul 10, 2018, 9:57:27 AM7/10/18
to open...@googlegroups.com
Hi Stefania,

in shared_secret you should put the key you can find in admin > organization > name of the organization you are using (a "default" one should be present) > configuration management settings > shared secret.

Once you put the correct shared secret in the device configuration, reload the agent and it will register automatically in OpenWISP.

Federico

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oliver Kraitschy

unread,
Jul 10, 2018, 10:15:46 AM7/10/18
to open...@googlegroups.com
Hello Stefania,

is the value of the option shared_secret the value of the shared_secret
of your organization?

In your openwisp-config configuration, the option key must be set to ''.

Greetings,
Oliver

stefania fratto

unread,
Jul 10, 2018, 10:29:48 AM7/10/18
to OpenWISP
Thanks Federico, I've missed this step in your tutorial.

stefania fratto

unread,
Jul 10, 2018, 10:32:14 AM7/10/18
to OpenWISP
Hi Oliver,
the shared_secret value is the shared_secret of organization, as Federico said.
Thanks for your answer.

Amit Goyal

unread,
Jul 5, 2019, 6:38:42 AM7/5/19
to OpenWISP
Hi Federico 

I want to register AP in openwisp through backend API.  e.g. I have AP information in csv file and want to register AP using this csv file information.
Is there any API or Script exist in openwisp where I can pass all information as arguments and register AP.
Reply all
Reply to author
Forward
0 new messages