Apple iPad Pro: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "==References== [https://hackernoon.com/ipad-pro-for-web-developers-5883e48dd2df iPad Pro for web developers]")
 
 
(63 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>iPad Pro for web developers</code>
Textastic ($9.99)
Working copy (Free — $15.99 for pro version) √
Terminus (Free — $6.99/montly for Pro features) √
Blink Shell($19.99) √
Prompt 2 ($15.99)
==Raspberry Pi Imager==
<source lang="bash">
wget -cq https://downloads.raspberrypi.org/imager/imager_1.8.3_amd64.deb -P ${HOME}/Downloads
sudo apt install ${HOME}/Downloads/imager_1.8.3_amd64.deb
rm  -rf          ${HOME}/Downloads/imager_1.8.3_amd64.deb
sudo apt --fix-broken install
sudo apt install -f
</source>
==Raspberry Pi02W==
<source lang="bash">
sed -z "s|rootwait|modules-load=dwc2,g_ether rootwait|" -i /media/${USER}/system-boot/cmdline.txt
echo 'dtoverlay=dwc2,dr_mode=peripheral'                >> /media/${USER}/system-boot/config.txt
tee -a /media/${USER}/system-boot/network-config >/dev/null <<EOF
ethernets:
  usb0:
    link-local: [ ipv4 ]
EOF
</source>
For this case '''Type-C » Micro-USB''' cable required. In this case please connect '''Micro-USB''' port '''2nd Micro-USB''' female port instead of power port as because '''2nd Micro-USB''' is an '''OTG Micro-USB'''.
<source lang="bash">
sudo apt install net-tools
ifconfig -v usb0|grep inet
arp -a -i  usb0
</source>
==Raspberry Pi4B==
<source lang="bash">
sed -z "s|rootwait|modules-load=dwc2,g_ether rootwait|" -i\
/media/${USER}/system-boot/cmdline.txt
echo 'dtoverlay=dwc2,dr_mode=peripheral'>>\
/media/${USER}/system-boot/config.txt
tee -a /media/${USER}/system-boot/network-config >/dev/null <<EOF
ethernets:
  usb0:
    link-local: [ ipv4 ]
EOF
</source>
For this case '''Type-C » Type-C''' cable required. Please connect one of the end to power port of '''Raspberry Pi4B''' as because it's an '''OTG Port'''.
<source lang="bash">
sudo tee /etc/netplan/20-ethernet-usb.yaml >/dev/null <<EOF
network:
  version: 2
  ethernets:
    usb0:
      link-local: [ ipv4 ]
EOF
sudo chmod 600 /etc/netplan/*.yaml
sudo netplan try
sudo apt install linux-modules-extra-raspi
sudo apt install openvswitch-switch-dpdk
sudo netplan try && sudo netplan apply
</source>
<source lang="bash">
REMAIN_AFTER_FIND='RemainAfterExit=yes'
REMAIN_AFTER_FILL=$(cat <<EOF
RemainAfterExit=yes\n\
TimeoutStartSec=30sec
EOF
)
sudo sed -z "s|${REMAIN_AFTER_FIND}|${REMAIN_AFTER_FILL}|"\
-i /lib/systemd/system/systemd-networkd-wait-online.service
sudo systemctl daemon-reload
sudo systemctl restart  systemd-networkd-wait-online.service
</source>
<source lang="bash">
sudo apt install net-tools
ifconfig -v usb0|grep inet
arp -a -i  usb0
</source>
==Raspberry Pi5B==
<source lang="bash">
:<<EOC
sed -z "s|rootwait|modules-load=dwc2,g_ether rootwait|" -i\
/media/${USER}/bootfs/cmdline.txt
echo 'dtoverlay=dwc2,dr_mode=peripheral'>>\
/media/${USER}/bootfs/config.txt
tee -a /media/${USER}/bootfs/network-config >/dev/null <<EOF
ethernets:
  usb0:
    link-local: [ ipv4 ]
EOF
EOC
</source>
==Ubuntu Desktop==
<source lang="bash">
ssh ${USER}@chorke.local
sudo apt install ubuntu-desktop
sudo apt install tigervnc-standalone-server
sudo tee -a /etc/tigervnc/vncserver.users >/dev/null <<EOF
:2=${USER}
EOF
vncpasswd
:'
Password: ********
Verify: ********
Would you like to enter a view-only password (y/n)? n
'
</source>
<source lang="bash">
tee ${HOME}/.vnc/xstartup >/dev/null <<'EOF'
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources
vncconfig -iconic &
gnome-session
EOF
chmod +x ${HOME}/.vnc/xstartup
sudo systemctl status tigervncserver@:2
sudo systemctl enable --now tigervncserver@:2
</source>
==Playground==
<source lang="bash">
df -h | grep /media
sudo umount  /media/<user-id>/<disk-id>
sudo eject  /dev/sda
udisksctl unmount -f -p /dev/sda1
udisksctl unmount    -b /dev/sda1
sudo eject              /dev/sda
udisksctl power-off  -b /dev/sda
</source>
==References==
==References==
[https://hackernoon.com/ipad-pro-for-web-developers-5883e48dd2df iPad Pro for web developers]
{|
| valign="top" |
* [https://support.apple.com/en-my/HT209434 Request & Activate Titanium Apple Card]
* [https://medium.com/macoclock/the-best-accessory-for-your-ipad-pro-the-raspberry-pi-4-3269c98498f6 Raspberry Pi 4 as iPad Pro Accessory]
* [https://marcelwiget.blog/2018/12/02/tether-rpi-to-ipad-pro-via-ethernet-over-usb-c Pi Zero from iPad Pro over Type-C]
* [https://www.raspberrypi.org/blog/connect-your-raspberry-pi-4-to-an-ipad-pro Raspberry Pi 4 to an iPad Pro]
* [https://hackernoon.com/ipad-pro-for-web-developers-5883e48dd2df iPad Pro for Web Developers]
* [https://www.reddit.com/r/raspberry_pi/comments/f1j5zu/pi_vs_code_ipad_pro VSCode in iPad Pro by Pi4]
* [https://medium.com/sausheong/setting-up-a-raspberry-pi-4-as-an-development-machine-for-your-ipad-pro-3813f872fccc Pi4 as a iPad Pro Gadget]
* [https://support.apple.com/en-my/HT211155#:~:text=Add%20Apple%20Card%20to%20your%20iPad iPad Pro add Apple Card]
* [https://www.freshblurbs.com/blog/2019/05/27/iPad-Coding-Docker-Golang.html Turn iPad Pro to a IDE]
* [https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget Pi4 USB-C Gadget]
 
| valign="top" |
* [https://support.apple.com/en-us/HT210380 iPad as a second display for MacBookPro]
* [https://medium.com/@ow/its-finally-possible-to-code-web-apps-on-an-ipad-pro-90ad9c1fb59a Develop web apps on an iPad Pro]
* [https://hub.docker.com/r/linuxserver/code-server Code Server By Docker Container]
* [https://elinux.org/RPiconfig Raspberry Pi 4 <code>config.txt</code>]
* [https://secure2.store.apple.com/my/shop/order/list Apple Shipping Self Service]
* [https://www.raspberrypi.com/documentation/computers/configuration.html The <code>raspi-config</code> Tool]
* [https://magpi.raspberrypi.com/articles/how-to-overclock-raspberry-pi-4 Overclock Raspberry Pi 4]
* [https://developer.apple.com/support/code-signing/ Developer Code Signing]
* [[VS Code on iPad Pro]]
* [https://github.com/cdr/code-server/releases Code Server]
 
| valign="top" |
* [https://techcraft.co/videos/2022/5/raspberry-pi-ipad-pro-setup-simplified/ iPad Pro 11" G1 » RPi4 » Ubuntu » Simplified Setup]
* [https://techcraft.co/videos/2022/4/ubuntu-desktop-on-ipad-raspberry-pi-4-setup/ iPad Pro 11" G1 » RPi4 » Ubuntu » Desktop Setup]
* [https://github.com/techcraftco/rpi-usb-gadget/ iPad Pro 11" G1 » RPi4 » Ubuntu » USB Gadget]
* [https://danmunozd.medium.com/connect-raspberry-pi-w-ipad-pro-over-usb-88d70828cb00 iPad Pro 11" G1 » RPi0 » Ubuntu » Setup]
* [https://stackoverflow.com/questions/77352932/ <code>ovsdb-server.service</code> not found!]
* [[Linux Virtual Display for iPad Pro]]
* [https://www.pshinecable.com/article/what-are-the-differences-between-usb-pd3-1-and-usb-pd2-0-pd3-0.html PD » 1.0 » 2.0 » 3.0 » 3.1]
* [https://www.avast.com/c-thunderbolt-vs-usb-c Thunderbolt vs. USB-C]
* [[Thunderbolt]]
* [[X11VNC]]
 
|-
| colspan="3" |
----
|-
| valign="top" |
* [https://forums.raspberrypi.com/viewtopic.php?t=360226 RPi5 » OTG <code>g_ether</code> is not working]
* [https://www.jeffgeerling.com/blog/2023/reducing-raspberry-pi-5s-power-consumption-140x RPi5 » Reducing 140x power usages]
* [https://github.com/raspberrypi/bookworm-feedback/issues/77 RPi5 » <code>dwc2 overlay</code> fails]
* [https://www.raspberrypi.com/documentation/computers/raspberry-pi-5.html RPi5 » Documentation]
* [https://www.raspberrypi.com/documentation/computers/config_txt.html RPi5 » Config Text]
* [https://www.raspberrypi.com/documentation/computers/os.html RPi5 » OS]
 
| valign="top" |
 
| valign="top" |
 
|}

Latest revision as of 19:28, 15 December 2023

iPad Pro for web developers

Textastic ($9.99)
Working copy (Free — $15.99 for pro version) √
Terminus (Free — $6.99/montly for Pro features) √
Blink Shell($19.99) √
Prompt 2 ($15.99)

Raspberry Pi Imager

wget -cq https://downloads.raspberrypi.org/imager/imager_1.8.3_amd64.deb -P ${HOME}/Downloads
sudo apt install ${HOME}/Downloads/imager_1.8.3_amd64.deb
rm  -rf          ${HOME}/Downloads/imager_1.8.3_amd64.deb
sudo apt --fix-broken install
sudo apt install -f

Raspberry Pi02W

sed -z "s|rootwait|modules-load=dwc2,g_ether rootwait|" -i /media/${USER}/system-boot/cmdline.txt
echo 'dtoverlay=dwc2,dr_mode=peripheral'                >> /media/${USER}/system-boot/config.txt

tee -a /media/${USER}/system-boot/network-config >/dev/null <<EOF
ethernets:
  usb0:
    link-local: [ ipv4 ]
EOF

For this case Type-C » Micro-USB cable required. In this case please connect Micro-USB port 2nd Micro-USB female port instead of power port as because 2nd Micro-USB is an OTG Micro-USB.

sudo apt install net-tools
ifconfig -v usb0|grep inet
arp -a -i   usb0

Raspberry Pi4B

sed -z "s|rootwait|modules-load=dwc2,g_ether rootwait|" -i\
 /media/${USER}/system-boot/cmdline.txt

echo 'dtoverlay=dwc2,dr_mode=peripheral'>>\
 /media/${USER}/system-boot/config.txt

tee -a /media/${USER}/system-boot/network-config >/dev/null <<EOF
ethernets:
  usb0:
    link-local: [ ipv4 ]
EOF

For this case Type-C » Type-C cable required. Please connect one of the end to power port of Raspberry Pi4B as because it's an OTG Port.

sudo tee /etc/netplan/20-ethernet-usb.yaml >/dev/null <<EOF
network:
  version: 2
  ethernets:
    usb0:
      link-local: [ ipv4 ]
EOF

sudo chmod 600 /etc/netplan/*.yaml
sudo netplan try

sudo apt install linux-modules-extra-raspi
sudo apt install openvswitch-switch-dpdk
sudo netplan try && sudo netplan apply
REMAIN_AFTER_FIND='RemainAfterExit=yes'
REMAIN_AFTER_FILL=$(cat <<EOF
RemainAfterExit=yes\n\
TimeoutStartSec=30sec
EOF
)

sudo sed -z "s|${REMAIN_AFTER_FIND}|${REMAIN_AFTER_FILL}|"\
 -i /lib/systemd/system/systemd-networkd-wait-online.service

sudo systemctl daemon-reload
sudo systemctl restart  systemd-networkd-wait-online.service
sudo apt install net-tools
ifconfig -v usb0|grep inet
arp -a -i   usb0

Raspberry Pi5B

:<<EOC
sed -z "s|rootwait|modules-load=dwc2,g_ether rootwait|" -i\
 /media/${USER}/bootfs/cmdline.txt

echo 'dtoverlay=dwc2,dr_mode=peripheral'>>\
 /media/${USER}/bootfs/config.txt

tee -a /media/${USER}/bootfs/network-config >/dev/null <<EOF
ethernets:
  usb0:
    link-local: [ ipv4 ]
EOF
EOC

Ubuntu Desktop

ssh ${USER}@chorke.local
sudo apt install ubuntu-desktop
sudo apt install tigervnc-standalone-server
sudo tee -a /etc/tigervnc/vncserver.users >/dev/null <<EOF
:2=${USER}
EOF

vncpasswd
:'
Password: ********
Verify: ********
Would you like to enter a view-only password (y/n)? n
'
tee ${HOME}/.vnc/xstartup >/dev/null <<'EOF'
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources
vncconfig -iconic &
gnome-session
EOF

chmod +x ${HOME}/.vnc/xstartup
sudo systemctl status tigervncserver@:2
sudo systemctl enable --now tigervncserver@:2

Playground

df -h | grep /media
sudo umount  /media/<user-id>/<disk-id>
sudo eject   /dev/sda

udisksctl unmount -f -p /dev/sda1
udisksctl unmount    -b /dev/sda1
sudo eject              /dev/sda
udisksctl power-off  -b /dev/sda

References