Re: [Synalist] Udp discovering software
Nobody has an idea? > Hi. I have wrote a background program for Linux for discovering machines in > a network using udp. The program is necessary because the machines can > have an address in a unknown network and I must find them. > > This is the server side program: > > TBSUdpSocket.bind('255.255.255.255', '65534'); > if TBSUdpSocket.LastError<> 0 then WriteLn(TBSUdpSocket.LastErrorDesc) > else begin > while not Terminated do begin > StringIn:= TBSUdpSocket.RecvPacket(1000); > > And this is the client side: > > TBSUdpSocket.CreateSocket; > TBSUdpSocket.EnableBroadcast(true); > TBSUdpSocket.Connect('255.255.255.255', '65534'); > TBSUdpSocket.SendString('_?'+ #10); > TBSUdpSocket.Connect('255.255.255.255', '65534'); > > > The program can discover machines only if the machines are in the same > network of the client. > How can I find machines in a different network (multicast)? > > I have already tried > EnableBroadcast(true); > MulticastTTL:= 10; > AddMulticast('234.5.6.7'); -- Denis Gottardello Sintesi S.r.l. +39.049.9301135 -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] Udp discovering software
Hi. I have wrote a background program for Linux for discovering machines in a network using udp. The program is necessary because the machines can have an address in a unknown network and I must find them. This is the server side program: TBSUdpSocket.bind('255.255.255.255', '65534'); if TBSUdpSocket.LastError<> 0 then WriteLn(TBSUdpSocket.LastErrorDesc) else begin while not Terminated do begin StringIn:= TBSUdpSocket.RecvPacket(1000); And this is the client side: TBSUdpSocket.CreateSocket; TBSUdpSocket.EnableBroadcast(true); TBSUdpSocket.Connect('255.255.255.255', '65534'); TBSUdpSocket.SendString('_?'+ #10); TBSUdpSocket.Connect('255.255.255.255', '65534'); The program can discover machines only if the machines are in the same network of the client. How can I find machines in a different network (multicast)? I have already tried EnableBroadcast(true); MulticastTTL:= 10; AddMulticast('234.5.6.7'); -- Denis Gottardello Sintesi S.r.l. +39.049.9301135 -- Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
Re: [Synalist] Synaser and /dev/ttyACM
On Linux? > On 07/08/2014 04:19 PM, Denis wrote: > > No, is not possible. > > Is there a way to catch the setup of the serial interface before and > > after open it? > > Have you tried strace (on OS X: dtruss with some command line options? I > can look them up again if it helps)? This tool proved very helpful in my > last quest for serial communication (turned out the OS X driver was > buggy in my case). > > Hope it helps :-) -- Denis Gottardello Sintesi S.r.l. +39.049.9301135 -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
Re: [Synalist] Synaser and /dev/ttyACM
No, is not possible. Is there a way to catch the setup of the serial interface before and after open it? > > Up till now we always worked with FTDI and Prolific cables and the > > data that's been sent by our device can be received correctly. Now we > > started using a new FPGA that has an Exar USB serial convertor on > > board. > > http://www.exar.com/connectivity/uart-and-bridging-solutions/usb- > > uarts/xr21v1410 It is recognized on Linux as a ttyACM* device and the > > data is for some reason corrupted, bytes are missing and/or > > transformed. It however receives data but it does not correspond to > > what has been sent. > > Maybe you have just wrong serial communication parameters. Invalid > bit count, stop bits, parity, speed... and your data transfer goes > out of synchronization. -- Denis Gottardello Sintesi S.r.l. +39.049.9301135 -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] Synaser and /dev/ttyACM
Hi everybody Up till now we always worked with FTDI and Prolific cables and the data that's been sent by our device can be received correctly. Now we started using a new FPGA that has an Exar USB serial convertor on board. http://www.exar.com/connectivity/uart-and-bridging-solutions/usb- uarts/xr21v1410 It is recognized on Linux as a ttyACM* device and the data is for some reason corrupted, bytes are missing and/or transformed. It however receives data but it does not correspond to what has been sent. Have you never use this chip? Have you got experience with ttyACM interface? -- Denis Gottardello Sintesi S.r.l. +39.049.9301135 -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] Bridge between socket
I have an emergency. I need a software that can create two or more tcp server sockets and create a bridge between these sockets (for Windows). Can you help me? -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
Re: [Synalist] tcp keepalive under windows, strange problem.
Il 15/01/2013 15:43, Dietrich Hasselhorn ha scritto: > Try to change three items: > > a. remove the line keepalive.keepalivetime:=1; > b. increase keepaliveinterval from 1 to 10 seconds > b. also set the SocketOptions REUSE_ADDR > > this should take care of the problem. > > Regards, > > Dietrich Hasselhorn I'm not sure if that this is right for you but, in order to use the keep alive feature I use these functions: ClientSocket:= ServerSocket.Accept; if ServerSocket.LastError= 0 then begin SetKeepAliveStatus(ClientSocket, 1); SetKeepAliveValue(ClientSocket, 1, 500, 500); TLThTcpServerConn.Add(ThTcpServerConn.Create(ClientSocket)); end; __ unit USocketOptions; interface uses System.Win.ScktComp, Winsock, Windows, Winsock2; function GetKeepAliveStatus(Socket: NativeInt; OptVal: PInteger): Boolean; function SetKeepAliveStatus(Socket: NativeInt; OptVal: Integer): Boolean; function SetKeepAliveValue(Socket: NativeInt; OnOff, Time, Interval: Integer): Boolean; implementation function GetKeepAliveStatus(Socket: NativeInt; OptVal: PInteger): Boolean; var Len: Integer; begin GetKeepAliveStatus:= false; Len:= SizeOf(OptVal^); if GetSockOpt(Socket, SOL_SOCKET, SO_KEEPALIVE, @(OptVal^), Len)= 0 then GetKeepAliveStatus:= true; end; function SetKeepAliveStatus(Socket: NativeInt; OptVal: Integer): Boolean; begin SetKeepAliveStatus:= false; if SetSockOpt(Socket, SOL_SOCKET, SO_KEEPALIVE, @OptVal, SizeOf(OptVal))= 0 then SetKeepAliveStatus:= true; end; function SetKeepAliveValue(Socket: NativeInt; OnOff, Time, Interval: Integer): Boolean; const SIO_KEEPALIVE_VALS= IOC_IN or IOC_VENDOR or 4; type TTcpKeepAlive= packed record OnOff, KeepAliveTime, KeepAliveInterval: u_long; end; var KeepAliveIn: TTcpKeepAlive; BytesReturned: Cardinal; begin SetKeepAliveValue:= false; FillChar(KeepAliveIn, SizeOf(KeepAliveIn), 0); KeepAliveIn.OnOff:= OnOff; KeepAliveIn.KeepAliveTime:= Time; KeepAliveIn.KeepAliveInterval:= Interval; if WSAIoctl(Socket, SIO_KEEPALIVE_VALS, @KeepAliveIn, SizeOf(KeepAliveIn), nil, 0, &BytesReturned, nil, nil)= 0 then SetKeepAliveValue:= true; end; end. -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
Re: [Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)
> Dear Denis, did you see my solution? You can use ls to get the available > ttyUSB devices attached and you can use ls to get the locks in the > /var/lock folder. Please review my previous answer and see if that helps. Thanks for your reply. In order to guarantee the right operation of all programs I have implemented a restart of the device when a serial interface will be unplug and replug. -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
Re: [Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)
> So your OS is assigning different device names after reattaching? Sounds > like a Linux problem, not a programming problem. > Look at e.g. udev rules to persistently name the device ttyUSB0 Yes, you're right. But, read below: 1) Normal condition, /dev/ttyUSB0 2) Program starts and open USB0 3) Unplug USB0 4) Program closes USB0 and deletes the lock in /var/lock 5) Replug USB0 6) Now the serial interface is not USB0 but USB1. How the kernel remembers that USB0 was open from a still running program? The program has close USB0 and removed the lock... Is there another directory - file where there is a lock? Sorry for my bad English. -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)
Hi everybody. I have a problem with usb serial interfaces on Linux. If a serial device is disconnected from the machine and then reconnected, if before the serial had as name ttyUSB0, then it will assume ttyUSB1. Now the sequence: 1) The device is connected and has name ttyUSB0 2) The program open the serial interface. 3) The device will be unplugged. 4) The program has an exception and close the serial and wait till ttyUSB0 is present. 5) Now the device is reattached but it will be ttyUSB1 For obtain ttyUSB0 I must close the program, unplug and replug. How can I do for obtain ttyUSB0 when the program is running? Up! -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)
Hi everybody. I have a problem with usb serial interfaces on Linux. If a serial device is disconnected from the machine and then reconnected, if before the serial had as name ttyUSB0, then it will assume ttyUSB1. Now the sequence: 1) The device is connected and has name ttyUSB0 2) The program open the serial interface. 3) The device will be unplugged. 4) The program has an exception and close the serial and wait till ttyUSB0 is present. 5) Now the device is reattached but it will be ttyUSB1 For obtain ttyUSB0 I must close the program, unplug and replug. How can I do for obtain ttyUSB0 when the program is running? -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
Re: [Synalist] TTCPBlockSocket, detect client diconnection
Il 23/07/2012 14.18, Lukas Gebauer ha scritto: Hi, I'm Denis from Italy. Thanks for your great work! >I have implemented TTCPBlockSocket, how can I detect client >disconnection? Can I use keep alive? http://synapse.ararat.cz/doku.php/public:howto:activeconnection MMM.. I have tried this solution but does not work if the remote host closes the connection brutally, like the wire unplugged. These two functions (for enable keep alive) work correctly on Windows Xp. Can somebody test these functions on Vista or Seven? SetKeepAliveStatus(ClientSocket, 1); SetKeepAliveValue(ClientSocket, 1, 500, 500); *function SetKeepAliveStatus(Socket: NativeInt; OptVal: Integer): Boolean;* begin SetKeepAliveStatus:= false; if SetSockOpt(Socket, SOL_SOCKET, SO_KEEPALIVE, @OptVal, SizeOf(OptVal))= 0 then SetKeepAliveStatus:= true; end; *function SetKeepAliveValue(Socket: NativeInt; OnOff, Time, Interval: Integer): Boolean*; const SIO_KEEPALIVE_VALS= IOC_IN or IOC_VENDOR or 4; type TTcpKeepAlive= packed record OnOff, KeepAliveTime, KeepAliveInterval: u_long; end; var KeepAliveIn: TTcpKeepAlive; BytesReturned: Cardinal; begin SetKeepAliveValue:= false; FillChar(KeepAliveIn, SizeOf(KeepAliveIn), 0); KeepAliveIn.OnOff:= OnOff; KeepAliveIn.KeepAliveTime:= Time; KeepAliveIn.KeepAliveInterval:= Interval; if WSAIoctl(Socket, SIO_KEEPALIVE_VALS, @KeepAliveIn, SizeOf(KeepAliveIn), nil, 0, &BytesReturned, nil, nil)= 0 then SetKeepAliveValue:= true; end; -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] TTCPBlockSocket, detect client diconnection
Hi, I'm Denis from Italy. Thanks for your great work! I have implemented TTCPBlockSocket, how can I detect client disconnection? Can I use keep alive? ClientSocket:= TTCPBlockSocket.Create; try try ClientSocket.Socket:= Socket; while not Terminated *or SocketIsConnected ()* do begin if ClientSocket.CanReadEx(100) then begin SetLength(AAByteIn, ClientSocket.WaitingData); ByteIn:= ClientSocket.RecvBufferEx(@AAByteIn[0], Length(AAByteIn), 100); if ByteIn> 0 then begin RowIn:= ''; for I:= 0 to ByteIn- 1 do RowIn:= RowIn+ Chr(AAByteIn[I]); SendLog(RowIn); end else break; end else Sleep(100); end; Except on e: Exception do begin end; end; finally ClientSocket.Free; end; -- Denis Gottardello Sintesi S.r.l. 049.9301135 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] One connection a time
How can I fore max connections= 1? Denis Gottardello Sintesi S.r.l.-- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] SSH client
Can you write a SSH client component for me? Denis Gottardello Sintesi S.r.l.-- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public
[Synalist] Synapse, socket server
Is Synapse alive? There is no new version from 2007-12-21. I have a problem with TTCPBlockSocket, sometimes the socket does not coming open. (Under Windows and Linux.) What can I do? -- Denis Gottardello Sintesi S.r.l. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public