x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Beating my HPC and Windows 7 computer into working together

astrosynthesist Page Icon Posted 2020-01-12 4:49 AM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
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!
 Top of the page
C:Amie Page Icon Posted 2020-01-12 10:09 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
I've got to hand it to you, that's not only the nerdiest thing I've seen around here for a while, but that's pretty smart I certainly never even thought of it.

It doesn't directly address your questions, but what if you out SSH on the other side?

https://www.hpcfactor.com/scl/1050/Andreas_Bischoff/OpenSSH/version_...

That would presumably simplify the interoperability with the Linux subsystem / PowerShell a little and at least you would have access to SCP. We could create a wrapper app and at least offer it as a solution for legacy device data transfers via cable?
 Top of the page
Mjolnir Page Icon Posted 2020-01-12 6:18 PM
#
Avatar image of Mjolnir
Factorite (Elite)

Posts:
210
Location:
United States
Status:
Good work! This looks interesting. My old Win 7 desktop is tore down and in a tote somewhere. May have to dig her back out.
 Top of the page
astrosynthesist Page Icon Posted 2020-01-12 6:27 PM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
Thanks!

The only way I can see SSH and its derivatives working is if we can get TCP (via PPP) working on the HPCs. If anyone around here can tell me what I am missing to get an IP address on my HPC then SSH would almost definitely be an excellent transfer solution!! It's just DHCP and setting a static IP both didn't result in the ability to exchange TCP packets as far as I'm aware.

I might try a few more things today, but if an expert in 90s-era networking is present that would probably be more helpful.
 Top of the page
astrosynthesist Page Icon Posted 2020-01-12 6:28 PM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
If you are currently running a linux or Windows 10 based machine then you should be able to happily experiment with those (and Windows 10 should in fact be friendlier to use than Windows 7 now that you can have a fully featured Linux subsystem installed on it)
 Top of the page
Mjolnir Page Icon Posted 2020-01-12 6:30 PM
#
Avatar image of Mjolnir
Factorite (Elite)

Posts:
210
Location:
United States
Status:
I don't know whether it will help you any but Win 10 seems to have deprecated Putty for OpenSSH. This is off of my Win10 machine:



(OpenSSH.PNG)



Attachments
----------------
Attachments OpenSSH.PNG (52KB - 0 downloads)
 Top of the page
Mjolnir Page Icon Posted 2020-01-12 6:33 PM
#
Avatar image of Mjolnir
Factorite (Elite)

Posts:
210
Location:
United States
Status:
Quote
astrosynthesist - 2020-01-12 6:28 PM

If you are currently running a linux or Windows 10 based machine then you should be able to happily experiment with those (and Windows 10 should in fact be friendlier to use than Windows 7 now that you can have a fully featured Linux subsystem installed on it)
Yeah, I've been running WSL for quite some time.
 Top of the page
astrosynthesist Page Icon Posted 2020-01-12 6:41 PM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
The SSH client/server won't be so important. The big important step is actually having the capability of networking since SSH is a network protocol, it can't be implemented on a raw serial terminal. I already checked, the steps I outlined for Windows 7 networking are still available in Windows 10 with the same results. If you can get a functional IP address on your HPC then SSH is in business!
 Top of the page
Mjolnir Page Icon Posted 2020-01-12 6:49 PM
#
Avatar image of Mjolnir
Factorite (Elite)

Posts:
210
Location:
United States
Status:
Keep us up to date - I know virtually nothing about networking.
 Top of the page
C:Amie Page Icon Posted 2020-01-12 7:18 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,976
Location:
United Kingdom
Status:
The only way you can get an IP address automatically is to assign one manually from the Windows 7 machine to the H/PC using PPP configuration. ActiveSync does this for you, it gives a 192.168.55.100 address to the H/PC during PPP negotiation. If you know that, you can route the Internet via a PPP cradle connection

a la my guide at https://www.hpcfactor.com/support/cesd/c/0018.asp

Linux would use a PPP script, on Windows, if you statically assign the Windows 7 end, I can't recall but it might force the client to be that +1 on the 4th octet
 Top of the page
astrosynthesist Page Icon Posted 2020-01-13 1:10 AM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
Quote
C:Amie - 2020-01-13 5:09 AM

It doesn't directly address your questions, but what if you out SSH on the other side?

https://www.hpcfactor.com/scl/1050/Andreas_Bischoff/OpenSSH/version_...

That would presumably simplify the interoperability with the Linux subsystem / PowerShell a little and at least you would have access to SCP. We could create a wrapper app and at least offer it as a solution for legacy device data transfers via cable?



Unfortunately I have tried setting that SSH program up but unfortunately it references the following readme:
https://www.eskimo.com/~webguy/service/openssh.html
Which says we need to download and install console from the same guy that made the SSH software. Well, that link is dead and wayback machine apparently didn't download the binaries from the guy's old download page.

https://web.archive.org/web/20010801150018/http://www.rainer-keuchel...

I didn't happen to find anything on your site with the search of "console" either...
 Top of the page
astrosynthesist Page Icon Posted 2020-01-13 8:14 AM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
Some progress. I turned sharing my local LAN with the PPP back on in IPv4 settings.

Apparently the graphical connection manager doesn't get to see RAS stuff, but I am in fact getting an IP address I can interact with locally.

Using the procedure above that produces a connection with "Unauthenticated User", an IP address DOES get assigned. I installed OpenSSH and a webserver on my Windows 7 machine that I am connecting the HPC to. I sort-of got SSH installed on my HPC but since I don't have console I can't use SCP. SSH is semi-functional but when I get to the point where I try to make a connection I always get a "read from socket failed, input/output error".

The two things to know:
To see your HPC IP address while it is connected, open a command prompt and type:
netsh raw show portstatus

You will then be able to ping your HPC from command prompt. I was also able to get the HPC to load a webpage from the locally hosted web server (default page and 404/403 errors) on my computer, but ONLY if I turned off Windows Firewall. So I'm getting closer...

For some reason WinCE keeps giving me a message saying "Communications Error, Cannot start communications with the desktop computer. The computer is not available or busy and currently cannot accept connections." shortly after connecting to my laptop. If I ignore the message and keep going the connection stays alive. If I click "Ok" in the top corner of the message, it kills the connection and reconnects. Very strange.

Also weirdly I still can't get off my local PPP network. I tried pinging from another computer on the network to my HPC IP address and the packets disappear... except when the connection drops between my HPC and my computer. Then the ping returns "From [my laptop WLAN IP]: icmp_seq=19 Redirect Network(New nexthop: [my HPC PPP IP])". Strange.

If I can get SSH installed properly on my HPC I *might* be able to at least use it to connect locally to my machine. That'd be good enough because we can pivot from there.
 Top of the page
astrosynthesist Page Icon Posted 2020-01-17 3:47 PM
#
Avatar image of astrosynthesist
Factorite (Junior)

Posts:
42
Location:
Canada
Status:
Update:
Windows 10 with Linux Subsystem for Windows is SO MUCH BETTER than my Windows 7 attempt.
I installed Ubuntu.

The key commands (in my case COM1 is mapped to /dev/ttyS1):
sudo su 
stty -F /dev/ttyS1 115200 cs8 -cstopb -parenb cols 65 rows 24 
exec getty -h -L 115200 ttyS1 vt100 &

Line 1: Get privileges to work with the serial ports
Line 2: Set COM port settings (65 columns and 24 lines with the default large font in the terminal)
Line 3: Create new serial terminal session on COM1

Same settings as above on the HPC, except no local echo, no Outgoing CR->CRLF, yes Incoming CR->CRLF
It's way prettier than my Windows 7 attempt. Very fun!

 Top of the page
pacmania1982 Page Icon Posted 2020-02-19 10:49 AM
#
Avatar image of pacmania1982
Factorite (Junior)

Posts:
31
Location:
United Kingdom
Status:
Dude - great work! I have to admit, I just run a Windows 98SE VM and use a USB to IrDA adapter for all my old handheld PCs.

 Top of the page
Jake Page Icon Posted 2020-02-19 8:34 PM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,826
Location:
Choking on the stench of ambition in Washington DC
Status:
This was a great thread to read through--are you connecting in the hopes of file transfers only, or file transfers along with internet access (similar to the old Mocha)?

I ask because linux's synce will, after some prodding, sync PIM stuff with Win Mobile. The working Linux calendar/contacts was Evolution, if I'm remembering correctly. I never did get around to seeing if it would sync with older CE versions. I was working with Win Mobile in the HTC Shift x9500. The machine would toggle between Linux and Win Mobile.

I also seem to remember that XP's Hyperterminal could be used on later Windows versions, though I haven't done terminal stuff in a long time: https://www.hpcfactor.com/reviews/editorial/on-the-road/

Jake
 Top of the page
Jump to forum:
Seconds to generate: 0.203 - Cached queries : 71 - Executed queries : 11