Re: Initial connection of Socketed components

Tech-Archive recommends: Speed Up your PC by fixing your registry



There's no one answer to how to determine the address (in fact, there's
seldom a really great answer in any specific arrangement). When will the
address be assigned to the device and by whom? If this is something that
will be going through the IT department, they'll generally assign an
address, statically, and that will be the address of the device until
further notice. If that's the case, you might simply have a little central
repository somewhere which the PCs can query to translate a name into the
IP. For that matter, you might even have a DNS server that is local to the
network and tell it that, hey, this device, called whatever
(gaschromo1.mynetwork.org), is assigned this address. Then, you can just
use gethostbyname(), the standard socket call, on the PC to get the IP
address via DNS (your local DNS server would have to be in the list of DNS
servers for the PC, of course).

You could, if you want to, arrange for some broadcast method of getting all
of the device IPs in your area from the PC. You could do this with a
multicast group, too, if you wanted to. The PC could send a multi-cast
packet to a given group which each of the Windows CE devices would join on
startup and, when they received such a packet, they could individually
connect to a well-known port on the PC and send it their information.

Universal Plug-and-Play is another way that you might be able to do device
discovery. It's a COM-based protocol, though, so it doesn't mesh well with
managed code, at this point. But, you could use it, from a C++ program on
the PC, to discover the devices and then build a list in a local database on
the PC (or a text file, if you want), which your managed code could then
access to get a device list for presentation to the user (assuming that the
PC user will select which device to use and what to do with it).

If you have a network, of any size, then you *do* have a LAN. That is, if
my PC is connected to a hub, I have a LAN, even if there's nothing else
plugged into the hub (it's not a highly useful network, maybe). If you add
one of your devices by plugging it into the hub, you still have a LAN and
your PC and the device can communicate with one another. Sockets will work
fine in that situation.

Paul T.

"John Olbert" <someone@xxxxxxxx> wrote in message
news:822C8989-3871-4AF5-ACB6-681DF949F199@xxxxxxxxxxxxxxxx
>I am new to both sockets and Netcf.
>
> My task is to move an instrument controller module (called an ICE
> implemented on a ICE.dll) down into a Pcb that supports Netcf. At present
> at
> the Desktop level it uses Remoting to communicate with another
> application.
>
> After reading various articles, the Msdn and this newsgroup I believe that
> Sockets would be a good choice for us since Remoting is not supported on
> the
> Netcf.
>
> We manufacture analytical instruments for chemists (ICP's, Atomic
> Absorption
> spectrometers, etc). Each will include a WinCe with an ICE to control it.
>
> There can be 1 to N ICE's on each Pcb (though it will usually be 1). All
> ICE's are controlled by a central component called the MIM (implemented as
> MIM.dll).
>
> The ICE's will only communicate with the MIM not with other ICE's.
>
> I have created feasibility Apps that connect a desktop App to a Compact
> App
> using sockets. When I do this I determine the Ip address manually. Since
> the
> Ip on the setup I have is assigned by the local Lan box (a LinkSys box) it
> may vary depending on startup sequence. Also the desktop will vary for the
> same reason. Furthermore, in actual operation a User may not use a LinkSys
> but have his desktop connected to a company Lan. In some other cases there
> may be no Lan at all. Just the desktop and the instrument.
>
> The question is how do I determine the Ip of the ICE running on a WinCe
> Pcb
> from the desktop without privous knowledge? How does the destop and WinCe
> pcb's intially connect up? Do you use a general broadcast of some sort. Is
> there a way to set the ICE running on the WinCe Pcb from the desktop at
> power
> on, keeping in mind that it can't be the same Ip for each Pcb since the
> MIM
> could be connected to 1 to N ICE's on 1 to M WinCe Pcb's.
>
> Also again how do you handle the situation where there is no Lan, just a
> desktop, a hub and 1 to N ICE's on 1 to M WinCe Pcb's?
>
> Appreciate any help, suggestions or code samples.
>
> --John
>
>
>
> --
> John Olbert
>


.



Relevant Pages

  • Re: Initial connection of Socketed components
    ... sockets don't support high-level abstractions over themselves. ... On team would like the ICE's and the MIM to run on either Netcf or Net. ... > on the desktop as well as on the WinCe pcb? ... >> my PC is connected to a hub, I have a LAN, even if there's nothing else ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Socket communication on multihomed box
    ... LAN route before USB ... as for sockets, I'm using native syscalls, not MFC. ... Another thing is that is should work both under Linux and Windows. ...
    (microsoft.public.win32.programmer.networks)
  • Re: TclTk on WindowCE
    ... long ago) WinCE 3.0. ... Support for native menus and sockets have been fully rewritten to be much more complete, and they are actually the only parts of eTcl requiring WM2003 or better. ...
    (comp.lang.tcl)
  • Re: How to locate a PC running a know service?
    ... If you're using a named pipe, ... If you're using sockets, but you're on a local network, the ... simplest way is to have the service do a UDP broadcast message saying "Here I am", ... And you could also use mailslots in a LAN in the same domain. ...
    (microsoft.public.vc.mfc)
  • Re: Transfering pictures between applications on LAN
    ... The easiest one since it is a LAN, is to share a folder on the destination ... computer, give proper rights, and save the file there from source computer. ... If that is not possible, you can use sockets, .NET remoting, e-mail ...
    (microsoft.public.dotnet.languages.vb)