WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Building Another Logger  (Read 1898 times)

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #15 on: February 02, 2026, 04:57:39 PM »
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

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #16 on: February 02, 2026, 05:01:02 PM »
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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12561
Re: Building Another Logger
« Reply #17 on: February 02, 2026, 05:21:16 PM »
Hi MTCAT
If you want to set your IP address manually, add this boot code:
Code: [Select]
nodhcp
Create this file  /opt/eth0.sh
Code: [Select]
#!/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

Make it executable:
Code: [Select]
chmod 755 /opt/eth0.sh
and add
Code: [Select]
/opt/eth0.shto bootlocal.sh.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #18 on: February 03, 2026, 10:15:43 AM »
Hi Rich,

Thanks for the help!, I added the bootcode

Code: [Select]
nodhcp

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

Code: [Select]
route: SIOCADDRT: No such process

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: [Select]
ifconfig -a 2>&1 > network.txt
route 2>&1 >> network.txt

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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12561
Re: Building Another Logger
« Reply #19 on: February 03, 2026, 10:49:16 AM »
Hi MTCAT
... 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. ...
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: [Select]
#!/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

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #20 on: February 03, 2026, 10:59:09 AM »
Hi Rich,

Thanks a lot, here's the output from Lubuntu inside the window manager clicking on "connections", does this show that my router address is actually 172.16.1.254?, that's kind of interesting because the TC Network app also wanted to use that for the Gateway but I changed it to what I thought was correct (172.16.1.0).

I guess I'll try 172.16.1.254 for the gateway IP address?, also, on my Windows box, output of ipconfig indicates default gateway as 172.16.1.254.



Thanks,

David
« Last Edit: February 03, 2026, 11:01:07 AM by MTCAT »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12561
Re: Building Another Logger
« Reply #21 on: February 03, 2026, 11:23:33 AM »
Hi MTCAT
That makes a lot more sense.

... I saw that in one of your previous posts, and it bothered me because
it didn't look right. ...
Guess I should have paid closer attention to my suspicion.  ::)

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #22 on: February 03, 2026, 11:26:02 AM »
Hi Rich,

Using 172.16.1.254 for the gateway and nameserver inside eth0.sh worked in the sense that I can ping Google now, but when I try to connect to the repository I get an error as shown in the attached screen-shot, sorry I must be forgetting a needed step in order to access the repository, I'm hoping "tio" is available for my version!

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12561
Re: Building Another Logger
« Reply #23 on: February 03, 2026, 11:34:23 AM »
Hi MTCAT
Make sure you changed all the 172.16.1.0 to 172.16.1.254 in eth0.sh.
Then reboot.
I see  172.16.1.0  still showing in the route command.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #24 on: February 03, 2026, 11:43:18 AM »
Hi Rich,

Sorry for this hassle.

I've attached my new eth0.sh here, and also a screenshot of output of;

Code: [Select]
route -n

Is it normal or correct to have two entries for eth0? Now I don't know where this old entry of 172.16.1.0 is coming from.

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #25 on: February 03, 2026, 11:54:45 AM »
Hi Rich,

Forgot to add, I did reboot but I still see the same two-line output for eth0 from

Code: [Select]
route -n

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #26 on: February 03, 2026, 12:14:01 PM »
Hi Rich,

Here is the output of

Code: [Select]
route -n

from Lubuntu, in which the network connection is okay, can surf the web in Firefox. Seems to be the same as TC except Lubuntu doesn't show the "loopback" entry and the other two lines in TC are in the opposite order as seen in Lubuntu.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12561
Re: Building Another Logger
« Reply #27 on: February 03, 2026, 08:22:40 PM »
Hi MTCAT
... Is it normal or correct to have two entries for eth0? Now I don't know where this old entry of 172.16.1.0 is coming from. ...
It seems it is. I just checked several of my machines, and they all display:
Code: [Select]
tc@E310:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
127.0.0.1       0.0.0.0         255.255.255.255 UH    0      0        0 lo
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
tc@E310:~$
This was for TC10 x86. TC14 x86_64 and TC16 x86_64 were identical.

Your route result appears to be in a different order. I don't know if that's
significant. What happens if you do this:
Code: [Select]
sudo ifconfig eth0 down
sudo /opt/eth0.sh
route -n
See if Apps can now connect.

If not, try changing eth0.sh to this:
Code: [Select]
#!/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.254
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 172.16.1.254 >> /etc/resolv.conf

Instead of attaching images, redirect output from commands
into a file like this:
Code: [Select]
route -n > route.txtThen you can copy/paste from a file into a post between code tags.

Attached images occupy much more space on the server than text.
Even when displayed inline, text can't be searched for when in an image.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #28 on: February 04, 2026, 02:17:40 PM »
Hi Rich,

Thanks for the help, I'll cut down on the images.

Without any modifications to eth0.sh, I did
Code: [Select]
sudo ifconfig eth0 down
sudo /opt/eth0.sh
route -n > route.txt

After doing this I could ping Google but still could not connect to TinyCore repo.

Then I shut down eth0

Code: [Select]
sudo ifconfig eth0 down

And modified eth0.sh as you instructed, followed by

Code: [Select]
sudo /opt/eth0.sh
route -n > routev2.txt

Once again, I could ping Google but could still not connect to TinyCore repo.

Thanks,

David


Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 408
Re: Building Another Logger
« Reply #29 on: February 04, 2026, 02:21:02 PM »
Sorry, forgot to attach the text files to previous post, attached them here and can see below (hopefully).

Here's route.txt;

Code: [Select]
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.1       0.0.0.0         255.255.255.255 UH    0      0        0 lo
172.16.1.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         172.16.1.254    0.0.0.0         UG    0      0        0 eth0

And here's routev2.txt;

Code: [Select]
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.1       0.0.0.0         255.255.255.255 UH    0      0        0 lo
172.16.1.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         172.16.1.254    0.0.0.0         UG    0      0        0 eth0