Search Results

Search found 4296 results on 172 pages for 'serial ports'.

Page 24/172 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Multiple ports listed in SQL Server connection string

    - by BBlake
    I have a legacy VB6 app where the servername, databasename, username, etc are defined in an INI file, but the port number for the connection string (the default 1433) is hard coded in the app. It's being moved to a new sql server back end that runs off a different port number. I'm trying to avoid having to alter and recompile the application which entails signifigant retesting, documentation, etc. I tried altering the INI file so that for the new server I have put in: SERVERNAME\INSTANCE,NEWPORTNUMBER This effectively builds the connection with Data Source = SERVERNAME\INSTANCE,NEWPORTNUMBER,1433; This appears to work correctly as it connects to the database when I run the app. It appears to me that the ,1433 portion is being ignored. Is this a valid assumption or will this cause me some problem I'm not seeing here?

    Read the article

  • specific ports in ftp(client)

    - by user158182
    i am using a ftp connection to send data beteen server and client.servers command port is 21 and data port is 20,i want the client port specified by user is that possible, Ftp: command : client >specificport(user defined) --> server --21 data : client >specificport(user defined) --> server --20

    Read the article

  • Binary to Ascii and back again

    - by rross
    I'm trying to interface with a hardware device via the serial port. When I use software like Portmon to see the messages they look like this: 42 21 21 21 21 41 45 21 26 21 29 21 26 59 5F 41 30 21 2B 21 27 42 21 21 21 21 41 47 21 27 21 28 21 27 59 5D 41 32 21 2A 21 28 When I run them thru a hex to ascii converter the commands don't make sense. Are these messages in fact something different than hex? My hope was to see the messages the device is passing and emulate them using c#. What can I do to find out exactly what the messages are?

    Read the article

  • Ruby SerialPorts Gem

    - by Seth Archer
    Using Ruby SerialPorts Gem to interact with hardware. When I write a byte array to the hardware using a program called "Serial Port Monitor" the hardware responds correctly. However, when I write the same byte array using ruby it doesn't work unless I do a read request just before the write request. This device doesn't respond correctly with this sp = SerialPort.new(args) sp.write [200.chr, 30.chr, 6.chr, 5.chr, 1.chr, 2.chr, 0.chr, 244.chr] But it does if I add a read request before the write. Like this sp SerialPort.new(args) sp.read sp.write [200.chr, 30.chr, 6.chr, 5.chr, 1.chr, 2.chr, 0.chr, 244.chr] This works, but I'm at a loss as to why. I should also add that the first snippet does work occasionally maybe 1/10 of the time.

    Read the article

  • Java RS232 Comm on Vista-64 bit

    - by DD
    We have a Java application which needs to communicate with a peripheral device over Virtual Serial COM port. We use the RS232 Java COMM API (javax.comm.properties, comm.jar, win32com.dll) to achieve the same. Currently the code works fine on Windows XP 32-bit, Vista 32-bit and Windows 7. However we are having a problem trying to communicate on Vista 64-bit. I read from the Java forums that there is no 64-bit support for the Java COMM API I was wondering if anyone was facing a similar situation and were able to resolve the same in some way?

    Read the article

  • DataReceived Event handler not receiving messages

    - by karthik
    I'm using the below code to receive the messages using serial port event handler. But it dosent receives any.I am not getting errors. The code breaks in "string msg = comport.Readline()" Am i doing something wrong ? public partial class SerialPortScanner : Form { private SerialPort comPort = new SerialPort(); public SerialPortScanner() { InitializeComponent(); comPort.Open(); comPort.DataReceived += new SerialDataReceivedEventHandler(comPort_DataReceived); } void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { if (comPort.IsOpen == true) { string msg = comPort.ReadLine(); MessageBox.Show(msg); } } }

    Read the article

  • DataReceived Event handler not receiving messages using c#

    - by karthik
    I'm using the below code to receive the messages using serial port event handler. But it dosent receives any.I am not getting errors. The code breaks in "string msg = comport.Readline()" Am i doing something wrong ? public partial class SerialPortScanner : Form { private SerialPort comPort = new SerialPort(); public SerialPortScanner() { InitializeComponent(); comPort.Open(); comPort.DataReceived += new SerialDataReceivedEventHandler(comPort_DataReceived); } void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { if (comPort.IsOpen == true) { string msg = comPort.ReadLine(); MessageBox.Show(msg); } } }

    Read the article

  • Multiple port asynchronous I/O over serialport in C#

    - by firoso
    I'm trying to write a test application for serial I/O (RS-232) with multiple units in C# and I'm running into an issue with my lack of threading experience so I'm soliciting feedback for a best known method. I've got a pool of COM ports COM1-16 each of which can read/write at any time and I need to be able to manage them simultaneously. Is this a situation for a thread pool? What is some guidance on structuring this applet? Edit: Upon review I was wondering is I really even need to do asynchronous threads here, I could just maintain states for each COM-port and do flow logic (i.e., statemachine) for each COM-port individually.

    Read the article

  • programmatically controlling power sockets in the UK

    - by cartoonfox
    It's very simple. I want to plug a lamp into the UK mains supply. I want to be able to power it on and off from software - say from serial port commands, or by running a command-line or something I can get to from ruby or Java. I see lots written about how to do this with X10 with American power systems - but has anybody actually tried doing this in the UK? If you got this working: 1) Exactly what hardware did you use? 2) How do you control it from software? Thanks!

    Read the article

  • Python: Importing a variable inside of a infinite loop

    - by Jack
    I have two modules, a host and a scanner. Both loop indefinitely to communicate with the serial ports. I want to import the variable "bestchannel" from scanner into host but by importing it, the while loop inside scanner runs first and loops forever. I want each module to run separately but be able to send each other data in real time. Is this possible? (outside of scanning ram) Example Code: http://pastebin.com/pxUBaima I want minchannel from scanner to be accessible to host.

    Read the article

  • Run sub on main thread from separate thread [VB.NET|SerialPort]

    - by Steven
    I'm reading data from a serial port, but the DataReceived event of SerialPort is handled on it's own thread. I want to handle this on the main thread, but simply declaring an event and raising it still results in it being processed on the SerialPort thread. I'm assuming I need to declare a delegate I can call, but I don't see how that would work. For example, I want to call Sub HandleDataReceived() on the main thread from the DataReceived thread, having HandleDataReceived() run on the main thread. How would I do this?

    Read the article

  • Any tool to check which ports/protocols firewalls prevent?

    - by Jus12
    Suppose I have a setup as: host_1 --- Firewall_1 --- Internet --- Firewall_2 --- host_2 I need to check which ports are open on host_2 from host_1 (which may be blocked by either firewalls) If there a tool that comes in two parts (one running on host_1 and other on host_2) that does this for me? It should be something like: 1 Listen to all ports on host_2 2 Try to connect to every port on host_2 from host_1 3 Give a report what ports are allowed.

    Read the article

  • How can I use an SSH tunnel for all traffic from a single application, without knowing the ports used?

    - by Matthew Read
    I have an application that opens connections on dozens of ports, and doesn't provide documentation about which ports it uses. I could use Wireshark or something to capture the traffic and export the ports from that, but I think it should be simpler than that. (And I'm not sure I would be able to cover all use cases and ensure the app used every single port it can ever use.) So I'm looking for a way to just say "forward all traffic from this application" (bonus points for all traffic from child processes as well) without needing to worry about specific ports. I'm sure there must be a way, but I couldn't hit on the right keywords while searching Google. How can I do this?

    Read the article

  • What firewall ports do I need to open when using FTPS?

    - by anoopm
    I need to access an ftps server (vsftpd) on a vendor's site. The vendor has a firewall in front of the ftps server and I have a firewall in front of my ftps client. I understand that ports 990, 991 and maybe 989 need to be opened up for control traffic. When looking at it from the vendor's firewall perspective, should these ports be opened up for both inbound and outbound traffic? What about ports for the DATA channel? Do I have to open all ports above 1000? And should I do it for both inbound and outbound traffic? TIA for your help.

    Read the article

  • All USB ports on my laptop are dead, any options via Ethernet, SD/MMC or HDMI?

    - by carbontracking
    My son's laptop has taken alot of pain in his school over the last few months and he and his buddies have succeeded in breaking both USB ports. I've opened the box, unsoldered the USB ports, replaced them by new components but no joy - the ports seem dead. If I assume that the insertion of LEGO pieces, etc. in USB ports has rendered them unsalvageable, do I have any other options for restoring USB access to the laptop? The laptop has an ethernet port, a HDMI port and an SD/MMC port. I've trawled the web for a magic adadpter, i.e; ethernet=USB, HDMI=USB or SD/MMC=USB but to no avail. Lots of options for going the other way though. Does anyone have any ideas on the feasibility of an ethernet=USB cable? Ethernet doesn't seem to have +5V or GND so I can run a cable from the motherboard that could provide those. Amazing how many functions of a laptop just disappear when you have no USB ports.

    Read the article

  • C# SerialPort.GetPortNames() behavior

    - by Gunner
    In my C# 2008 application, I use the SerialPort.GetPortNames() function to retrieve the list of currently available ports. What I have noticed is, when ever I plug in a USB device, it's port number i s shown in the list on my Application and when I unplug it and refresh the list, the port number is no longer there. One phase of the application involves reading/writing data from/to the device continuously. Now, my expectation is, If I unplug the device during the operation and get the current Port list using SerialPort.GetPortNames(), the Port Name will not be there and I can use that to make the decision that the device has been unplugged. To my surprise, the Port name is still found despite having it removed Why is the program behaving like this? The port name isn't listed when in no-communication mode. Does it have something to do with the device being removed when it's communicating?

    Read the article

  • Can't open COM1 from application launched at startup

    - by n0rd
    I'm using WinLIRC with IR receiver connected to serial port COM1 on Windows 7 x64. WinLIRC is added to Startup folder (Start-All applications-Startup) so it starts every time I log in. Very often (but not all the time) I see initialization error messages from WinLIRC, which continue for some time (couple of minutes) if I retry initialization, and after some retries it initializes correctly and works fine. If I remove it from Startup and start manually at any other moment it starts without errors. I've downloaded WinLIRC sources and added MessageBox calls here and there so I can see what happens during initialization and found out that CreateFile call fails: if((hPort=CreateFile( settings.port,GENERIC_READ | GENERIC_WRITE, 0,0,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,0))==INVALID_HANDLE_VALUE) { char buffer[256]; sprintf_s(buffer, "CreateFile(%s) failed with %d", settings.port, GetLastError()); MessageBox(NULL, buffer, "debug", MB_OK); hPort=NULL; return false; } I see message box saying "CreateFile(COM1) failed with 5", and 5 is an error code for "Access denied" error according to this link. So the question is why opening COM-port can fail with such error right after booting Windows and proceed normally few seconds or minutes later?

    Read the article

  • COM port cannot be opened in asp.net

    - by Pandiya Chendur
    I following this article for sending SMS it is a winform application.. I have referenced all the Dll's to my asp.net application..... I use an aspx page to detect a mobile device connected to a PC..... But it alwys shows COM 'n' Port could not be opened..... using SMS; using GsmComm.GsmCommunication; using GsmComm.PduConverter; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { GsmCommMain comm = new GsmCommMain(6, 9600, 300); comm.Open(); if (!comm.IsConnected()) { Response.Write("No Phone Connected"); } else { SmsSubmitPdu pdu = new SmsSubmitPdu("test", "+919999999999", ""); CommSetting.comm.SendMessage(pdu); } } }

    Read the article

  • How to use Event notification in Solaris 10 when a directory change

    - by user357594
    I read the following page: Robert Benson's article on ECF developers.sun.com/solaris/articles/event_completion.html I also read the Solaris man pages but they are not very clear of how to use event notifications for directories. For example, If I add a new file into a directory, I would like to get some notification of that event. I found this link: blogs.sun.com/praks/entry/file_events_notification Which has what I need but it is for Solaris 11 ( which is not in the market yet). Based on the link below, I don't want to use poll because I want to get the performance advantage of events. blogs.sun.com/dap/entry/event_ports_and_performance Any suggestion is highly appreciated! -Armando.

    Read the article

  • Android USB Host Communication

    - by Kip Russell
    I'm working on a project that utilizes the USB Host capabilities in Android 3.2. I'm suffering from a deplorable lack of knowledge and talent regarding USB/Serial communication in general. I'm also unable to find any good example code for what I need to do. I need to read from a USB Communication Device. Ex: When I connect via Putty (on my PC) I enter: >GO And the device starts spewing out data for me. Pitch/Roll/Temp/Checksum. Ex: $R1.217P-0.986T26.3*60 $R1.217P-0.986T26.3*60 $R1.217P-0.987T26.3*61 $R1.217P-0.986T26.3*60 $R1.217P-0.985T26.3*63 I can send the initial 'GO' command from the Android device at which time I receive an echo of 'GO'. Then nothing else on any subsequent reads. How can I: 1) Send the 'go' command. 2) Read in the stream of data that results. The USB device I'm working with has the following interfaces (endpoints). Device Class: Communication Device (0x2) Interfaces: Interface #0 Class: Communication Device (0x2) Endpoint #0 Direction: Inbound (0x80) Type: Intrrupt (0x3) Poll Interval: 255 Max Packet Size: 32 Attributes: 000000011 Interface #1 Class: Communication Device Class (CDC) (0xa) Endpoint #0 Address: 129 Number: 1 Direction: Inbound (0x80) Type: Bulk (0x2) Poll Interval (0) Max Packet Size: 32 Attributes: 000000010 Endpoint #1 Address: 2 Number: 2 Direction: Outbound (0x0) Type: Bulk (0x2) Poll Interval (0) Max Packet Size: 32 Attributes: 000000010 I'm able to deal with permission, connect to the device, find the correct interface and assign the endpoints. I'm just having trouble figuring out which technique to use to send the initial command read the ensuing data. I'm tried different combinations of bulkTransfer and controlTransfer with no luck. Thanks. I'm using interface#1 as seen below: public AcmDevice(UsbDeviceConnection usbDeviceConnection, UsbInterface usbInterface) { Preconditions.checkState(usbDeviceConnection.claimInterface(usbInterface, true)); this.usbDeviceConnection = usbDeviceConnection; UsbEndpoint epOut = null; UsbEndpoint epIn = null; // look for our bulk endpoints for (int i = 0; i < usbInterface.getEndpointCount(); i++) { UsbEndpoint ep = usbInterface.getEndpoint(i); Log.d(TAG, "EP " + i + ": " + ep.getType()); if (ep.getType() == UsbConstants.USB_ENDPOINT_XFER_BULK) { if (ep.getDirection() == UsbConstants.USB_DIR_OUT) { epOut = ep; } else if (ep.getDirection() == UsbConstants.USB_DIR_IN) { epIn = ep; } } } if (epOut == null || epIn == null) { throw new IllegalArgumentException("Not all endpoints found."); } AcmReader acmReader = new AcmReader(usbDeviceConnection, epIn); AcmWriter acmWriter = new AcmWriter(usbDeviceConnection, epOut); reader = new BufferedReader(acmReader); writer = new BufferedWriter(acmWriter); }

    Read the article

  • Manually closing a port from commandline

    - by codingfreak
    Hi I want to close an open port which is in listening mode between my client and server application. Is there any manual command line option in Linux to close a port ?? NOTE: I came to know that "only the application which owns the connected socket should close it, which will happen when the application terminates." I dont understand why it is only possible by the application which opens it ... But still eager to know if there is any another way to do it ??

    Read the article

  • python sending incomplete data over socket

    - by tipu
    I have this socket server script, import SocketServer import shelve import zlib class MyTCPHandler(SocketServer.BaseRequestHandler): def handle(self): self.words = shelve.open('/home/tipu/Dropbox/dev/workspace/search/words.db', 'r'); self.tweets = shelve.open('/home/tipu/Dropbox/dev/workspace/search/tweets.db', 'r'); param = self.request.recv(1024).strip() try: result = str(self.words[param]) except KeyError: result = "set()" self.request.send(str(result)) if __name__ == "__main__": HOST, PORT = "localhost", 50007 SocketServer.TCPServer.allow_reuse_address = True server = SocketServer.TCPServer((HOST, PORT), MyTCPHandler) server.serve_forever() And this receiver, from django.http import HttpResponse from django.template import Context, loader import shelve import zlib import socket def index(req, param = ''): HOST = 'localhost' PORT = 50007 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) s.send(param) data = zlib.decompress(s.recv(131072)) s.close() print 'Received', repr(data) t = loader.get_template('index.html') c = Context({ 'foo' : data }) return HttpResponse(t.render(c)) I am sending strings to the receiver that are in the hundreds of kilobytes. I end up only receiving a portion of it. Is there a way that I can fix that so that the whole string is sent?

    Read the article

  • php open_socket

    - by sea_1987
    Hello, I am trying to open a socket to use with secure tradings xpay api, however when I check to see if the socket is open I get error returned, Can't assign requested address I need to open up 127.0.0.1:5000 is there something wring with my code that means I cannot do this? if (isset($xpay_port) and ($socket=socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) and (socket_connect($socket, $address, $port))) { $text="Connection successful on IP $address, port $port"; socket_close($socket); } else $text="Unable to connect<pre>".socket_strerror(socket_last_error())."</pre>"; echo "<html><head></head><body>". $text. "</body></html>";

    Read the article

  • writing to an ioport resulting in segfaults...

    - by Sniperchild
    I'm writing for an atmel at91sam9260 arm 9 cored single board computer [glomation gesbc9260] Using request_mem_region(0xFFFFFC00,0x100,"name"); //port range runs from fc00 to fcff that works fine and shows up in /proc/iomem then i try to write to the last bit of the port at fc20 with writel(0x1, 0xFFFFFC20); and i segfault...specifically "unable to handle kernel paging request at virtual address fffffc20. I'm of the mind that i'm not allocating the right memory space... any helpful insight would be great...

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >