Okay, finally I "connected" the Iici and Q700 with the Pi Zero W, "PPP UP" in MacPPP but, why can't I surf Internet? I tried Netscape, MacWeb and iCab, no way to go on internet, why?
Hi, I am the owner/author of the blog jeffhacksthings.wordpress.com, I've moved my blog to a full domain name. It is now at
www.retroadventures.net. I've been cleaning things up as I move them, and I found this thread. Anyhow, I'd like to see if I can help you get this working if you are still interested.
To make this work, you will need to know what the device name is for your USB serial adapter. Find that by running this command after you plug in the USB device:
dmesg | grep tty
This should give you a result like this; (note that I have three of them plugged into my Pi, so there are three listed here)
[ 0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.001232] console [tty1] enabled
[ 0.930724] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 2.196881] systemd[1]: Expecting device dev-ttyUSBlower_hub24.device...
[ 2.204180] systemd[1]: Expecting device dev-ttyUSBlower_hub04.device...
[ 2.211368] systemd[1]: Expecting device dev-ttyUSBupper_hub05.device...
[ 2.218448] systemd[1]: Expecting device dev-ttyUSBupper_hub03.device...
[ 4.676395] usb 1-1.2: pl2303 converter now attached to ttyUSB0
[ 4.680188] usb 1-1.3: pl2303 converter now attached to ttyUSB1
[ 4.683907] usb 1-1.4: pl2303 converter now attached to ttyUSB2
The last three lines tell me that I have a pl2303 USB serial adapter mapped to ttyUSB0, ttyUSB1 and ttyUSB2. In most cases, if you only have one, it will be ttyUSB0. We'll use that in our examples.
The next step is to install PPP:
sudo apt-get install ppp
Then you need to configure PPP on your Pi. You should have created a file at /etc/ppp/options.ttyUSB0. Replace the IP addresses with your own.
# /etc/ppp/options.ttyUSB0
noauth
nocrtscts
passive
local
maxfail 0
persist
nodetach
10.101.102.1:10.101.102.2
proxyarp
What you are doing here is setting up a PPP link with two addresses: 10.101.102.1 and 10.101.102.2. The first address here will be assigned to your Pi on the ttyUSB0 device. The second is the address that PPP will be looking for a connection from.
After this, you need to create the PPP service, so you can start pppd on the ttyUSB0 device. Create this file at /etc/systemd/system/rpippp.service:
# /etc/systemd/system/rpippp.service
[Unit]
Description=PPP
[Service]
Type=idle
ExecStart=/usr/sbin/pppd -d /dev/ttyUSB0 57600
Restart=always
[Install]
WantedBy=multi-user.target
Alias=ppp.service
Once this is done, you need to setup the forwarding in iptables: (Here, replace the wlan0 with the name of your network device that is used to get your Pi on the Internet.
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
That should be all of the setup you need on the Pi. Now let's get the Mac configured. To configure the Mac, install MacTCP, MacPPP and MacWeb and configured MacTCP and MacPPP as follows:
MacTCP:
IP address: 10.101.102.2
Obtain Address: Manual
Gateway Address: 10.101.102.1 (PPP address of the Pi)
Subnet Mask: 255.255.255.0
Domain Name Server Information: (Domain name and DNS Server IP Address of your Internet Provider)
MacPPP:
Port: Modem Port
Idle Timeout: None
Echo Interval: Off
Terminal Windows [ ]
Hangup on Close: [X]
Quiet Mode [X]
PPP Server Config:
Port Speed: 57600
Flow Control: None
Tone Dial
Phone Num (blank)
Modem Init (blank)
Modem connect timeout (90) seconds
Back on the Pi, run these commands to start the services: (two commands, one at a time)
sudo systemctl daemon-reload
sudo systemctl enable rpippp.service
That should be it. You should have a working PPP connection and it should forward all of your traffic to the internet via iptables. Try this and let me know what your results are. Come by my new blog site and see the rest of my posts, if you are interested.