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

Going online via SLIRP

Karpour Page Icon Posted 2020-05-27 12:16 AM
#
Avatar image of Karpour
Subscribers
H/PC Philosopher

Posts:
439
Location:
Austria
Status:
Another day, another experiment.

Here's my setup:

Handheld PC (any really) connected via rs232-to-usb converter to my windows PC. The serial port is forwarded to a VM running the latest Debian version.

On Debian, I installed SLIRP.

Starting SLIRP with
 
slirp -P "tty /dev/ttyS0" -b 115200 


And setting up a new connection using remote networking on my Jornada 720, 115200 baud, tried every configuration of compression/etc. Nothing happens, HPC is stuck trying to connect.
One thing that could be an issue is that Windows computers - before initializing a SLIP connection - send "CLIENT" and wait to receive "CLIENTSERVER" before proceeding with the connection.

According to the SLIRP manpage:

Quote
MS_DCC

This isn't an option, its a compile time choice, and its a hack. If
enabled, when slirp is run and PPP is selected, while the PPP link
is down, SLIRP will respond to an incoming word of "CLIENT" with the
reply "CLIENTSERVER"

This will allow a MS windows PC to connect to slirp using direct
cable connect (Over the serial port at least).

It has 1 major advantage over using a normal DCC, and that is that
the IP address of the connecting host is masqueraded. (Which windows
won't do normally)


Not sure if the SLIRP I have is compiled with that option.

I made a little test program that listens for CLIENT and replies CLIENTSERVER, and indeed, after that the Jornada sends some garbled mess which are hopefully SLIP packets.

 
PS C:\Users\Thomas\Code\serialport-test> ts-node index.ts
IN: CLIENT
OUT :CLIENTSERVER
IN: ~?}#?!}!}!} }.}"}&} } } } }'}"}(}"p4~
 Top of the page
Jake Page Icon Posted 2020-05-27 1:49 AM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,812
Location:
Choking on the stench of ambition in Washington DC
Status:
Perhaps move away from SLIRP, and set up a typical MochaPPP setup on on J's Remote Networking. Using the USB-Serial connection, try this script:

#!/bin/sh
iptables -t nat -A POSTROUTING -o "wlp1s0" -j MASQUERADE
sleep 1
while [ 1 ]
do
/usr/sbin/pppd /dev/ttyUSB0 38400 172.16.96.10:172.16.96.11 proxyarp local noauth silent nodetach ktune ms-dns 192.168.1.1

done

This assumes several things: 1) you have a /dev/ttyUSB0 2) 172.16.96.10:172.16.96.11--these addresses are free 3) your DNS is 192.168.1.1 4) wlp1s0 is the read-out of ipconfig

Perhaps your /dev/ttyS0 will work, but for testing purposes, try dumbing everything down to 38400.

I'm getting on-line using this script with a HP 200lx, and if I could just find my J's serial cable, I bet it would work as well w/ the J.

Jake
 Top of the page
Karpour Page Icon Posted 2020-05-27 9:55 AM
#
Avatar image of Karpour
Subscribers
H/PC Philosopher

Posts:
439
Location:
Austria
Status:
Thank you, that Is very helpful info!

I don't know too much yet about these things, but I'm learning quickly!
So the Jornada 720 has an option in remote networking to "Use SLIP" in the remote networking connection settings. So I assume by default it uses PPP over serial.

My 320lx has no such setting, so I'm not really sure what it uses then by default? SLIP or PPP?

I'll try your script soon, just wondering: How does it deal with the CLIENT -> CLIENTSERVER part? Does pppd do that automatically?
 Top of the page
Jake Page Icon Posted 2020-05-27 1:41 PM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,812
Location:
Choking on the stench of ambition in Washington DC
Status:
This is what I would do--get the J720 working with MochaPPP on Windows *. Once you know that you get on-line that way, your client setup is safe, so you just have to worry about the Linux side.

Jake

Edit: also, make certain you have ppp installed in Linux.

Edited by Jake 2020-05-27 1:43 PM
 Top of the page
Karpour Page Icon Posted 2020-05-27 11:58 PM
#
Avatar image of Karpour
Subscribers
H/PC Philosopher

Posts:
439
Location:
Austria
Status:
MochaPPP works like a charm! Now I can finally read Hacker news on my 320lx!



(EZDyrBPWsAAViPw.jpg)



Attachments
----------------
Attachments EZDyrBPWsAAViPw.jpg (198KB - 0 downloads)
 Top of the page
Jake Page Icon Posted 2020-05-28 12:25 AM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,812
Location:
Choking on the stench of ambition in Washington DC
Status:
Great. Now with the same Mocha specs in your HPC's Remote Networking, you should be able to do the same in Linux with my script and usb-serial cable. I run that script in a headless Raspberry Pi/portable li-ion phone charger--it essentially make the Pi into a wifi card for the 200lx.

Jake
 Top of the page
zeroeth Page Icon Posted 2020-07-19 3:41 AM
#
Avatar image of zeroeth
H/PC Newbie

Posts:
4
Location:
United States
Status:
This is great stuff.
 Top of the page
Jump to forum:
Seconds to generate: 0.171 - Cached queries : 63 - Executed queries : 11