On Tue, Dec 2, 2008 at 7:04 AM, tiscali <[EMAIL PROTECTED]> wrote:

>
>
> In the meantime I found some other posts in the archive concerning --link.
> Maybe some of these guys found a solution?
> Possibly the rs232 signal has to be inverted? I am not using a inverting
> interface chip, as I am directly connecting the xport-module to to ds2480b
> (see the scm in first post) I have to point out, that the hardware was
> already working with the described windows setup.
>
>
I think the LINK guys use their much simpler ascii interface. The DS2480B
interface chip probably requires a more faithful serial emulation. I know
you found it works under Windows. I suspect that more effort and testing was
put into that platform.

Here is the serial port setting code for the DS2480B (which I don't truly
understand, but it is a modification of the PDkit code with contributions
and fixes over time):

    // Set to non-canonical mode, and no RTS/CTS handshaking
    newSerialTio.c_iflag &= ~(BRKINT | ICRNL | IGNCR | INLCR | INPCK |
ISTRIP | IXON | IXOFF | PARMRK);
    newSerialTio.c_iflag |= IGNBRK | IGNPAR;
    newSerialTio.c_oflag &= ~(OPOST);
    newSerialTio.c_cflag &= ~(CRTSCTS | CSIZE | HUPCL | PARENB);
    newSerialTio.c_cflag |= (CLOCAL | CS8 | CREAD);
    newSerialTio.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL | ICANON |
IEXTEN | ISIG);
    newSerialTio.c_cc[VMIN] = 0;
    newSerialTio.c_cc[VTIME] = 3;

On the other hand, you ARE getting some responses from the device based on
your transcript. The only tunable parameter is  flextime for the DS2480B.
I've added a command line parameter "--serial_flextime (the default) or
--serial_regulartime (which may work in your case).

I'll upload it as 2.7p10

The known working network'ed bus masters are:

LinkHubE (ascii protocol)
HA7Net (http interface)
Etherweather (only one prototype as far as I know)
owserver (using an embedded device like the NSLU2 or OpenWRT router)

here my tests and debug outputs:
>
> first I guessed that --LINK  could do the job,  The LinkE box probably uses
> the same xport module.
> but I don't know about the internals ...
>
I'm sure if you hooked up a LINK adapter (rather than DS2480B) it would work
(again untested). As --LINK=* /dev/mytty0 *since that initial "/" is the
trigger to use serial rather than tcp LINK protocol.


>
> *debian:/tmp/ttyredirector_sena-4.0.2# /opt/owfs/bin/owserver --foreground
> --error_level 9 --error_print 2 -p 3001 
> --LINK=**192.168.1.41:10001*<http://192.168.1.41:10001/>
>
> *   CALL: PARSENAME path=[]
> CONNECT: LinkE detect
> CONNECT: TIMEOUT after 1 bytes
> CONNECT: Cannot open LINK-HUB-E adapter at 
> **192.168.1.41:10001*<http://192.168.1.41:10001/>
> *  DEBUG: main_threadid = 3084142256*
>


> *
>   DEBUG: ServerProcessOut = 3083770768
>   DEBUG: OW_Announce: end
>   DEBUG: ServerProcessAccept 3001[3083770768] try lock 0
>   DEBUG: ServerProcessAccept 3001[3083770768] locked 0
> ^C  DEBUG: ServerProcess: break signo=2
>   DEBUG: ow_net_server.c:ServerProcess() shutdown initiated
>   DEBUG: Shutting down 0 of 1 thread -1211196528
>   DEBUG: ow_net_server.c:ServerProcess() shutdown done
>   DEBUG: ow_exit 0
>    CALL: Starting Library cleanup
>    CALL: Clear Cache
>    CALL: Closing input devices
>   DEBUG: FreeIn: busmode=16
>    CALL: Closing outout devices
>    CALL: Finished Library cleanup
>
> *here I am testing the virtual tty-port
> *********************************************************
>
> debian:/tmp/ttyredirector_sena-4.0.2# /usr/local/sbin/ttyredirectord
> --start
> debian:/tmp/ttyredirector_sena-4.0.2# trquery -tty ALL
> tty:        mytty0
> server:        **192.168.1.41* <http://192.168.1.41/>
> *port:        10001
> protocol:    telnet
> restore:    N
> speed:        9600
> auth:        none
> ptydelayclose:    0
>
> ********************************************************
> debian:/tmp/ttyredirector_sena-4.0.2# /opt/owfs/bin/owserver --foreground
> --timeout_network=60 --error_level 9 --error_print 2 -p 3001 -d /dev/mytty0
>
>
>    CALL: PARSENAME path=[]
> Byte buffer Attempt serial write:, length=2
> --000: E3 C5
>    <..>
> Byte buffer Serial read:, length=1
> --000: 26
>    <&>
> Byte buffer Attempt serial write:, length=1
> --000: C5
>    <.>
> Byte buffer Attempt serial write:, length=1
> --000: 45
>    <E>
> Byte buffer Serial read:, length=1
> --000: 44
>    <D>
> Byte buffer Attempt serial write:, length=1
> --000: 5B
>    <[>
> Byte buffer Serial read:, length=1
> --000: 5A
>    <Z>
> Byte buffer Attempt serial write:, length=1
> --000: 3F
>    <?>
> Byte buffer Serial read:, length=1
> --000: 3E
>    <>>
> Byte buffer Attempt serial write:, length=1
> --000: 29
>    <)>
> Byte buffer Serial read:, length=1
> --000: 28
>    <(>
> Byte buffer Attempt serial write:, length=1
> --000: 71
>    <q>
> Byte buffer Serial read:, length=1
> --000: 70
>    <p>
> Byte buffer Attempt serial write:, length=1
> --000: C5
>    <.>
> CONNECT: Select or timeout error serial port: /dev/mytty0
>  -> Success
> CONNECT: Cannot detect DS2480 or LINK interface on /dev/mytty0.
>   DEBUG: COM_close: flush
>   DEBUG: COM_close: restore
>   DEBUG: COM_close: close
>    CALL: PARSENAME path=[]
> Byte buffer Attempt serial write:, length=1
> --000: F0
>    <.>
> CONNECT: Select or timeout error serial port: /dev/mytty0
>  -> Success
>   DEBUG: main_threadid = 3084359344
>   DEBUG: ServerProcessOut = 3083987856
>   DEBUG: OW_Announce: end
>   DEBUG: ServerProcessAccept 3001[3083987856] try lock 0
>   DEBUG: ServerProcessAccept 3001[3083987856] locked 0
> ^C  DEBUG: ServerProcess: break signo=2
>   DEBUG: ow_net_server.c:ServerProcess() shutdown initiated
>   DEBUG: Shutting down 0 of 1 thread -1210979440
>   DEBUG: ow_net_server.c:ServerProcess() shutdown done
>   DEBUG: ow_exit 0
>    CALL: Starting Library cleanup
>    CALL: Clear Cache
>    CALL: Closing input devices
>   DEBUG: FreeIn: busmode=2
>   DEBUG: COM_close: flush
>   DEBUG: COM_close: restore
>   DEBUG: COM_close: close
>    CALL: Closing outout devices
>    CALL: Finished Library cleanup*
> **
>
>
> *rgds*
> *Beat*
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to