Re: [Lazarus] FreePascal TCPIP data tunnel code sample?
Op 05-02-16 om 14:20 schreef Bo Berglund: On Thu, 4 Feb 2016 21:10:54 +0100, Koenraad Lelongwrote: Op 04-02-16 om 17:17 schreef Bo Berglund: Then whatever data comes in through the Ethernet port should be sent via the WiFi connection to the instrument. All data received from the instrument should be sent out to the connected client on the Ethernet connection. So the program I am looking for should not do anything at all with the data content, except transfer byte-by-byte between the networks. And this should be running on a Raspberry Pi2B so it can be easily deployed in the place the instrument is located. Meanwhile I can sit in another building and test the actual client code. Is there something like this available already? Hi, Isn't this just port-forwarding ? Set up the firewall to forward data to the wired NIC to the device's address and port. Which firewall? But you are right in the port forwarding part. I want my new RPi2 unit to forward the communications on port 1001 on the Ethernet side to a specific unit on the WiFi side on its 1001 port. Every linux-machine, and the pi is no exception, has a firewall : iptables. You could configure it manually, but myself, I prefer shorewall to configure the firewall. Koenraad. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] "Test" button in project inspector
On 05/02/16 13:52, Werner Pamler wrote: > In the Project inspector window, there is a Test button. What is it > good for? Its function is not documented in the help file accessible > by the Help button at the left. What's confusing is that executing > "Test" reports this error in the Message window for all of my tested > projects, even for an empty one: > > Test: Compiling an empty file: Exit code 1, Errors: 1 Fatal: Syntax > error, "BEGIN" expected but "end of file" found > AFAIK it feeds currently set compiler options to the compiler to see if it can find anything wrong with them; I understand it is supposed to help finding inconsistencies with options, paths, etc. This button or its output used to be accompanied with some explanation... like 'note, an error compiling an empty file is expected' or so. -L. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Free Pascal and Lazarus learning center
On 2016-02-05 13:53, Michael Schnell wrote: > I found Indy rather hard to use. Like I said, that is dependent on the person. I had no problem switching between Synapse and Indy. They seem equally user friendly to me. Indy is just a lot more convenient to me because it implements, as standard, just about every TCP protocol there is. Plus, Indy documentation is good, support is good, and it is still actively being developed (even contributions from Embarcadero). Synapse and LNet seem very slow moving - but that doesn't necessarily mean anything bad. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Free Pascal and Lazarus learning center
Michael, I submitted TSimpleThread to mantis. It's filed under issue #29597. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Panel Top Negative Limitation
Il 04/02/2016 18:51, i...@voiceliveeditor.com ha scritto: Hi I have a problem using a panel, that is large say 7. If I try to bring areas of this into the view area by using panel.top:=-avalue, this works fine until you hit –32769; at which point the panel vanishes. How can this be corrected; or is there a workaround? What I'd do in your place would be to use a TBitmap of the required size and populate it with whatever image you need. You're just working in memory, no visual components implied, you shouldn't have any constraint in its size. Then you may copy to the canvas of the visual object just the portion you want to show. It should work quite smoothly. Giuliano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Free Pascal and Lazarus learning center
On 02/04/2016 11:06 PM, Graeme Geldenhuys wrote: It depends on the developer I guess. ;-) I (mostly with Delphi) did use as well AsyncPro as Indy as Synapse (and once LNET) I found Indy rather hard to use. But it can successfully be made doing lots of stuff . -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FreePascal TCPIP data tunnel code sample?
On Thu, 4 Feb 2016 21:10:54 +0100, Koenraad Lelongwrote: >Op 04-02-16 om 17:17 schreef Bo Berglund: >> Then whatever data comes in through the Ethernet port should be sent >> via the WiFi connection to the instrument. >> All data received from the instrument should be sent out to the >> connected client on the Ethernet connection. >> So the program I am looking for should not do anything at all with the >> data content, except transfer byte-by-byte between the networks. >> >> And this should be running on a Raspberry Pi2B so it can be easily >> deployed in the place the instrument is located. Meanwhile I can sit >> in another building and test the actual client code. >> >> Is there something like this available already? >> >> >Hi, > >Isn't this just port-forwarding ? Set up the firewall to forward data to >the wired NIC to the device's address and port. > Which firewall? But you are right in the port forwarding part. I want my new RPi2 unit to forward the communications on port 1001 on the Ethernet side to a specific unit on the WiFi side on its 1001 port. The scenario is this: - A device has a WiFi Access Point built in - Clients connect to this AP via WiFi - Then they can control the device via TCP port 1001 - The device is located in a remote building - In the development lab there is no connection possible to the AP - So I need a proxy of sorts in the remote building - It should connect by WiFi to the device and its TCP port 1001 - It is also connected by Ethernet to the main network - So a TCP server should accept incoming connections on port 1001 - Any data coming in on port 1001 from the Ethernet side should be sent to the WiFi side to the device with the Access point - Likewise data received from the device should be passed along to the connected client on the Ethernet After some research I have found that this is working just like a proxy server and I found a component in Indy10 that can actually do the entire thing! It is named TIdMappedPortTCP and it does the following: - Operates a TCP server on a designated port - When a client connects to the port it opens a client connection to a remote server (preconfigured server and port). - Then data are channeled between the two sockets in both direction as I described. And all of this is available in a single Indy10 component! I do have Indy10 installed in my Lazarus 1.6RC2 and I can see the component on the palette. Yet if I create a new console program and enter the used units for the component Lazarus reports that it cannot find the unit! Very strange, since it is installed and visible in Lazarus I assumed that it would also be accessible from code... Sigh -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Stopping a service from within a service
That works great thanks :) On 4 Feb 2016 22:53, "Jy V"wrote: > On Thu, Feb 4, 2016 at 8:57 PM, Richard Mace > wrote: > >> On 4 February 2016 at 17:39, Jy V wrote: >> >>> On Thu, Feb 4, 2016 at 5:41 PM, Richard Mace >>> wrote: >>> XMLRAD stop a program registered as a service running following code, >>> >> >> So, would I run this code by creating a TProcess from within my service, >> to get it to "stop" my service? >> > > if you have the SvcHandle available inside your program since you are the > very own running service, > you can even skip OpenSCManagerA and OpenServiceA and stop the process > directly > calling ControlService(SvcHandle, SERVICE_CONTROL_STOP, Status) > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] "Test" button in project inspector
In the Project inspector window, there is a Test button. What is it good for? Its function is not documented in the help file accessible by the Help button at the left. What's confusing is that executing "Test" reports this error in the Message window for all of my tested projects, even for an empty one: Test: Compiling an empty file: Exit code 1, Errors: 1 Fatal: Syntax error, "BEGIN" expected but "end of file" found -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus