The other option is to use connmanctl via command line in your scripts:

 $connmanctl config <service> --ipv4 manual <ip address> <netmask> <gateway>

https://www.mankier.com/1/connmanctl

http://variwiki.com/index.php?title=Static_IP_Address


Cheers,

Jon

On Thu, Apr 16, 2020 at 4:47 PM Robert Nelson <[email protected]>
wrote:

> On Thu, Apr 16, 2020 at 6:41 PM Robert Cachro <[email protected]>
> wrote:
> >
> > We are upgrading our product from the BeagleBone Black to BeagleBone
> Black Wireless and have had a really tough with automating a connection
> using connmanctl. In our current product's commissioning process, a
> customer logs into their BB via either USB or AP mode (which is hosting a
> wifi configuration page) and is able to enter their Wi-Fi SSID/password
> which is then passed onto a script to establish a connection with their
> network. The original implementation simply modified the
> /etc/network/interfaces file and with ifup/ifdown established a connection
> with their wireless network. However, we have had zero luck automating this
> connection using connmanctl as it launches an interactive shell which makes
> it impossible for scripts to enter user passwords. Any thoughts??
> >
> > Started investigating /var/lib/connman/settings today but was hoping
> someone had success with this. Would hate to revert to our old method by
> uninstalling connmanctl.. Thanks.
>
> 2 options:
>
> You don't need to use the connman interactive shell, all connections
> are stored under:
>
> /var/lib/connman/
>
> debian@bbgw-pwr15-ser23:~$ sudo cat
>
> /var/lib/connman/wifi_209148c9516a_584131302d576946692d5831_managed_psk/settings
> [wifi_209148c9516a_584131302d576946692d5831_managed_psk]
> Name=XA10-WiFi-X1
> SSID=584131302d576946692d5831
> Frequency=2412
> Favorite=true
> AutoConnect=true
> Modified=2020-04-16T19:16:41.218495Z
> Passphrase=******
> IPv4.method=dhcp
> IPv4.DHCP.LastAddress=192.168.1.155
> IPv6.method=auto
> IPv6.privacy=disabled
>
> 2nd, you don't "have" to use connman, we just use it by default it as
> it works pretty decent for out of box..
>
> sudo apt remove connman --purge
>
> Then go back to /etc/network/interfaces...
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAOCHtYjQcscYK7ir0HJMnDt9AjxEUGqhTjRKJ9Y%3DGFNdkPmy%3Dw%40mail.gmail.com
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAG99bkr1OANtZUCX7QrdC6%2BwLhdi898nPPo0sWnYhtd6%3DfBwxw%40mail.gmail.com.

Reply via email to