Digicom Remote Control for the SRT To operate the SRT remotely, use Remote Desktop; this is available free for Linux, Mac OS-X (from Microsoft), and is included with Windows XP and later. As RD uses a lot of Internet bandwidth, I set up the following. As another way to enable remote operation of the SRT in 26-630, the direct RS-232 connection from the computer to the SRT ground controller box was replaced by a Digicom ethernet to RS-232 interface. With addition of the appropriate software, the computer sees a normal COM port and the data are sent via ethernet TCP/IP to the Digi device which has an RS-232 connection that plugs into the SRT controller. To facilitate all of this a Netgear WGR614 router was placed in 26-630 and connected to the Internet using the IP address of the computer. The computer, the 21cm TV camera and the Digi RealPort device were all connected to the LAN supported by the router. The same IP address serves all three devices and they can exchange data without adding to traffic on the MIT network. The same IP address can also be used to operate the SRT (and view the TV camera picture) over the Internet, say from a computer in 4-361 if the computer has the appropriate software. (Although it is technically possible, there seems to be a consensus that we do not want students to operate the telescope from their dorm rooms.) WiFi signals could be detected in 26-630 from both LNS and MIT access points, but the signals were too weak to be reliable. So, the Netgear was also set up to provide wireless access to the laptops that any SRT users might bring with them. These notes describe how all of that was set up. The Netgear Router A copy of the Netgear manual is available on the this wiki in case you want to read it. Here is how it was set up. When the router first comes out of the box, connect your computer to it with an ordinary ethernet cable plugged into one of the LAN ports (these are the black RJ-45 sockets on the router). Your computer should be set to request an IP address by DHCP. Turn on the router and do whatever it takes to get your computer to renew its IP lease. If you are lucky, the router will assign you an IP address that begins with 192.168.1.?. You should check that. On Windows open a Command Prompt window and type the command prompt> ipconfig If you get back an IP address 192.168.1.x, Netmask 255.255.255.0 and gateway 192.168.1.1, you are good to go. (As a double check, you can try prompt> ping 192.168.1.1 and should get a reply.) If that did not happen, the router probably did not come out of the box ready to use DHCP to give your computer an IP address. You should probably read the Netgear manual for advice, but the following procedure ought to work: set your computer up manually (as if you were giving it a static IP address) with an address 192.168.1.2 and a gateway 192.168.1.1. Then continue as in the next paragraph. SRT Digicom Interface 1 Litster, March 11, 2009
Start a web browser and open the URL http://192.168.1.1. You should get a window asking for a user name and password. Your user name should be admin and the password password. The router should put up a web page the looks like this. You first want to set up the Internet interface for the router with a static IP address, gateway, and DNS server as shown in the figure. (I added a second DNS server 18.70.0.160 that does not show in the picture.) Down the left side of the web page is a menu with a list of things you can do. You will have to do several of them. Here is a list. Wireless Settings (Setup) Wireless Network Name (SSID): Region: Channel: Mode: Security Options Security Encryption (WEP) Authentication Type: Encryption Strength: JLAB-24 United States Auto b and g Choose WEP Automatic 64 bit SRT Digicom Interface 2 Litster, March 11, 2009
Security Encryption (WEP) Key Passphrase: Key 1 leave blank AE19051921 LAN Setup (Advanced) Device Name WGR16v9 LAN TCP/IP Setup IP Address: 192.168.1.1 IP Subnet Mask: 255.255.255.0 Use Router as DHCP Server check this box Starting IP Address: 192.168.1.2 Ending IP Address: 192.168.1.64 Address Reservation IP Address Device Name Mac Address 192.168.1.3 DigiRealPort 00:40:9D:22:97:26 192.168.1.4 21cm-Camera 00:14:29:00:57:C1 192.168.1.6 JLAB-24 Computer 00:08:74:EC:15:B4 Port Forwarding (Advanced) Select Port Forwarding as the service. Services Telnet and HTTP are available from the pull-down menu. Use the Add Custom Service button for the others. Service Name Start Port EndPort Server IP Address Telnet 23 23 192.168.1.3 HTTP 80 80 192.168.1.4 RealPort 771 771 192.168.1.3 Remote Desktop 3389 3389 192.168.1.6 Important: choose Set Password from the Maintenance menu and change it from the default admin. I used jlab24srt. The rest of the settings should work at the default values. Once this has been set up as I did, you can make future changes using the browser on the computer in 26-630 and connecting to 192.168.1.1 or, from the Internet, 18.109.0.104:8080. SRT Digicom Interface 3 Litster, March 11, 2009
The IP Camera I set the IP camera to request an IP address by DHCP. When it is connected to the router and turned on, the router will assign it 192.168.1.4. Because port 80 is forwarded to that LAN address, any browser connections to 18.109.0.104 will connect to the camera s web server. A computer on the LAN may connect to it with a browser at address 192.168.1.4. The camera s administrative user name is admin and the password is jlab24srt. The Digicom RealPort Server Setting up the Digicom ethernet to RS-232 interface is pretty simple. First, hold in the reset button (a ball-point pen works) while you turn on the device s power; Digicom suggests you hold the resent button pressed for at least 30 seconds. That resets everything to the factory defaults. Turn it off, connect it to one of the black ethernet ports on the router, and turn it back on. It will request an IP address by DHCP and the router will assign it 192.168.1.3. You may then connect to it using a web browser from a computer on the LAN at the URL http://192.168.1.3. The device will request a user name and password. The user name is root and the default password is dbps. The device should work with the default settings, but you must change the password from the default to jlab24srt. To do that choose Admin from the menu items at the left of the web page you got when you logged in and then pick the Password submenu. You may want to explore the various menu items to see what else can be changed on the Digi device. If you want to start from scratch and assign the the device a static IP address, the way I did that before getting the router is described in an appendix. The same user name and password can also be used to connect to the device using telnet; because port 23 is forwarded to 192.168.1.3 on the LAN, you can also telnet to the Digi device at 18.109.0.104. Network Setup of the 26-130 Computer This is easy. Just set the network connection to request an IP address and DNS by DHCP (instead of the static addresses it was configured with when it was directly connected to the MIT network). It should work normally. SRT Digicom Interface 4 Litster, March 11, 2009
Setting up a Computer Once the Digi device has been configured, you need to add software to your computer that makes the ethernet connection look like a COM port. For Windows, that is done using a program called Setup32.exe (unless you have a 64-bit processer; then you use Setup64.exe). When you start the setup program you will get a welcome window; click Next to get to the next window: On this window you can make some choices. First, you want to set the number of ports to the number the Digi device provides (we were cheap and bought the one-port version). Your computer may already have some serial ports. Mine has two: COM1 (a real RS-232 port) and COM3 (an internal modem), so the program picked the lowest unused port, COM2. Click the IP radio button and enter the device s IP address. Leave the other things (especially the port 771) at the default values. (If using a firewall, you will need to make sure it does not block port 771.) That completes the setup. Whenever you use COM2, the connection will be over the ethernet to the Digi device and whatever is connected to its RS-232 port. (When running the srt radio telescope program, set COMM 1 in the srt.cat file to COMM 2 so it will use the Digi RealPort (via the LAN) to talk to the telescope.) Note: for the computer in 26-630 the procedure is the same, except the IP address you use for the Digi device should be 192.168.1.3, not 18.109.0.104. If another computer is using the Digi device, if it is turned off, or if the SRT ground controller box is not turned on and plugged into it, any application that tries to open COM2 will fail. SRT Digicom Interface 5 Litster, March 11, 2009
Appendix: Manual Set Up of the Digicom Device This is how to set up manually the Digicom ethernet to RS-232 interface to enable remote operation of the SRT over the internet. It is for the Digi One RealPort (no longer manufactured), but should not be much different for current devices, such as the PortServer TS. Assign Device IP: The first task is to assign an IP address to the Digi device. This normally needs to be done only once and so you can probably skip this part, unless you have forgotten an address that was previously assigned. This procedure will change after we install a router in 26-630. First, reset the Digi device to the factory default settings. To do this, start with the device turned off, then power it up while holding down the reset button. Hold the reset until the PWR LED begins a steady on-off-on-off blinking this could be as long as a minute. There are several different ways to do the following, but here is a way that is simple and works. You will need a cross-over ethernet cable to connect the device to the wired ethernet port on your computer. Make sure this is the only ethernet port that is enabled (i.e., if you have a wireless interface, turn it off). The following assumes that you want the device s IP address to be 18.109.0.104 and are using a Windows XP computer. In the Control Panel open up the LAN for the wired interface you are using and select Properties for the Internet Protocol (TCP/IP) for that interface. Choose the Use the following IP address radio button and set it as in the figure at the left. (You don t really need the DNS entry as the computer will only be talking to the Digi device.) Use the cross-over cable to connect your computer to the ethernet input on the Digi device. SRT Digicom Interface 6 Litster, March 11, 2009
Next, open a Command Prompt window and type the following command: arp -s 18.109.0.104 00-40-9d-22-97-26 The 00-40-9d-22-97-26 should be the MAC address of the Digi device; it can be found on a label on the bottom of the device. Then, still in the Command Prompt window, type the command: ping 18.109.0.104 If you don t get a reply from the device, wait about a minute and try it again. The reply tells you that the IP address of the device has been set. From now on you can configure the device using a web browser. Just type the IP address into the browser s address space. You should do that next in order to change the password. When you try to connect via the browser you will be asked for a user name and a password. The defaults are root and dbps. You will get a window like this: There is a menu down the left side which you may want to explore to see what is possible. The first task is to change the password to something different from the default. From the sub-menu under Admin choose Password and you will get a page that allows you to change the administrator password. SRT Digicom Interface 7 Litster, March 11, 2009
To complete setting up the network for the device, choose Configure->Network from the menu and set the following: Default gateway: 18.109.0.1 Name server: 18.72.0.3 Domain: MIT.EDU My name: JLAB-24 These are set so the device can share the ethernet port with the computer in 26-630; plug the ethernet cable into whichever one you want to use to run the SRT, and connect the controller box to the appropriate RS-232 output. (With this arrangement, the computer will not have an ethernet connection when the Digi device is used to run the telescope.) Click the Submit button, and re-boot the device. When you have finished, be sure to Log Out. In the future, to change the Digi device s configuration (e.g., the IP address) you can do it using a web browser. If you change the IP address, you can reconnect using the new address. The manufacturer s web site is http://www.digi.com/. SRT Digicom Interface 8 Litster, March 11, 2009
Best Remote Method: Both methods have their drawbacks. RD uses a lot of bandwidth and seems buggy. Sometimes the TV camera picture ends up out on the desktop instead of in the browser window. Sometimes the picture shows up in weird colors. All of the files are kept on the computer in 26-630, but you can get them using Secure FX. Using the Digi RealPort, the SRT program and the data files are all on the computer you are using rather than the machine in 26-630. The Internet bandwidth required is small. However, if the net traffic is heavy, sometimes data returned by the ground controller box can be missed. When that happens, the SRT program will hang and lose track of where the antenna is pointing. You can restart the program and the antenna angles will recalibrate by returning to the stow position, but this is time consuming and annoying. I modified the STAMP controller so that it is possible to request that the last motor movement counts be resent, but have not yet modified the SRT program to use this feature. (Requesting any movement of motor 8 will request the data returned by the controller after the most recent real motor movement.) Internet bandwidth and lost data do not seem to be a problem for remote operation from a computer in 4-361, but they can be if you try to run from home and people on your network are playing movies. SRT Digicom Interface 9 Litster, March 11, 2009