OscarFC 18-May-May-07 23:00I have run serrecv.exe on a PC with Windows XP & SP2.Always the message is the same. 'Error getting file name size'.I don't know if this program doesn't run on Windows XP. Or I have to open ports in Windows Xp with another program, try on another O.
S., change the API of Win32, or what I have to do, but I need to run this program on Windows XP to transfer some files to another PC with Windows XP O.S. Too.Can anyone help me, please???
Or tell me where is the source code of a program like this???Thank You in advanceOscar. Eddypr 18-Jul-Jul-06 22:39Thank to gomorgan89 that wrote the codes of serrecv.c & sertrans.c. They works fast and fine for transfering and receiving file(s) via serial port comm. I love them all.But now i'm going to transfer the file from PC that uses Ms-DOS 6 OS to PC that use WinXP OS. The codes of serrecv.c & sertrans.c can not work in DOS environment.I need the code of serrecv.c & sertrans.c that work in DOS environment. May be they are implemented in turbo C or C-ansi.
Anyone knows the (location in the internet) source code are?Thank youeddy. 23-Oct-Oct-05 16:31this article is helpful. But how to use it for full duplex communication with null modem?i have the problem of network bridge as connecting 2 pcs communicating each other through it.
1 pc encodesdecodes other does nothing. Bridge is supposed to be a pc with 2 serial ports. 2 pcs have 1 serial port.
How to establish communication between these 3 pcs serially?I recentiy down loaded source code for.c and.exe files. When i tried to compile it on win-xp turbo compiler i got too many error messages.e.g. Unable to include windows.hundefined symbol dcb,handle,dcb,property,serialport,genericread,genericwrite,same for both serrecv.c sertrans.c filesalso i would like to know wheather i should have vb 6.0 or.net to run c program?but.exe files donot give any warning.2ndly how should i configure null modem cable? Is it null modem with loop back handshaking?
If y/n then how?also can anyone tell me what is max baud rate can be set for null modem cable set up?wheather it is hardware flow control? Xon-xoff flow control?can anybody help menilesh date- modifed at 20:16 Monday 24th October, 2005. Paul Belikian 2-Oct-05 7:592-Oct-05 7:59I liked the article, however it makes no mention of flow control.unless I missed it. If you added flow control support, you could transfer much more than 200 bytes at a time (which is quite a small amount of data for two computers sitting next to each other).You could also use the BuildCommDCB( ) function.
Just passing it a string would setup the baudrate AND flow control. That function with a string such as '96,N,8,1,x' would eliminate that switch statment and would build the DCB with the appropriate values.Good article! The author allocated a char buffer of 200 bytes to read from the file then send / receive 'char buffer200' - I think it was a random buffer size (I would have chosen sizes like 256, 512, etc) and not any kind of special 'magic' number.
I did find the article to be very good and it sure does give a great explanation of serial communication programming. However, due to the small buffer size and the lack of hardware flow control (i.e. Not implementing any code to control hardware handshaking), the article does not provide code for a 'high' performance method to transfer data from one computer to another.
If the two computers were a thousand miles apart, I can see taking the precautions of slower data transfer, but since the computers are a few feet away, there's no reason not to transfer data at a higher and faster rate. Another reason I think think hardware flow control should have been mentioned is for the transfer of binary data. In other words, data that can have a value of 0 through 255. In some systems that use software flow control, certain data values mean stop sending data or that it is OK to send data (XON,XOFF.) Those fall between 0 and 255 so in some systems, the file's data can be confused as flow control commands. In all fairness, that wouldn't happen in the code above because the transfer method is proprietary, yet someone may want to adapt the code to do RS232 communications and that's where they may hit some problems. All in all, the author got 5 points from me for submitting the article.
Oooh, I see now!The reason I ask is because I want to send out about 1K of data to a device, and the data needs to be in Hex ( but displayed as characters. I know, weird). I want to send the block as a 'whole' and just wanted to make sure that I could redefine the 200 as 1000-ish and still be ok. ( not have to implement any special loops or anything). The device and the computer are inches apart, and fortuenately, the handshaking is a non issue becuase of the relatively low speed of 56k.Anyhow, thank you very much on shedding some light on this subject!-Ben.
So I have one more question:I am not able to create a valid handle for the setuphere is what I have:sphdl = CreateFile('.COM1', GENERICREAD GENERICWRITE, 0, NULL, OPENEXISTING, 0, NULL);and it keeps telling me that I have an invalid handle ( the value of sphdl = 0xfffffff)I have tried to use 'COM1', 'COM1:' 'com1'. I just cant figure out whats going on.I am using the function GetLastError to try and shed some more light on the subject, but it seems that it only returns a value of 2. ( who knows what that means)Have any clue what I am doing wrong?oh, I am on an XP machine, using Visual Studio2005.
Hi Paul,First off, thank you for replying to my queries. I really appreciate it!I figured it out: It was a compiler problem. The compiler needed to be forced to handle the character set in a different fashion.Visual Studio 2005 apparently deals with them as a Unicode character set as a default. You need to change it to a multi-byte character set to allow it to be compatable with the LPCTSTR type of the CreateFile. ( it was returning an error of invalid file with use of GetLasterror ).After I did that, it accepted the char COM1 and it sent out my buffer to the serial port.like a gloveThank you again!-Ben.
That's true, but technically 'LPT1:' or 'COM1:' aren't ports either, 378h and 3f8h are ports.However, I like to think of USB as being a 'Port' because once it's opened, I can read and write to it. I have a degree in electronics, so my terminology may not be correct, but it works for me. So, if the data is going to a hardware port or if it is being redirected to somewhere else, it doesn't actually matter to me at this level because I can still read and write to it like a port.Also, because of the way I think of USB 'ports', I'm not boxed into the false belief about how external hardware is required to connect two bus masters. The hardware is already implemented on the PC's. I can simply open the USB on each computer and transfer data between the two using CreateFile, ReadFile, and WriteFile.just like this article shows for serial. The only difference is getting the path to the USB driver and passing it to the CreateFile function.We're not talking about developing microcontrollers, we're talking about transfering data from one PC to another.
LPT and COM are sets of ports (data port, control port, etc)And it is not possible to CreateFile, ReadFile or WriteFile to USB bus. You can not transfer data to nobody (what is possible on LPT or COM ports when handshaking and flow controls are off). Only when real physical hardware device is connected to the USB bus and anounces about itself, USB master (computer) enumerates bus, gets VID and PID of device, loads it's driver matching these two identificators, only then it is possible to CreateFile with name looking something like: USBXXXXXXXXXXXXXXXXVIDXXXXPIDXXXX. That's true, but really, you're thinking far too low level and that wasn't the question posted.The question was how can you talk to Parallel ports or USB 'ports' using CreateFile, ReadFile, and WriteFile. Once you've got the device path, you can open it up like any other 'port'.and you stated that it was possible at the end of your post. The person who asked the question doesn't care about the hardware aspect because he already knows the thing has to be plugged-in before he can use it.Maybe the word 'port' is misleading.
Hot english magazine - issue 145 with audio files. “Learn Hot English have really helpful and fun things for students. And we’ll only teach you the most useful and practical language in the simplest way so it’s easy to understand.Finally, where possible, we add in a touch of humour so you enjoy the material.All of this makes learning interesting, practical and fun, and will motivate so you’ll learn English quickly and easily!If you want to learn English the fast way, you’ll love our materials that are guaranteed to keep you motivated and teach you the English you need!Click through to see how our eBooks and courses can improve our English.
Technically, you're correct, but at this level it doesn't make any difference since he's asking about much higher level functions and not how to access the hardware directly.Last Visit: 12-Dec-19 22:05 Last Update: 12-Dec-19 22:051General News Suggestion Question Bug Answer Joke Praise Rant AdminUse Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
The remote accessunit (RAU-96) provides an interface between the PROTOCOL DATA BUS and a SerialRS232 or USB adapter or Ethernet adaptor COMPort of a Computer or an automation system such as CRESTRON, AMX, ELAN, PLC,etc. Andother Lighting controls such as Lutron, Vantage, Litetouch, etc. That couldsend the. It is used by installers to configure theand to provide full system diagnostics and installationsupport.Also it is used with the software toAutomate the Lighting Control from a Computer's Clock. As an interface, it will allow thesystems' to be controlled directly from a PC, a touch-screen or from othercontrol devices. Connected to an Ethernet adapter it could be accessedthrough a local network or through the internet. At a customer's request, Digital Lighting Systems will pre-configure the systemprior to shipping. In this case there should be no need for the RAU-96 unless latermodifications or interfacing to other control systems are required. The Protocol Dimmers and Wall stations do not need the RAU-96 to operate.Configuring or making changes to the lighting control system is fast and easy,using our simple and User friendly ProtocolSoftware package. Price: $398.00For seamless integration and control from PCs,Audio visual or other control devicesDownload(56MB) 32 Bits and 64 bits machines Go green by using LED lights withour LED lighting controllers & PWM dimmers for all applications where LEDdimming is requiredDigital Lighting Systems (305) 969-8442.