I planned to do things today, productive things. Clean the house, have a shower, do some SCL compatibility reports, but no. What seemed to be a simple idea had to just be off-the-wall-insanely-hard. I sort of achieved my goal though, so at least there's that.
The concept:
Windows ActiveSync doesn't install on Windows 7, and Sync Centre is only compatible with Windows CE Professional+ devices. Windows 7 is coming to an end so I wanted to torture myself with it one more time before I start seriously torturing myself with Windows 10 instead, and keep Windows 7 as a happy, fluffy, compatibility backup. I want to make my unsupported Casio A11 on CE 2.0 do something useful with my Panasonic Toughbook CF-53.
First thing to know, the Toughbook is awesome. Look it up if you don't know what it is. Mine is from 2011, has support from XP up to 10 and it still has a built-in RS-232 port, PCMCIA slot, and ExpressCard slot. In fact, you can STILL get these features on Toughbooks today to the best of my knowledge.
(I digress, sorry for the pitch
)
So I hook my A11 up to the Toughbook with the serial cable. Not too bad. And I struggle and struggle to get PPP working. If anyone can offer me some insight as to why I failed, please do help me out with this! This is a little bit abridge for brevity but what I can say is that I figured the following out:
On Windows 7:
- In device manager, select "Install Legacy Hardware" and install a new modem, "Communications cable between two computers"
(set it up in my case COM1, 115200 max baud rate, 8 bits, no parity, 1 stop bit
)
- Network and Sharing centre -> Change adapter settings -> File -> New incoming connection
- Selected my user and "Guest", next, dial-up modem
(communications cable...
), next, IPv4 settings check all boxes and use DHCP
- Right click the incoming connections connection and hit "Properties"
- In the Users tab click "Always allow directly connected devices such as handheld computers to connect without providing a password"
(I think this may be the problem but I don't know
) and click OK.
On the HPC:
- New remote connection -> direct connection to computer
(I think this is the problem, related to the Win7 config. In this setting I can't specify a username/password/domain. If I dial up to the computer I can authenticate as a user. So how do I authenticate on a direct connection to the computer OR how do I get the computer to pretend to be a modem talking to itself?
)
- TCP/IP Settings, ensure SLIP is unchecked as Windows 7 dropped support for SLIP. Use software compression is checked, Use IP header compression is checked. Server assigned IP address is checked. Server-assigned addresses is checked in the Name Servers tab
Connecting yields a "connection" however no IP address gets assigned, and this connection is utterly useless. I can't find any way to talk to or connect to anything on my computer or my network. So I turn my attention to using the HPC as a terminal instead of a network device.
This is where it gets interesting. I am very used to working in a command environment under Linux. I have some experience in DOS shell and extremely little experience in powershell. Near as I can tell it is impossible to open a COM port as a read/write TTY for powershell or CMD directly.
First barrier is figuring out that the built in Terminal program on CE 2.0 wants to dial in. So the settings I found that worked:
- Configure modem connection. Under device properties -> port settings, check the "Manual Dial
(user supplies dial strings
)" option, as well as "Use terminal window after dialing". Ensure serial settings match your computer.
- Under emulation, pick VT100 emulation, US-ASCII
(or auto
), Local echo, CR->CR/LF Outbound, pick automatic scrolling as you like.
- Put any dummy number into the number to dial field.
I was able to connect via PuTTY and send text back and forth between the machines, but that's hardly useful. This is where the digging starts.
Firstly, I thought about bridging the STDOUT from the PuTTY COM port session to the STDIN of a different PuTTY SSH session, however that seems to be impossible. Then I found Windows EMS
(emergency management services
) which was very promising as it literally makes a COM port into a console port for Windows, but that only works on Windows Server! GRRR! Then I start looking at plink, but I still don't see how to open a serial port for read-write access. The key for me came with cygwin. It's not beautiful, but it's functional. In cygwin, you only have to type one well-crafted command, and suddenly I now have the ability to interact with Windows from a bash prompt:
bash <> /dev/ttyS0 >&0 2>&0
I find this both silly and really exciting, with the prospect of Linux subsystem for Windows in Windows 10 offering bash support
(in Windows 7 you can only get csh or ksh in the Unix subsystem
) I will be revisiting my efforts in Windows 10.
Now, it's not beautiful looking. Specifically, at the end of every line there is the character sequence "0;~". Not sure why. But hey, it works. I can do things on my Windows 7 computer from my HPC. Success!
I pose the question to anyone in the forum. Do you know of a way to achieve this using only the built-in Windows 7 cmd or powershell or other utilities? Mayyyyybe Putty? I certainly don't! This pretty much took me all day to achieve.
I hope this wasn't too confusing! Let me know if you need any help trying this out!