Network setup taken over by something

I have been running BBB networking for some time using a netmask of 255.255.255.0; I now have to expand the network
to 500 hosts, so I changed the mask to 255.255.254.0 to give a network at 192.168.0.0/23. I edited /etc/network/interfaces,
but that seems to change nothing as per following; blessed connman is NOT running:

(got the following off the serial connection)

Debian GNU/Linux 8 beaglebone ttyS0

BeagleBoard.org Debian Image 2017-03-19

root@beaglebone:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.231
netmask 255.255.254.0
gateway 192.168.0.1

root@beaglebone:~# ip addr
1: lo…
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b0:d5:cc:ca:18:0d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.231/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::b2d5:ccff:feca:180d/64 scope link
valid_lft forever preferred_lft forever
3: usb0…
4: usb1: …
5: can0: …
6: can1: …

root@beaglebone:~# ifconfig
eth0 Link encap:Ethernet HWaddr b0:d5:cc:ca:18:0d
inet addr:192.168.1.231 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::b2d5:ccff:feca:180d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:404 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34286 (33.4 KiB) TX bytes:7710 (7.5 KiB)
Interrupt:173

connman has taken over maybe ?

Did you reset the network or reboot the board so the change will take place?

Cheers,

Jon

Rebooted and swapped routers (only one has the new network on it).

I’m getting the feeling that Debian lost control here and needs connman. But I can’t upgrade, so now I have to change
horses in midstream because the old images can’t support a netmask other than /24; not a problem if you are fooling
around in the lab, but once you have installed embedded systems in the field … geez this sort of thing burns me up.

I run a /22 network (at home... Don't ask, but it's related to testing. :wink: )

[ip addr show eth0]
4: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq
state UP group default qlen 1000
    link/ether 84:eb:18:e2:52:9a brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.201/22 brd 192.168.3.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::86eb:18ff:fee2:529a/64 scope link
       valid_lft forever preferred_lft forever

Connman + Debian 10 (v4.14.x-ti, v4.19.x-ti, v5.4.x-ti, v4.14.x-bone,
v4.19.x-bone, and v5.4.x-bone kernel's..)

Regards,

OK - but here we go again with cape-universal:

root@beaglebone:~# config-pin -q p9.26

Current mode for P9_26 is: default

root@beaglebone:~# config-pin p9.26 in+
ERROR: write() to /sys/devices/platform/ocp/ocp:P9_26_pinmux/state failed, No such device

Yeah, in+ is no longer valid..

debian@bbb-pwr02-ser10:~$ config-pin -q P9.26

Current mode for P9_26 is: default

debian@bbb-pwr02-ser10:~$ config-pin -l P9.26

Available modes for P9_26 are: default gpio gpio_pu gpio_pd gpio_input
uart can i2c pru_uart pruin

in+ may have been supported by the original version of config-pin, but
that shell script is un-maintainable as we added more boards..

The new version of config-pin, parses the actual modes available.

Regards,

Using BeagleBoard.org Debian Buster IoT Image 2020-04-06

I had no idea config-pin had a sub-option to also set the value and direction..

https://github.com/beagleboard/bb.org-overlays/blob/master/tools/beaglebone-universal-io/config-pin#L1077-L1109

https://github.com/beagleboard/bb.org-overlays/blob/master/tools/beaglebone-universal-io/config-pin#L1279-L1289

https://github.com/beagleboard/bb.org-overlays/blob/master/tools/beaglebone-universal-io/config-pin#L1396-L1413

Anywho, the current shipping config-pin would require:

config-pin P8.12 gpio
echo 1 > /sys/class/gpio/gpio44/value

But you probably don't want to do that..

sudo rm /usr/bin/config-pin
sudo cp -v /opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin
/usr/bin/

So there, all fixed..

For comparison, the old script:

https://github.com/beagleboard/bb.org-overlays/blob/master/tools/beaglebone-universal-io/config-pin

It's replacment..

https://github.com/beagleboard/bb.org-overlays/blob/master/tools/pmunts_muntsos/config-pin.c

Regards,

Is there any way to get aptitude to access gdb in Buster? apt-get update fails as does apt-get install gdb

It would make it easier to help you if you told us the errors you get
when trying this. .....or even copy and paste what actually happens.

root@beaglebone:/tmp# uname -a
Linux beaglebone 4.19.94-ti-r42 #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020 armv7l GNU/Linux
root@beaglebone:/tmp# apt-get update
Err:1 http://deb.debian.org/debian buster InRelease
Temporary failure resolving ‘deb.debian.org
Err:2 http://repos.rcn-ee.com/debian buster InRelease
Temporary failure resolving ‘repos.rcn-ee.com
Err:3 http://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving ‘deb.debian.org
Err:4 http://deb.debian.org/debian-security buster/updates InRelease
Temporary failure resolving ‘deb.debian.org
Reading package lists… Done
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving ‘deb.debian.org
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving ‘deb.debian.org
W: Failed to fetch http://deb.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving ‘deb.debian.org
W: Failed to fetch http://repos.rcn-ee.com/debian/dists/buster/InRelease Temporary failure resolving ‘repos.rcn-ee.com
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@beaglebone:/tmp# apt-get install gdb
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package gdb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
gdb

E: Package ‘gdb’ has no installation candidate

To the best of my knowledge, "aptitude" is just a front-end using apt
in the background to perform actions. At the best, it is still using the
same package database.

  A cut&paste of the actual failure messages would have been of help...

{An hour later, after formatting and writing the 10.3 image to an SD card}

  No apparent problems on a fresh 10.3 Buster image.

debian@beaglebone:~$ sudo apt install gdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libbabeltrace1 libc6-dbg
Suggested packages:
  gdb-doc gdbserver
The following NEW packages will be installed:
  gdb libbabeltrace1 libc6-dbg
0 upgraded, 3 newly installed, 0 to remove and 12 not upgraded.
Need to get 13.8 MB of archives.
After this operation, 23.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian buster/main armhf libbabeltrace1 armhf
1.5.6-2+deb10u1 [152 kB]
Get:2 http://deb.debian.org/debian buster/main armhf gdb armhf 8.2.1-2+b3
[2,824 kB]
Get:3 http://deb.debian.org/debian buster/main armhf libc6-dbg armhf
2.28-10 [10.8 MB]
Fetched 13.8 MB in 10s (1,452 kB/s)
Selecting previously unselected package libbabeltrace1:armhf.
(Reading database ... 72570 files and directories currently installed.)
Preparing to unpack .../libbabeltrace1_1.5.6-2+deb10u1_armhf.deb ...
Unpacking libbabeltrace1:armhf (1.5.6-2+deb10u1) ...
Selecting previously unselected package gdb.
Preparing to unpack .../gdb_8.2.1-2+b3_armhf.deb ...
Unpacking gdb (8.2.1-2+b3) ...
Selecting previously unselected package libc6-dbg:armhf.
Preparing to unpack .../libc6-dbg_2.28-10_armhf.deb ...
Unpacking libc6-dbg:armhf (2.28-10) ...
Setting up libc6-dbg:armhf (2.28-10) ...
Setting up libbabeltrace1:armhf (1.5.6-2+deb10u1) ...
Setting up gdb (8.2.1-2+b3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
debian@beaglebone:~$

You'll need to fix your network first.. Looks like a bad dns setting...

Regards,

Off-hand, that appears to be a problem in your network configuration
(do you have a network connection? Note that unless one fiddles with
"internet connection sharing" on the host computer, the USB access will not
work -- you'll need an actual ethernet cable connected to a router)

My profuse and sincere apologies to everybody - a rotten RJ45 came off the Internet router while I was working on the local subnet router.
Mike

So a "real" hardware bug. :wink:

That happens.

Regards,

I have serious problems with gcc 8.3.0:

root@beaglebone:~/evseclient/compilec# gcc -o gcctest gcctest.c
gcctest.c: In function ‘main’:
gcctest.c:15:3: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
close(memh);
^~~~~
pclose

For this source:

#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(void)
{
int memh;

/* using memory mapped I/O */
memh=open(“/dev/mem”, O_RDWR);

if (memh!=0) {
close(memh);
}
}

The problems get even weirder, with this sort of thing:

evsectlna.c:86:23: error: unknown type name ‘chargecurrent’
int availablecurrent, chargecurrent, pwmisactive, nameplaterating, rfidpresent;
^~~~~~~~~~~~~

Question: is there a way to add some older gcc’s to the etc/apt/soures.list so I can find something that I can use?

gcctest.c:15:3: warning: implicit declaration of function ‘close’; did you
mean ‘pclose’? [-Wimplicit-function-declaration]

...

For this source:

#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>

...

close is declared in unistd.h, which you didn't include.
man 2 close.

regards
az

I have serious problems with gcc 8.3.0:

root@beaglebone:~/evseclient/compilec# gcc -o gcctest gcctest.c
gcctest.c: In function ‘main’:
gcctest.c:15:3: warning: implicit declaration of function ‘close’; did you
mean ‘pclose’? [-Wimplicit-function-declaration]
  close(memh);

"""
The open and creat functions are declared in the header file fcntl.h,
while close is declared in unistd.h.
"""

The problems get even weirder, with this sort of thing:

evsectlna.c:86:23: error: unknown type name ‘chargecurrent’
int availablecurrent, chargecurrent, pwmisactive, nameplaterating,
rfidpresent;

  I'd look at lines preceding that one for some undetected error (missing
; maybe).