IP address on LAN through a wireless router. CarPC project
-
Hi, I have writen my own front-end for a carPC project and for a final touch I thought I would have an option to wirelessly update the MP3 shared folder on my PC when I am in the driveway. Right, what I have done is set my home PC to a static IP address of '192.168.0.136' and a shared folder called 'mp3' Here is a small bit of code demonstating what I want to do... strHubComputerIP = "192.168.0.136" strHubComputerMp3Folder = "mp3" strRemoteDirectory = New DirectoryInfo("\\" & strHubComputerIP & "\" & strHubComputerMp3Folder & "\") If strRemoteDirectory.Exists Then............ this works fine, but if I change the IP address to "192.168.0.135" or the 'hub' computer is off (the IP address can't be seen), the computer hangs for 2 minutes. For example, if I pull into my drive and want to update, but my home PC is off, I don't want the computer in the car to hang. I want it to tell me that the IP address isn't found. Hope someone can help, I've been working on my front-end for a year now as I've been saving up for the hardware. This is the last bit I need to sort out, then I can build the machine :)
-
Hi, I have writen my own front-end for a carPC project and for a final touch I thought I would have an option to wirelessly update the MP3 shared folder on my PC when I am in the driveway. Right, what I have done is set my home PC to a static IP address of '192.168.0.136' and a shared folder called 'mp3' Here is a small bit of code demonstating what I want to do... strHubComputerIP = "192.168.0.136" strHubComputerMp3Folder = "mp3" strRemoteDirectory = New DirectoryInfo("\\" & strHubComputerIP & "\" & strHubComputerMp3Folder & "\") If strRemoteDirectory.Exists Then............ this works fine, but if I change the IP address to "192.168.0.135" or the 'hub' computer is off (the IP address can't be seen), the computer hangs for 2 minutes. For example, if I pull into my drive and want to update, but my home PC is off, I don't want the computer in the car to hang. I want it to tell me that the IP address isn't found. Hope someone can help, I've been working on my front-end for a year now as I've been saving up for the hardware. This is the last bit I need to sort out, then I can build the machine :)
Just incase anyone was going to answer this question, I have found a way of doing it. Instead of using IP address, I use 'computer name' strHubComputerName = "main-computer" strHubComputerMp3Folder = "mp3" strRemoteDirectory = New DirectoryInfo("\\" & strHubComputerName & "\" & strHubComputerMp3Folder & "\") If strRemoteDirectory.Exists Then............ This only hangs for 2 seconds if the 'folder' isn't found. This is far better.