WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: w1-gpio not working on Pi Zero W  (Read 3377 times)

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
w1-gpio not working on Pi Zero W
« on: June 11, 2017, 05:17:41 PM »
I added dtoverlay=w1-gpio to the end of /mnt/mmcblk0p1/config.txt (in the [ALL] section), then I installed w1-4.9.22-piCore.tcz, added it to /mnt/mmcblk0p2/tce/onboot.lst, ran filetool.sh -b and rebooted.

However:

tc@box:~$ sudo modprobe w1-gpio
modprobe: can't load module wire (kernel.tclocal/drivers/w1/wire.ko): unknown symbol in module, or unknown parameter

Is it broken, or have I don't something wrong?

Thanks,
Rob.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14824
Re: w1-gpio not working on Pi Zero W
« Reply #1 on: June 12, 2017, 03:13:34 AM »
modprobe: can't load module wire (kernel.tclocal/drivers/w1/wire.ko): unknown symbol in module, or unknown parameter

That message means that wire.ko is missing a kernel module on which it depends.

Look at the output of "modinfo wire" to find out which other modules it requires.

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
Re: w1-gpio not working on Pi Zero W
« Reply #2 on: June 12, 2017, 07:24:56 AM »
Seems it needs module "cn", but I can't find a package that has that in it.  Help...

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
Re: w1-gpio not working on Pi Zero W
« Reply #3 on: June 12, 2017, 08:15:24 AM »
I think the "w1-4.9.22-piCore" package ought to include the "lib/modules/4.9.22-piCore/kernel/drivers/connector/cn.ko" file from http://tinycorelinux.net/9.x/armv6/releases/RPi/src/kernel/4.9.22-piCore_modules.tar.xz

Next to work out how to make that so.

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
Re: w1-gpio not working on Pi Zero W
« Reply #4 on: June 12, 2017, 11:46:12 AM »
OK, I made it work by the following steps (performed in Ubuntu):
(Note: I have a "pi" entry in my .ssh/config and I've installed my public key to the pi so that I can scp and ssh to it without username/password)

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
Re: w1-gpio not working on Pi Zero W
« Reply #5 on: June 12, 2017, 11:53:50 AM »
Step 14 should have been "sudo exitcheck.sh reboot" (I'm learning...)

Offline polikuo

  • Hero Member
  • *****
  • Posts: 740
Re: w1-gpio not working on Pi Zero W
« Reply #6 on: June 12, 2017, 12:42:11 PM »
tar -xz -xvf ../../../4.9.22-piCore_modules.tar.xz lib/modules/4.9.22-piCore/kernel/drivers/connector/cn.ko

Weird  ???
I believe to untar a *.tar.xz file, one should do
Code: [Select]
tar Jxf file.tar.xz

BTW, each option of tar has a meaning.
-  in linux, the dash usually starts at the beginning of the options. (However, for tar command, it can be omitted)
x  extract the file
c  compress files
z  extract/compress files by gzip
j  bzip2
J  any thing hat has xz in it
v  verbose output

I've heard that modern tar recognizes the format by itself.  :o
Not sure if that's the case for "busybox tar" (default for TC).

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
Re: w1-gpio not working on Pi Zero W
« Reply #7 on: June 12, 2017, 04:27:50 PM »
Oops, sorry - typo: I meant to type "tar --xz -tvf ..." 

"--xz" is equivalent to "-J", so your "tar Jxf ..." is the neater option.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: w1-gpio not working on Pi Zero W
« Reply #8 on: June 12, 2017, 05:48:09 PM »
Seems it needs module "cn", but I can't find a package that has that in it.  Help...

Update to 9.0.1

http://forum.tinycorelinux.net/index.php/topic,21141.0.html
« Last Edit: June 12, 2017, 05:52:46 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: w1-gpio not working on Pi Zero W
« Reply #9 on: June 12, 2017, 05:49:25 PM »
I've heard that modern tar recognizes the format by itself.  :o
Not sure if that's the case for "busybox tar" (default for TC).

Code: [Select]
tar xf file.tar.xz
works for BusyBox
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline DrRob

  • Jr. Member
  • **
  • Posts: 60
Re: w1-gpio not working on Pi Zero W
« Reply #10 on: June 13, 2017, 03:43:35 PM »
Update to 9.0.1

That's odd, I was already using 9.0.1, downloaded on June 11th, but now I see that 9.0.1 was released on June 12th, and the zipfile is different to the one I already had.  I think I must have slipped into a parallel universe for a while there...  :o

Thanks for the update.

Rob.