Frank Tiger | 3 Oct 11:15 2010
Picon

Re: 1921 log/temperature.ALL empty when read via PHP

No ideas, anybody?

Some more observations:
The problem persists, even when

- using simulated hardware (... --fake=21 ...)
- Apache accesses the file directly

So it's not related to the hardware and not related to PHP. The
libfuse2 installed is V 2.8.1-1.1ubuntu2.

I can read the file via a SAMBA share from Windows using Notepad,
but I can't open it using OpenOffice's Calc.

My current workaround needs 70 seconds to read a history of 421
samples one by one, what makes it almost unusable.

Tiger

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
Der Tiger | 6 Oct 09:56 2010
Picon

[2.8p2] Fixing for Hobbyboards LCD module bug disabling buttons

Hi Paul,

Since at least 2.7p6 there has been a bug causing all three buttons of
the Hobbyboards LCD module (using a DS2408) to malfunction. This is due
to the fact, that the three lowest bits of the port register are set to
0 during initialization of the display module, turning the output
transistors on and by that taking the sensing voltage away from the
buttons. It is necessary to mask those bits as suggested in the patch below.

--- owfs-2.8p2/module/owlib/src/c/ow_2408-p2.c    2010-08-08
18:17:13.000000000 +0200
+++ owfs-2.8p2/module/owlib/src/c/ow_2408.c    2010-10-04
10:40:41.887816999 +0200
 <at>  <at>  -135,2 +141,3  <at>  <at> 
-#define NIBBLE_ONE(x)       ((x)&0xF0)
-#define NIBBLE_TWO(x)       (((x)<<4)&0xF0)
+#define LCD_BUTTON_MASK     0x07
+#define NIBBLE_ONE(x)       (((x)&0xF0)|LCD_BUTTON_MASK)
+#define NIBBLE_TWO(x)       ((((x)<<4)&0xF0)|LCD_BUTTON_MASK)
 <at>  <at>  -387 +392  <at>  <at> 
-    BYTE start[] = { LCD_COMMAND_ATTENTION, };
+  BYTE start[] = { NIBBLE_ONE(LCD_COMMAND_ATTENTION), };
 <at>  <at>  -389,3 +394,3  <at>  <at> 
-        LCD_COMMAND_ATTENTION,
-        LCD_COMMAND_ATTENTION,
-        LCD_COMMAND_4_BIT,
+    NIBBLE_ONE(LCD_COMMAND_ATTENTION),
+    NIBBLE_ONE(LCD_COMMAND_ATTENTION),
+    NIBBLE_ONE(LCD_COMMAND_4_BIT),

(Continue reading)

Paul Alfille | 6 Oct 13:06 2010
Picon

Re: [2.8p2] Fixing for Hobbyboards LCD module bug disabling buttons

This is great. Thank you.

On Wed, Oct 6, 2010 at 3:56 AM, Der Tiger <der.tiger.opt-ow <at> arcor.de> wrote:
> Hi Paul,
>
> Since at least 2.7p6 there has been a bug causing all three buttons of
> the Hobbyboards LCD module (using a DS2408) to malfunction. This is due
> to the fact, that the three lowest bits of the port register are set to
> 0 during initialization of the display module, turning the output
> transistors on and by that taking the sensing voltage away from the
> buttons. It is necessary to mask those bits as suggested in the patch below.
>
> --- owfs-2.8p2/module/owlib/src/c/ow_2408-p2.c    2010-08-08
> 18:17:13.000000000 +0200
> +++ owfs-2.8p2/module/owlib/src/c/ow_2408.c    2010-10-04
> 10:40:41.887816999 +0200
>  <at>  <at>  -135,2 +141,3  <at>  <at> 
> -#define NIBBLE_ONE(x)       ((x)&0xF0)
> -#define NIBBLE_TWO(x)       (((x)<<4)&0xF0)
> +#define LCD_BUTTON_MASK     0x07
> +#define NIBBLE_ONE(x)       (((x)&0xF0)|LCD_BUTTON_MASK)
> +#define NIBBLE_TWO(x)       ((((x)<<4)&0xF0)|LCD_BUTTON_MASK)
>  <at>  <at>  -387 +392  <at>  <at> 
> -    BYTE start[] = { LCD_COMMAND_ATTENTION, };
> +  BYTE start[] = { NIBBLE_ONE(LCD_COMMAND_ATTENTION), };
>  <at>  <at>  -389,3 +394,3  <at>  <at> 
> -        LCD_COMMAND_ATTENTION,
> -        LCD_COMMAND_ATTENTION,
> -        LCD_COMMAND_4_BIT,
> +    NIBBLE_ONE(LCD_COMMAND_ATTENTION),
(Continue reading)

Mick Sulley | 6 Oct 16:55 2010

DS18S20 reads 85

Hi,

I have a little test system on my desk, it has a DS9097U adapter, 2
DS18S20 sensors, 2 DS18B20 sensors and 2 DS2406 2 channel i/o units.  I
am using one channel of one of the DS2406 to switch a relay and I have
an external 5v supply for this.

I have a python program using pyowfs that just cycles through reading
the temperatures and alternately setting the output on or off.

If I have the 1 wire network in parasitic mode it all works fine,
however if I use the external power supply to feed the 1 wire as well,
which feels like the right thing to do, the 2 DS18S20 sensors return 85
all the time.

Any idea what could be causing this?

Thanks

Mick

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Michael Markstaller | 11 Oct 23:11 2010
Picon

DS2482-800

Hi,

might sound like a dumb question, but as I'm looking into using the
DS2482-800 only theoretical right now, without the HW being even
designed: 
- Is it supposed to be fully supported by owfs
- with Active/Strong pullup ? (for parasitic)
- any drawbacks on the 8 channels having to be sequentially
selected&polled, does alarming work with this?
- anybody with an active network willing to share some experiences, how
does it compare to DS2490 regarding bus-stability etc..

TIA, Michael

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Jim Kusznir | 12 Oct 19:53 2010
Picon

regression? python bad indent

Hi all:

We just did a clean install of the latest owfs from the sf website:
2.8p2, and it had the python indent problem.  I seem to recall that
was committed prior to the most recent announcement on patch level
release...perhaps its not out yet, but I thought I'd point out that
problem is still occurring.

--Jim

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Mauricio Culibrk | 14 Oct 10:05 2010
Picon

Problems with kernel w1-gpio

Hi!

I'm sorry for bothering but I'm starting pulling my hair on this problem I have...
I tried to search the mailing lists and elsewhere but I'm unable to find any relevant information...

The goal is to make owfs work with the kernel w1-gpio-master driver.

I'm trying to setup the owfs on an embedded board - really a "router" - netgear wgt634u - a mips (LE) based machine using the kernel w1-gpio master driver and a spare gpio pin.
The software (os) used is OpenWrt trunk r23070 (build from scratch) with kernel 2.6.34.5.

Linux WGT634U 2.6.34.5 #1 Wed Oct 13 16:10:34 CEST 2010 mips GNU/Linux

The W1 subsystem is actually working good.
After loading all the required modules:
fuse                   49168  0
w1_gpio                  752  0
w1_gpio_custom           864  0
wire                   17584  1 w1_gpio
cn                      4336  1 wire
nfnetlink               1712  0

Netfilter messages via NETLINK v0.30.
Driver for 1-wire Dallas network protocol.
Custom GPIO-based W1 driver version 0.1.1
w1_master_driver w1 bus master: Family 10 for 10.00080198f8e6.d8 is not registered.
 
I can see the w1 bus and the attached DS18S20 slave:

root <at> WGT634U:~# ls /sys/bus/w1/
devices            drivers            drivers_autoprobe  drivers_probe      uevent

root <at> WGT634U:~# ls /sys/bus/w1/devices/
10-00080198f8e6  w1 bus master

If I also load the kernel w1-thermal driver I can see the w1 system is actually working as expected. I can read the temperature from the sensor:

root <at> WGT634U:~# ls /sys/bus/w1/devices/10-00080198f8e6/
driver     id         name       subsystem  uevent     w1_slave

root <at> WGT634U:~# cat /sys/bus/w1/devices/10-00080198f8e6/w1_slave
30 00 4b 46 ff ff 09 10 12 : crc=12 YES
30 00 4b 46 ff ff 09 10 12 t=24187

Other than for testing the kernel w1-slave-thermal driver is not loaded, just the w1-gpio master driver is.

I'm using the latest owfs sources:
root <at> WGT634U:~# owfs -V
owfs version:
        2.8p2
libow version:
        2.8p2

So, to the problem!
I'm unable to make owfs/owserver/owhttps to "work/talk" with the w1 kernel driver.
After starting the owfs/owserver it "hungs" for some reason. Here is the debug output:

root <at> WGT634U:~# owserver --w1 --debug -p 4000
   CALL: ow_parsename.c:FS_ParsedName_anywhere(90) path=[]
  DEBUG: owlib.c:SetupTemperatureLimits(79) Globals temp limits 0C 100C (for simulated adapters)
  DEBUG: owserver.c:main(152) main_threadid = 715849728
  DEBUG: ow_w1_list.c:w1_list_masters(54) Sending w1 bus master list message
  DEBUG: ow_w1_send.c:W1_send_msg(119) Netlink send -----------------
NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=880
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0
W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0
Byte buffer Data, length=0
   <>
  DEBUG: ow_w1_dispatch.c:W1_Dispatch(125) Dispatch loop
  DEBUG: ow_w1_parse.c:Netlink_Parse_Get(114) Wait to peek at message
  DEBUG: ow_w1_parse.c:Netlink_Parse_Get(122) Pre-parse header: 16 bytes len=52 type=3 seq=0|1 pid=0
  DEBUG: ow_w1_parse.c:Netlink_Parse_Get(144) Netlink read -----------------
NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=0 len=16 flags=0
W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=4 id=65544
Byte buffer Data, length=4
--000: 01 00 00CONNECT: ow_zero.c:ZeroConf_Announce(144) Zeroconf and/or Multithreading are not enabled
 00
   <....>
  DEBUG: ow_w1_dispatch.c:Dispatch_Packet(92) Sending this packet to root bus
  DEBUG: ow_w1_dispatch.c:W1_Dispatch(125) Dispatch loop
  DEBUG: ow_w1_parse.c:Netlink_Parse_Get(114) Wait to peek at message
  DEBUG: ow_w1_list.c:w1_parse_master_list(64) W1 List 1 masters
  DEBUG: ow_w1_parse.c:Netlink_Parse_Get(122) Pre-parse header: 16 bytes len=48 type=3 seq=0|1 pid=0

It seems to me the owfs is somehow having problems communicating with the kernel w1 driver.
I have no more ideas on what to try/what to check.
Well, I'm really new to the owfs stuff but otherwise I have quite some experience with OpenWrt, kernel modules/programming, 1-wire etc.
I took me some tries to figure out the OpenWrt W1 modules makefiles are "broken" for proper support of the w1 kernel driver... it's missing the "connector" suport by default.
I tried to compile the kernel & w1 modules "by hand" and to set all the required options but the results were the same - no fun.

I did not have time to test this identical setup on another platforms (mipe BE (atheros) boards, ixp425 boards, sheevaplugs). Also, I have not tried some i2c/usb/serial w1-masters as I not have them handy right now (basicaly just to test owfs is working) - but I really need it to work with the kernel w1-gpio driver...

As far as I checked, owfs should work with the w1-gpio as I found quite a lot of information about that, well, reference to other problems but the "core" owfs <--> kernel-w1-gpio seems to be working/supported.

Any suggestion/information would be more than welcome.

Best regards,
M.Culibrk

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Gregg Levine | 14 Oct 11:20 2010
Picon

Re: Problems with kernel w1-gpio

On Thu, Oct 14, 2010 at 4:05 AM, Mauricio Culibrk <mauricio <at> infohit.si> wrote:
> Hi!
>
> I'm sorry for bothering but I'm starting pulling my hair on this problem I
> have...
> I tried to search the mailing lists and elsewhere but I'm unable to find any
> relevant information...
>
> The goal is to make owfs work with the kernel w1-gpio-master driver.
>
> I'm trying to setup the owfs on an embedded board - really a "router" -
> netgear wgt634u - a mips (LE) based machine using the kernel w1-gpio master
> driver and a spare gpio pin.
> The software (os) used is OpenWrt trunk r23070 (build from scratch) with
> kernel 2.6.34.5.
>
> Linux WGT634U 2.6.34.5 #1 Wed Oct 13 16:10:34 CEST 2010 mips GNU/Linux
>
> The W1 subsystem is actually working good.
> After loading all the required modules:
> fuse                   49168  0
> w1_gpio                  752  0
> w1_gpio_custom           864  0
> wire                   17584  1 w1_gpio
> cn                      4336  1 wire
> nfnetlink               1712  0
>
> Netfilter messages via NETLINK v0.30.
> Driver for 1-wire Dallas network protocol.
> Custom GPIO-based W1 driver version 0.1.1
> w1_master_driver w1 bus master: Family 10 for 10.00080198f8e6.d8 is not
> registered.
>
> I can see the w1 bus and the attached DS18S20 slave:
>
> root <at> WGT634U:~# ls /sys/bus/w1/
> devices            drivers            drivers_autoprobe  drivers_probe
> uevent
>
> root <at> WGT634U:~# ls /sys/bus/w1/devices/
> 10-00080198f8e6  w1 bus master
>
> If I also load the kernel w1-thermal driver I can see the w1 system is
> actually working as expected. I can read the temperature from the sensor:
>
> root <at> WGT634U:~# ls /sys/bus/w1/devices/10-00080198f8e6/
> driver     id         name       subsystem  uevent     w1_slave
>
> root <at> WGT634U:~# cat /sys/bus/w1/devices/10-00080198f8e6/w1_slave
> 30 00 4b 46 ff ff 09 10 12 : crc=12 YES
> 30 00 4b 46 ff ff 09 10 12 t=24187
>
> Other than for testing the kernel w1-slave-thermal driver is not loaded,
> just the w1-gpio master driver is.
>
> I'm using the latest owfs sources:
> root <at> WGT634U:~# owfs -V
> owfs version:
>         2.8p2
> libow version:
>         2.8p2
>
> So, to the problem!
> I'm unable to make owfs/owserver/owhttps to "work/talk" with the w1 kernel
> driver.
> After starting the owfs/owserver it "hungs" for some reason. Here is the
> debug output:
>
> root <at> WGT634U:~# owserver --w1 --debug -p 4000
>    CALL: ow_parsename.c:FS_ParsedName_anywhere(90) path=[]
>   DEBUG: owlib.c:SetupTemperatureLimits(79) Globals temp limits 0C 100C (for
> simulated adapters)
>   DEBUG: owserver.c:main(152) main_threadid = 715849728
>   DEBUG: ow_w1_list.c:w1_list_masters(54) Sending w1 bus master list message
>   DEBUG: ow_w1_send.c:W1_send_msg(119) Netlink send -----------------
> NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=880
> CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0
> W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0
> Byte buffer Data, length=0
>    <>
>   DEBUG: ow_w1_dispatch.c:W1_Dispatch(125) Dispatch loop
>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(114) Wait to peek at message
>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(122) Pre-parse header: 16 bytes
> len=52 type=3 seq=0|1 pid=0
>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(144) Netlink read -----------------
> NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0
> CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=0 len=16 flags=0
> W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=4 id=65544
> Byte buffer Data, length=4
> --000: 01 00 00CONNECT: ow_zero.c:ZeroConf_Announce(144) Zeroconf and/or
> Multithreading are not enabled
>  00
>    <....>
>   DEBUG: ow_w1_dispatch.c:Dispatch_Packet(92) Sending this packet to root
> bus
>   DEBUG: ow_w1_dispatch.c:W1_Dispatch(125) Dispatch loop
>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(114) Wait to peek at message
>   DEBUG: ow_w1_list.c:w1_parse_master_list(64) W1 List 1 masters
>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(122) Pre-parse header: 16 bytes
> len=48 type=3 seq=0|1 pid=0
>
> It seems to me the owfs is somehow having problems communicating with the
> kernel w1 driver.
> I have no more ideas on what to try/what to check.
> Well, I'm really new to the owfs stuff but otherwise I have quite some
> experience with OpenWrt, kernel modules/programming, 1-wire etc.
> I took me some tries to figure out the OpenWrt W1 modules makefiles are
> "broken" for proper support of the w1 kernel driver... it's missing the
> "connector" suport by default.
> I tried to compile the kernel & w1 modules "by hand" and to set all the
> required options but the results were the same - no fun.
>
> I did not have time to test this identical setup on another platforms (mipe
> BE (atheros) boards, ixp425 boards, sheevaplugs). Also, I have not tried
> some i2c/usb/serial w1-masters as I not have them handy right now (basicaly
> just to test owfs is working) - but I really need it to work with the kernel
> w1-gpio driver...
>
> As far as I checked, owfs should work with the w1-gpio as I found quite a
> lot of information about that, well, reference to other problems but the
> "core" owfs <--> kernel-w1-gpio seems to be working/supported.
>
> Any suggestion/information would be more than welcome.
>
> Best regards,
> M.Culibrk
> ------------------------------------------------------------------------------

Hello!
Actually you're heading the right direction completly. Why not post
someplace your build steps. Such as how you created that run of
"OpenWrt trunk r23070", and then the methods to compile it. Finally
how you installed onto your router. Also was the router properly
reinitialized after the whole steps.

Also did you test the One-Wire hardware elsewhere first? Then on the
router, and finally back again. List what happened when you tried to
use the One-Wire hardware to sense room temperature via your Linux
system.

Also list what distribution you used for that.

And no you did not bother us.
-----
Gregg C Levine gregg.drwho8 <at> gmail.com
"This signature fought the Time Wars, time and again."

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Mauricio Culibrk | 14 Oct 12:02 2010
Picon

Re: Problems with kernel w1-gpio



On 10/14/2010 11:20 AM, Gregg Levine wrote:
Hello!
Actually you're heading the right direction completly. Why not post someplace your build steps. Such as how you created that run of "OpenWrt trunk r23070", and then the methods to compile it. Finally how you installed onto your router. Also was the router properly reinitialized after the whole steps.
Well... I thought all this could be "too-much unrelated/bloating" but if you wish so...

In short:
- I did a fresh svn checkout of OpenWrt (svn co svn://svn.openwrt.org/trunk) few weeks ago - the revision atht he time was 23070
- the whole openwrt is compiled using binutils 2.19.1 and gcc 4.3.3 (with CodeSourcery enhancements)
- after the build phase completed the generated flash image was written to the router by tftp (from CFE)
- the router as such is working just fine with the built OpenWrt, network, web, wireless... all is working OK
- after attaching the "one-wire hardware" (actually just a DS18S20 hooked to a free gpio pin (gpio 7, tp1 on the board) and a pull-up resistor of 3K3 ohms. The DS18S20 is directly powered (not using parasitic power)
- I installed the one-wire related kernel modules (and owfs) software (as I listed in the original mail)
- for all tests the platform was "freshly" rebooted
Also did you test the One-Wire hardware elsewhere first? Then on the router, and finally back again. List what happened when you tried to use the One-Wire hardware to sense room temperature via your Linux system.
As I mentioned in my email, I can use/read the W1-slave (the ds18s20) using the kernel supplied drivers - the w1-slave-thermal driver.

The w1 subsystem (gpio master, communication, ds18s20 slave) is working correctly.
I can read the temperature from the sensor by reading the /sys/bus/w1/devices/10-<id>/w1_slave virtual file (provided by the w1-slave-thermal driver)

So, to respond to your question, I did not (just yet) tested the "w1-hardware" elsewhere as the "hardware" is actually working!

And, using the one-wire HW from the openwrt system loaded on the wgt634u, works if using the kernel w1 slave driver for thermal sensors.
doing a cat /sys/bus/w1/devices/10-00080198f8e6/w1_slave I get:
31 00 4b 46 ff ff 08 10 95 : crc=95 YES
31 00 4b 46 ff ff 08 10 95 t=24250

which is the temperature the sensor reads (24,25° C)

Also list what distribution you used for that.
As mentioned, the distribution used is OpenWrt with kernel 2.6.34.5, owfs 2.8p2, gcc+cs 4.3.3

As far as I can tell there is some sort of "problem" with the netlink communication between the owfs library and the kernel w1 driver


Kind regardsm
M.Culibrk

And no you did not bother us. ----- Gregg C Levine gregg.drwho8 <at> gmail.com "This signature fought the Time Wars, time and again." ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Owfs-developers mailing list Owfs-developers <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Iztok Jeras | 14 Oct 12:06 2010
Picon

Re: Problems with kernel w1-gpio

wouldn't it be easier to use an UART and an UART to 1-wire conversion chip?

Regards,
Iztok

On Thu, Oct 14, 2010 at 11:20 AM, Gregg Levine <gregg.drwho8 <at> gmail.com> wrote:
> On Thu, Oct 14, 2010 at 4:05 AM, Mauricio Culibrk <mauricio <at> infohit.si> wrote:
>> Hi!
>>
>> I'm sorry for bothering but I'm starting pulling my hair on this problem I
>> have...
>> I tried to search the mailing lists and elsewhere but I'm unable to find any
>> relevant information...
>>
>> The goal is to make owfs work with the kernel w1-gpio-master driver.
>>
>> I'm trying to setup the owfs on an embedded board - really a "router" -
>> netgear wgt634u - a mips (LE) based machine using the kernel w1-gpio master
>> driver and a spare gpio pin.
>> The software (os) used is OpenWrt trunk r23070 (build from scratch) with
>> kernel 2.6.34.5.
>>
>> Linux WGT634U 2.6.34.5 #1 Wed Oct 13 16:10:34 CEST 2010 mips GNU/Linux
>>
>> The W1 subsystem is actually working good.
>> After loading all the required modules:
>> fuse                   49168  0
>> w1_gpio                  752  0
>> w1_gpio_custom           864  0
>> wire                   17584  1 w1_gpio
>> cn                      4336  1 wire
>> nfnetlink               1712  0
>>
>> Netfilter messages via NETLINK v0.30.
>> Driver for 1-wire Dallas network protocol.
>> Custom GPIO-based W1 driver version 0.1.1
>> w1_master_driver w1 bus master: Family 10 for 10.00080198f8e6.d8 is not
>> registered.
>>
>> I can see the w1 bus and the attached DS18S20 slave:
>>
>> root <at> WGT634U:~# ls /sys/bus/w1/
>> devices            drivers            drivers_autoprobe  drivers_probe
>> uevent
>>
>> root <at> WGT634U:~# ls /sys/bus/w1/devices/
>> 10-00080198f8e6  w1 bus master
>>
>> If I also load the kernel w1-thermal driver I can see the w1 system is
>> actually working as expected. I can read the temperature from the sensor:
>>
>> root <at> WGT634U:~# ls /sys/bus/w1/devices/10-00080198f8e6/
>> driver     id         name       subsystem  uevent     w1_slave
>>
>> root <at> WGT634U:~# cat /sys/bus/w1/devices/10-00080198f8e6/w1_slave
>> 30 00 4b 46 ff ff 09 10 12 : crc=12 YES
>> 30 00 4b 46 ff ff 09 10 12 t=24187
>>
>> Other than for testing the kernel w1-slave-thermal driver is not loaded,
>> just the w1-gpio master driver is.
>>
>> I'm using the latest owfs sources:
>> root <at> WGT634U:~# owfs -V
>> owfs version:
>>         2.8p2
>> libow version:
>>         2.8p2
>>
>> So, to the problem!
>> I'm unable to make owfs/owserver/owhttps to "work/talk" with the w1 kernel
>> driver.
>> After starting the owfs/owserver it "hungs" for some reason. Here is the
>> debug output:
>>
>> root <at> WGT634U:~# owserver --w1 --debug -p 4000
>>    CALL: ow_parsename.c:FS_ParsedName_anywhere(90) path=[]
>>   DEBUG: owlib.c:SetupTemperatureLimits(79) Globals temp limits 0C 100C (for
>> simulated adapters)
>>   DEBUG: owserver.c:main(152) main_threadid = 715849728
>>   DEBUG: ow_w1_list.c:w1_list_masters(54) Sending w1 bus master list message
>>   DEBUG: ow_w1_send.c:W1_send_msg(119) Netlink send -----------------
>> NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=880
>> CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0
>> W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0
>> Byte buffer Data, length=0
>>    <>
>>   DEBUG: ow_w1_dispatch.c:W1_Dispatch(125) Dispatch loop
>>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(114) Wait to peek at message
>>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(122) Pre-parse header: 16 bytes
>> len=52 type=3 seq=0|1 pid=0
>>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(144) Netlink read -----------------
>> NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0
>> CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=0 len=16 flags=0
>> W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=4 id=65544
>> Byte buffer Data, length=4
>> --000: 01 00 00CONNECT: ow_zero.c:ZeroConf_Announce(144) Zeroconf and/or
>> Multithreading are not enabled
>>  00
>>    <....>
>>   DEBUG: ow_w1_dispatch.c:Dispatch_Packet(92) Sending this packet to root
>> bus
>>   DEBUG: ow_w1_dispatch.c:W1_Dispatch(125) Dispatch loop
>>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(114) Wait to peek at message
>>   DEBUG: ow_w1_list.c:w1_parse_master_list(64) W1 List 1 masters
>>   DEBUG: ow_w1_parse.c:Netlink_Parse_Get(122) Pre-parse header: 16 bytes
>> len=48 type=3 seq=0|1 pid=0
>>
>> It seems to me the owfs is somehow having problems communicating with the
>> kernel w1 driver.
>> I have no more ideas on what to try/what to check.
>> Well, I'm really new to the owfs stuff but otherwise I have quite some
>> experience with OpenWrt, kernel modules/programming, 1-wire etc.
>> I took me some tries to figure out the OpenWrt W1 modules makefiles are
>> "broken" for proper support of the w1 kernel driver... it's missing the
>> "connector" suport by default.
>> I tried to compile the kernel & w1 modules "by hand" and to set all the
>> required options but the results were the same - no fun.
>>
>> I did not have time to test this identical setup on another platforms (mipe
>> BE (atheros) boards, ixp425 boards, sheevaplugs). Also, I have not tried
>> some i2c/usb/serial w1-masters as I not have them handy right now (basicaly
>> just to test owfs is working) - but I really need it to work with the kernel
>> w1-gpio driver...
>>
>> As far as I checked, owfs should work with the w1-gpio as I found quite a
>> lot of information about that, well, reference to other problems but the
>> "core" owfs <--> kernel-w1-gpio seems to be working/supported.
>>
>> Any suggestion/information would be more than welcome.
>>
>> Best regards,
>> M.Culibrk
>> ------------------------------------------------------------------------------
>
> Hello!
> Actually you're heading the right direction completly. Why not post
> someplace your build steps. Such as how you created that run of
> "OpenWrt trunk r23070", and then the methods to compile it. Finally
> how you installed onto your router. Also was the router properly
> reinitialized after the whole steps.
>
> Also did you test the One-Wire hardware elsewhere first? Then on the
> router, and finally back again. List what happened when you tried to
> use the One-Wire hardware to sense room temperature via your Linux
> system.
>
> Also list what distribution you used for that.
>
> And no you did not bother us.
> -----
> Gregg C Levine gregg.drwho8 <at> gmail.com
> "This signature fought the Time Wars, time and again."
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Gmane