linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2020-09-03 17:36 Barnett, Andy
  2020-09-18  7:56 ` your mail Johan Hovold
  0 siblings, 1 reply; 7+ messages in thread
From: Barnett, Andy @ 2020-09-03 17:36 UTC (permalink / raw)
  To: linux-serial

Title - Edgport/4 compatibility question

Hello there - I am trying to get some legacy EdgePort/4 and 8 devices to work on Linux using Raspberry Pi OS.

I notice in the kernel. org notes, compatibility with Edgeport seems to be a good possibility.
In dmesg I get "usbserial: USB Serial support registered for Edgeport TI 1 port adapter" but no corresponding ttyUSB0-3 being set up.

I also tried adding a folder into lib/firmware called "edgeport" with some firmware I found online but I get multiple "Cannot send clear loopback command" messages in dmesg.  This did seem to create ttyUSBs 0-3 but I could not use these devices.

I do not have any problems connecting with a few Keyspan USA-49W devices (which are also referenced in the Compatibility section in the notes) so I think my machine is good.

Apologies in advance - I am not in anyway a Linux expert.

Any guidance or tips would be appreciated!

Thanks
Andy

Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <20191026192359.27687-1-frank-w@public-files.de>]
* (unknown)
@ 2004-08-24  6:05 Francisco M. Marzoa Alonso
  2004-08-24  9:39 ` your mail Jan-Benedict Glaw
  0 siblings, 1 reply; 7+ messages in thread
From: Francisco M. Marzoa Alonso @ 2004-08-24  6:05 UTC (permalink / raw)
  To: linux-serial

>>       TOut.tv_sec = Wait / 1000;
>>       TOut.tv_usec = Wait % 1000;
>
>So "Wait" is in milli-seconds? That doesn't look correct, then:)
>
>        TOut.tv_sec = Wait / 1000;
>        TOut.tv_usec = (Wait % 1000) * 1000;

Sure you're right, but this is a thing that I do not understand. I made a 
function GetTickCount to emulate Window's one based on gettimeofday and see 
that milliseconds on timeval structure can have values up to 999999 when I 
expect to found a maximum value of 999 as there are only 1000 milliseconds in 
a second.

>>       if ( select ( FD_SETSIZE, &readfs, NULL, NULL, &TOut ) ) {

>That's most probably wrong. "FD_SETSIZE" should be "HND + 1". ...and the
>"if" should fire like "if (select (...) > 0)"

Ok, I've tried some different values, I'll use only HND+1 from now.

>This could hand because you didn't select() on HND *before* writing to
>it.

You're right. I've fixed this. 

>>       if ( ! select ( FD_SETSIZE, NULL, &writefs, NULL, &TOut ) ) {
>>               perror ( "Timeout waiting on CommWriteChar");
>>               return 0;
>>       }

>select() checks if the next access won't hand (but may return
>successfull or with an error instead). It doesn't make much sense to do
>that *after* having something written down there:)

>>       return ( bcount );
>> }

>Btw: return isn't a function. It's return value doesn't need an own pair
>of parentheses.

I usually forget this, but I think this makes no efective difference and the 
code generated by the compiler is the same and I feel more comfortable using 
them.

I've done this changes, that I've no doubt that are needed, but I continue 
having the same problems as described in my previous e-mail.

Thanks a lot.


-- 
Francisco M. Marzoa Alonso
Responsable de Software - Softrónica S.A.
http://www.softronica.org/
C/Herrerías, 14 - 28760 Tres Cantos (Madrid)
tfno. +34 918 038 600  fax. +34 918 032 297
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: your mail
@ 2002-08-27 16:55 Alex Pavloff
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Pavloff @ 2002-08-27 16:55 UTC (permalink / raw)
  To: 'Gerald Emig'; +Cc: 'linux-serial@vger.kernel.org'


Hi Gerald, here's some more info:

Sending data isn't the problem.  The problem is acting as a slave and
receiving unsolicited packets from a master.   I need to determine when a
packet is complete.  If I was sending the packets (which I have done before
and am doing now), I can cheat a bit because I know the length of the packet
I'm "supposed" to be getting back.   I can't do that when acting as a slave.

This is different that the other protocol I'm familiar with.

GE's SNP uses two packets -- the first fixed size and containing the length
of the second size.
AB's DF1 has a fixed packet structure with many special characaters that
makes it easy to pull in a piece at a time

With Modbus RTU I neither know how long a packet is going to be, nor do I
have a sequence of bytes that can be used to judge the end of a packet.  I
need to be able to understand that 3.5 characters times of nothing means the
end of the packet.

Do I need a line discipline for this one portion of the driver?

Alex Pavloff
Software Engineer
Eason Technology
 


-----Original Message-----
From: Gerald Emig [mailto:gme@emig-software.de]
Sent: Tuesday, August 27, 2002 3:00 AM
To: Alex Pavloff
Cc: 'linux-serial@vger.kernel.org'
Subject: Re: your mail



To wait for at least 3.5 character times you can simply wait for this time
or more using usleep() before sending your data.

On Mon, 26 Aug 2002, Alex Pavloff wrote:

>
> Good (morning/afternoon/evening) folks,
>
> I am writing Modbus RTU code for Linux 2.4.19.  While seeminly simple to
do
> in userspace, there's one big kicker that I can't handle there easily.
> Modbus RTU is a binary serial protocol used in industrial automation.
First
> used by the Modicon PLCs, it's found on a variety of devices from a
variety
> of manufacturers.
>
> The specification is at www.modbus.org, under "Modbus Standard Library",
and
> its the Modbus Serial Protocol Reference Guide.
>
> Here's the part that I don't think I can resolve in userspace:
> -----
> RTU Framing
> In RTU mode, messages start with a silent interval of at least 3.5
character
> times. This is most easily implemented as a multiple of character times at
> the baud rate that is being used on the network (shown as T1-T2-T3-T4 in
the
> figure below). The first field then transmitted is the device address.
>
> The allowable characters transmitted for all fields are hexadecimal 0-9,
> A-F. Networked devices monitor the network bus continuously, including
> during the 'silent' intervals. When the first field (the address field) is
> received, each device decodes it to find out if it is the addressed
device.
>
> Following the last transmitted character, a similar interval of at least
3.5
> character times marks the end of the message. A new message can begin
after
> this interval.
>
> The entire message frame must be transmitted as a continuous stream. If a
> silent interval of more than 1.5 character times occurs before completion
of
> the frame, the receiving device flushes the incomplete message and assumes
> that the next byte will be the address field of a new message.
> -----
>
> 3.5 character times at high baud rates is not something I can pull off
with
> termios.  To get the Modbus RTU frames without resorting to some really
> strange code in userspace, should I write a line-discipline module whose
> sole purpose is to deal with the character timing?
>
> Any comments (yay/nay/huh?) appreciated.
>
> Alex Pavloff
> Software Engineer
> Eason Technology
>
>

Gerald Emig



^ permalink raw reply	[flat|nested] 7+ messages in thread
* (unknown)
@ 2002-08-27  1:48 Alex Pavloff
  2002-08-27  9:59 ` your mail Gerald Emig
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Pavloff @ 2002-08-27  1:48 UTC (permalink / raw)
  To: 'linux-serial@vger.kernel.org'


Good (morning/afternoon/evening) folks,

I am writing Modbus RTU code for Linux 2.4.19.  While seeminly simple to do
in userspace, there's one big kicker that I can't handle there easily.
Modbus RTU is a binary serial protocol used in industrial automation.  First
used by the Modicon PLCs, it's found on a variety of devices from a variety
of manufacturers.

The specification is at www.modbus.org, under "Modbus Standard Library", and
its the Modbus Serial Protocol Reference Guide.

Here's the part that I don't think I can resolve in userspace:
-----
RTU Framing
In RTU mode, messages start with a silent interval of at least 3.5 character
times. This is most easily implemented as a multiple of character times at
the baud rate that is being used on the network (shown as T1-T2-T3-T4 in the
figure below). The first field then transmitted is the device address.

The allowable characters transmitted for all fields are hexadecimal 0-9,
A-F. Networked devices monitor the network bus continuously, including
during the 'silent' intervals. When the first field (the address field) is
received, each device decodes it to find out if it is the addressed device.

Following the last transmitted character, a similar interval of at least 3.5
character times marks the end of the message. A new message can begin after
this interval.

The entire message frame must be transmitted as a continuous stream. If a
silent interval of more than 1.5 character times occurs before completion of
the frame, the receiving device flushes the incomplete message and assumes
that the next byte will be the address field of a new message.
-----

3.5 character times at high baud rates is not something I can pull off with
termios.  To get the Modbus RTU frames without resorting to some really
strange code in userspace, should I write a line-discipline module whose
sole purpose is to deal with the character timing?

Any comments (yay/nay/huh?) appreciated.

Alex Pavloff
Software Engineer
Eason Technology
 



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-18 14:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 17:36 Barnett, Andy
2020-09-18  7:56 ` your mail Johan Hovold
     [not found]   ` <CA+H6KCm1YJ_-X6D61ujqWZDJzTyMBGKCR7W07QpWz9J6CSEwVA@mail.gmail.com>
2020-09-18 14:36     ` Edgeport/4 Compatibility " Johan Hovold
     [not found] <20191026192359.27687-1-frank-w@public-files.de>
2019-10-26 19:30 ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2004-08-24  6:05 (unknown) Francisco M. Marzoa Alonso
2004-08-24  9:39 ` your mail Jan-Benedict Glaw
2002-08-27 16:55 Alex Pavloff
2002-08-27  1:48 (unknown) Alex Pavloff
2002-08-27  9:59 ` your mail Gerald Emig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).