Hello Jan

I took some time to compile all stuff from CVS on my Pi but i tried the
test.

Same problem occurs, last char is corrupted

Thomas

pi@Pi1Wire /opt/owfs/bin $ ./owserver -V
> ./owserver version:
>         2.9p1
> libow version:
>         2.9p1


perl script:

#!/usr/bin/perl -w
> use OWNet;
> my $owserver = OWNet->new('localhost:4304 -v -C');
> $owserver->write("uncached/FF.7D0800000100/line16.0","Hello World");


debug info:

pi@Pi1Wire /opt/owfs/bin $ sudo ./owserver --foreground --error_level=9
> --error_print=2 --nozero --fake=FF.7D0800000100
>   DEBUG: ow_daemon.c:(166) main thread id = 3069669904
> CONNECT: ow_avahi_link.c:(68) No Avahi support. Library libavahi-client
> couldn't be loaded
> CONNECT: ow_dnssd.c:(82) Zeroconf/Bonjour is disabled since dnssd library
> isn't found
>    CALL: ow_parsename.c:(99) path=[]
>   DEBUG: owlib.c:(81) Globals temp limits 0C 100C (for simulated adapters)
> CONNECT: ow_fake.c:(176) Setting up fake Bus Master (0)
>   DEBUG: ow_tcp_read.c:(64) attempt 24 bytes Time: 10.000000 seconds
>   DEBUG: ow_tcp_read.c:(114) read: 24 - 0 = 24
>   DEBUG: from_client.c:(67) FromClient payload=45 size=11 type=3 sg=0x106
> offset=0
>   DEBUG: from_client.c:(75) FromClient (no servermessage) payload=45
> size=11 type=3 controlflags=0x106 offset=0
>   DEBUG: ow_tcp_read.c:(64) attempt 45 bytes Time: 10.000000 seconds
>   DEBUG: ow_tcp_read.c:(114) read: 45 - 0 = 45
>   DEBUG: handler.c:(73) Persistence requested
>   DEBUG: handler.c:(153) START handler uncached/FF.7D0800000100/line16.0
>    CALL: data.c:(104) DataHandler: parse
> path=uncached/FF.7D0800000100/line16.0
>   DEBUG: ow_parseobject.c:(164) uncached/FF.7D0800000100/line16.0
>    CALL: ow_parsename.c:(99) path=[uncached/FF.7D0800000100/line16.0]
>   DEBUG: ow_cache.c:(913) Looking for device FF 7D 08 00 00 01 00 2E
>   DEBUG: ow_cache.c:(1069) Search in cache sn FF 7D 08 00 00 01 00 2E
> pointer=0xb6f4ad74 index=0 size=4
>   DEBUG: ow_cache.c:(1105) Value not found in cache
>  DETAIL: ow_presence.c:(81) Checking presence of
> /uncached/FF.7D0800000100/line16.0
>   DEBUG: ow_cache.c:(854) Looking for directory FF 7D 08 00 00 01 00 2E
>   DEBUG: ow_cache.c:(867) Get from cache sn 00 00 00 00 00 00 00 00
> pointer=0xb6f4ad7c extension=0
>   DEBUG: ow_cache.c:(896) Dir not found in cache
>   DEBUG: ow_search.c:(32) Start of directory
> path=/uncached/FF.7D0800000100/line16.0 device=FF 7D 08 00 00 01 00 2E
>   DEBUG: ow_search.c:(74) Device found: FF 7D 08 00 00 01 00 2E
>   DEBUG: ow_cache.c:(547) Adding device location FF 7D 08 00 00 01 00 2E
> bus=0
>   DEBUG: ow_cache.c:(636) Add to cache sn FF 7D 08 00 00 01 00 2E
> pointer=0xb6f4ad74 index=0 size=4
>   DEBUG: ow_presence.c:(269) Presence of FF 7D 08 00 00 01 00 2E FOUND on
> bus fake.0
>   DEBUG: ow_cache.c:(547) Adding device location FF 7D 08 00 00 01 00 2E
> bus=0
>   DEBUG: ow_cache.c:(636) Add to cache sn FF 7D 08 00 00 01 00 2E
> pointer=0xb6f4ad74 index=0 size=4
>   DEBUG: ow_cache.c:(547) Adding device location FF 7D 08 00 00 01 00 2E
> bus=0
>   DEBUG: ow_cache.c:(636) Add to cache sn FF 7D 08 00 00 01 00 2E
> pointer=0xb6f4ad74 index=0 size=4
>    CALL: data.c:(150) Write message
>   DEBUG: write.c:(51) WriteHandler: hd->sm.payload=45 hd->sm.size=11
> hd->sm.offset=0 OWQ_size=11 OWQ_offset=0
> OWQ OneWireQuery structure of /uncached/FF.7D0800000100/line16.0
>     OneWireQuery size=11 offset=0, extension=0
> Byte buffer OneWireQuery buffer, length=11
> --000: 48 65 6C 6C 6F 20 57 6F 72 6C 00
>    <*Hello Worl.*>
>     Cleanup = 0002    OneWireQuery I=11 U=11 F=5.43472E-323 Y=11 D=Thu Jan
>  1 01:00:11 1970
> --- OneWireQuery done
>   DEBUG: ow_write.c:(111) Successful write to
> /uncached/FF.7D0800000100/line16.0
>   DEBUG: ow_parsename.c:(62) /uncached/FF.7D0800000100/line16.0
>   DEBUG: data.c:(194) DataHandler: FS_ParsedName_destroy done
>   DEBUG: data.c:(208) DataHandler: cm.ret=0
>   DEBUG: to_client.c:(67) payload=0 size=11, ret=0, sg=0x106 offset=0
>   DEBUG: data.c:(227) Finished with client request
>   DEBUG: handler.c:(132) OWSERVER tcp connection persistence -- reusing
> connection now.
>   DEBUG: ow_tcp_read.c:(64) attempt 24 bytes Time: 10.000000 seconds
>   DEBUG: ow_tcp_read.c:(114) read: 24 - 24 = 0
>   DEBUG: handler.c:(135) OWSERVER handler done
>   DEBUG: ow_net_server.c:(238) Normal exit.
> ^C  DEBUG: ow_exit.c:(38) Signal=2, errno 0, code 128, pid=0, Threads:
> this=3069669904 main=3069669904
>   DEBUG: ow_exit.c:(52) Kill signal from system
>   DEBUG: ow_exit.c:(59) Ignore kill from this thread. main=3069669904
> this=3069669904 Signal=2
>   DEBUG: owserver.c:(101) ServerProcess done
>   DEBUG: ow_exit.c:(18) Exit code = 0
>    CALL: ow_lib_close.c:(21) Starting Library cleanup
>    CALL: ow_lib_stop.c:(23) Clear Cache
>   DEBUG: ow_cache.c:(296) Flipping cache tree (purging timed-out data)
>   DEBUG: ow_cache.c:(314) flip cache. tdestroy() will be called.
>   DEBUG: ow_cache.c:(296) Flipping cache tree (purging timed-out data)
>   DEBUG: ow_cache.c:(314) flip cache. tdestroy() will be called.
>    CALL: ow_lib_stop.c:(25) Closing input devices
>    CALL: ow_lib_stop.c:(27) Closing output devices
>   DEBUG: ow_connect_out.c:(56) Freeing outbound (null) #0
>    CALL: ow_lib_close.c:(35) Finished Library cleanup
>   DEBUG: ow_lib_close.c:(43) Libraries closed




2013/6/28 Jan Kandziora [via OWFS Developers] <
[email protected]>

> Am 28.06.2013 15:40, schrieb Thomas Parvais:
> > Hello
> >
> > I tried on my Sheevaplug: (perl 5.10.0, owfs/libow 2.8p13), same problem
> > than on my Pi:
> >
> The diff in OWNet.pm between 2.8p13/2.8p15 and latest CVS is
>
> @@ -346,8 +346,8 @@
>                 $self->{SOCK} = undef ;
>         return ;
>         } ;
> -       $self->{ADDR} = $self->{SOCK}->peeraddr ;
> -       $self->{PORT} = $self->{SOCK}->peerport ;
> +       $self->{ADDR} = $self->{SOCK}->peeraddr || return ;
> +       $self->{PORT} = $self->{SOCK}->peerport || return ;
>         return 1 ;
>  }
>
> @@ -378,7 +378,7 @@
>         my $length_wanted = shift ;
>         return '' if $length_wanted == 0 ;
>
> -       my $fileno = $self->{SOCK}->fileno ;
> +       my $fileno = $self->{SOCK}->fileno  or return undef ;
>         my $selectreadbits = '' ;
>         vec($selectreadbits,$fileno,1) = 1 ;
>
> @@ -615,6 +615,7 @@
>         # new MSG_DIRALL method -- single packet
>
> _ToServer($self,$MSG_DIRALL,$DEFAULT_BLOCK_LENGTH,$NO_OFFSET,$path) ||
> return ;
>         my @r = _FromServer($self) ;
> +       return if !@r ;
>         if (@r) {
>                 $self->{SOCK} = undef if $self->{PERSIST} == 0 ;
>                 return $r[6] ;
>
>
> So at least OWNet should not be the culprit. Could you try with latest
> CVS on your PC? With --fake it will work without actual onewire hardware.
>
> Kind regards
>
>         Jan
>
>
>
> ------------------------------------------------------------------------------
>
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Owfs-developers mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=9763&i=0>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://owfs-developers.1086194.n5.nabble.com/Perl-script-to-control-Louis-Swart-LCD-tp9754p9763.html
>  To unsubscribe from Perl script to control Louis'Swart LCD, click 
> here<http://owfs-developers.1086194.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=9754&code=dHBhcnZhaXNAZ21haWwuY29tfDk3NTR8LTIwMTI2NzI5MTk=>
> .
> NAML<http://owfs-developers.1086194.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://owfs-developers.1086194.n5.nabble.com/Perl-script-to-control-Louis-Swart-LCD-tp9754p9764.html
Sent from the OWFS Developers mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to