General TC > General TC Talk

Building Another Logger

<< < (4/8) > >>

MTCAT:
Hi everyone,

Quick update, I think the "1-wire" temperature sensor and "digitemp" software was the source of most of my boot-up problems, I was getting file permission errors for some reason, even when running the related commands as su, would get "input/output" errors when trying to write out config files and log temp readings to disk, for the moment I've simply removed the "start_temp_log" script from /home/tc/.X.d and am going to try a "virtual com port" temperature sensor from a different manufacturer, hopefully that will work better.

In other news, having some issues with my new "rover" ethernet port (eth0). I'm trying to assign an address of 172.16.1.98 to eth0 "manually" but when I do that via a call to eth0.sh inside bootlocal.sh, I do see the right IP address for eth0 but when I try to ping Google, I get a "Network is unreachable" error back.

But, when I comment out the call to eth0.sh inside bootlocal.sh, after a reboot, my eth0 port comes to life, but with an IP address of 172.16.1.99, so does that seem like DHCP is working but manual or static setting of eth0 is not?

I could just leave it as is since it seems to work but does anyone have any ideas as to what is going on with my inability to turn on eth0 with 172.16.1.98 via eth0.sh ?

I've attached the eth0.sh script here.

Thanks,

David

MTCAT:
Hi everyone,

Sorry, forgot to say, I checked on the IP address of my eth0 port, and my router, with Lubuntu booted up, which was showing 172.16.1.98 for eth0, and 172.16.1.0 for my router.

Thanks,

David

Rich:
Hi MTCAT
If you want to set your IP address manually, add this boot code:

--- Code: ---nodhcp
--- End code ---

Create this file  /opt/eth0.sh

--- Code: ---#!/bin/sh
pkill udhcpc
ifconfig eth0 172.16.1.98 netmask 255.255.255.0 broadcast 172.16.1.255 up
route add default gw 172.16.1.0
echo nameserver 172.16.1.0 > /etc/resolv.conf
--- End code ---

Make it executable:

--- Code: ---chmod 755 /opt/eth0.sh
--- End code ---

and add

--- Code: ---/opt/eth0.sh
--- End code ---
to bootlocal.sh.

MTCAT:
Hi Rich,

Thanks for the help!, I added the bootcode


--- Code: ---nodhcp

--- End code ---

into extlinux.conf and checked to make sure eth0.sh was executable (it was), and on reboot I got the following error;


--- Code: ---route: SIOCADDRT: No such process

--- End code ---

Maybe I'm using the wrong gateway address? But yet I think 172.16.1.0 is correct and that's what I'm using in eth0.sh.

A long time ago, you told me to do the following;


--- Code: ---ifconfig -a 2>&1 > network.txt
route 2>&1 >> network.txt

--- End code ---

This is what I did to find the IP address of my gateway (in Lubuntu), I've attached the outputs of those commands for both Lubuntu and just now this morning TC. And also attached again my eth0.sh script.

It's no big deal I suppose, all I need to do is remove the "nodhcp" bootcode and remove call to eth0.sh from bootlocal.sh and let dhcp give me 172.16.1.99 and at least I can ping google, but even with that dhcp assigned address, I tried to connect to the TC APP repository and it didn't work, so maybe still a problem there, even with that arrangement.

Thanks for the help, sorry for this hassle.

David

Rich:
Hi MTCAT

--- Quote from: MTCAT on February 03, 2026, 10:15:43 AM --- ... Maybe I'm using the wrong gateway address? But yet I think 172.16.1.0 is correct and that's what I'm using in eth0.sh. ...
--- End quote ---
I saw that in one of your previous posts, and it bothered me because
it didn't look right.

x.x.x.0 and x.x.x.255 are typically broadcast addresses.
Routers typically wind up at x.x.x.1.

Maybe try changing 172.16.1.0 to 172.16.1.1 in eth0.sh
You may also need to reconfigure your routers address to 172.16.1.1.

This was your eth0.sh from April 2021

--- Code: ---#!/bin/sh
pkill udhcpc
ifconfig eth0 10.0.0.40 netmask 255.255.255.0 broadcast 10.0.0.255 up
route add default gw 10.0.0.1
echo nameserver 10.0.0.1 > /etc/resolv.conf
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version