Sample Header Ad - 728x90

connmanctl on a Debian 'pocketbeagle'

1 vote
1 answer
446 views
I'm trying to configure my new [*"pocketbeagle"*](http://beagleboard.org/pocket) to share a network connection with my Ubuntu (20.04) laptop. PocketBeagle runs a version of Debian: 10.3/2020-04-06 ([REF](http://beagleboard.org/latest-images)) . *"pocketbeagle"* has neither WiFi nor Ethernet - only a single USB port. It supports ssh, and I can access the board this way through either or both of two IPs. Perhaps easier if I show it like this: ### ifconfig run on *"pocketbeagle"* reveals:
$ ifconfig
usb0: flags=4163  mtu 1500
        inet 192.168.7.2  netmask 255.255.255.0  broadcast 192.168.7.255
        inet6 fe80::6264:5ff:fefa:813a  prefixlen 64  scopeid 0x20
        ether 60:64:05:fa:81:3a  txqueuelen 1000  (Ethernet)
        ...
usb1: flags=4163  mtu 1500
        inet 192.168.6.2  netmask 255.255.255.0  broadcast 192.168.6.255
        inet6 fe80::6264:5ff:fefa:813e  prefixlen 64  scopeid 0x20
        ether 60:64:05:fa:81:3e  txqueuelen 1000  (Ethernet)
        ...
### ifconfig run on *"ubuntu"* reveals:
$ ifconfig 
enx606405fa813b: flags=4163  mtu 1500
        inet 192.168.7.1  netmask 255.255.255.0  broadcast 192.168.7.255
        inet6 fe80::2267:92a0:a191:297d  prefixlen 64  scopeid 0x20
        ether 60:64:05:fa:81:3b  txqueuelen 1000  (Ethernet)
        ...

enx606405fa813d: flags=4163  mtu 1500
        inet 192.168.6.1  netmask 255.255.255.0  broadcast 192.168.6.255
        inet6 fe80::3898:bc86:d0c2:cb53  prefixlen 64  scopeid 0x20
        ether 60:64:05:fa:81:3d  txqueuelen 1000  (Ethernet)
        ...
### Through a bit of research, I formulated a procedure to effect sharing as shown below: 1. Using the *"ubuntu"* GUI, I changed the *"Ethernet Connection"* w/ MAC 60:64:05:FA:81:3D from its default *"automatic DHCP"* to a *"shared connection"*. 2. This changed its IP address from 192.168.6.1 assigned by *"pocketbeagle"* to 10.42.0.1. After making this change, here's what the *"ubuntu"* reports on its CLI:
$ ifconfig
enx606405fa813d: flags=4163  mtu 1500
        inet 10.42.0.1  netmask 255.255.255.0  broadcast 10.42.0.255
        inet6 fe80::3898:bc86:d0c2:cb53  prefixlen 64  scopeid 0x20
        ether 60:64:05:fa:81:3d  txqueuelen 1000  (Ethernet)
        ...
3. At this point, the interfaces on *"pocketbeagle"* are unchanged, but obviously incorrect for connection sharing. I executed the following from the CLI on *"pocketbeagle"*
$ sudo connmanctl config usb1 --ipv4 manual 10.42.0.2 255.255.255.0 10.42.0.1 --nameservers 10.42.0.1
[sudo] password for debian: 
Error usb1: Method "SetProperty" with signature "sv" on interface "net.connman.Service" doesn't exist
Attempting a query of services w/ connmanctl:
$ sudo connmanctl 
Error getting VPN connections: The name net.connman.vpn was not provided by any .service files
connmancconnmanctl> services

connmanctl>
I'm not at all familiar with connmanctl, but my research suggested it was the only way to properly set up DNS service. Perhaps I screwed up? Perhaps there is something else I've missed? I then decided to try the configuration the "old way": 4. The following sequence of commands was used to re-configure the corresponding *"pocketbeagle"* interface in the "old way":
$ sudo ifconfig usb1 10.42.0.2 netmask 255.255.255.0 up
$ sudo route add default gw 10.42.0.1 usb1
$ sudo nano /etc/resolv.conf
#
# add line: nameserver 10.42.0.1 
# save & exit editor
#
# yes - this is an awful kludge, but it did provide DNS
**And this worked!** - the *"pocketbeagle"* successfully connected to the Internet, DNS worked also.
debian@beaglebone:~$ ping unix.stackexchange.com
PING unix.stackexchange.com (151.101.1.69) 56(84) bytes of data.
64 bytes from 151.101.1.69 (151.101.1.69): icmp_seq=1 ttl=56 time=9.01 ms
64 bytes from 151.101.1.69 (151.101.1.69): icmp_seq=2 ttl=56 time=11.8 ms
...
### QUESTION: Obviously the issue is with my use of connmanctl, and not with *"pocketbeagle"* itself. What did I do incorrectly - why will connmanctl not work as intended?
Asked by Seamus (3772 rep)
Jul 24, 2020, 06:05 AM
Last activity: Jul 25, 2020, 06:37 PM