arch over g_ether ipad

This forum is for topics dealing with problems with software specifically in the ARMv6h repo.

arch over g_ether ipad

Postby ewge89 » Sun May 26, 2019 12:25 am

hi,

i try to connect my pi Z v1.0 with my Ipad pro over the usb, i found this link https://marcelwiget.blog/2018/12/02/tether-rpi-to-ipad-pro-via-ethernet-over-usb-c/ and try to do this with Arch, but still fail to do this. On Windows with putty it work. i use this tut https://www.factoryforward.com/pi-zero-w-headless-setup-windows10-rndis-driver-issue-resolved/ if someone needed.

what i have done.

1. Install Arch
2. edit config and cmdline.txt
3. update arch and add user add user to wheel.
4. systemctl enable dhcpcd.service
now i conncet over usb c with my pi to ipad and wait for the ethnernet connection but it still dont show up.

if i do this with raspian its work and my ipad show the RNDIS/Ethernet Gadget connection.

how i can do this witch Arch ?
ewge89
 
Posts: 2
Joined: Sat May 25, 2019 11:56 pm

Re: arch over g_ether ipad

Postby summers » Mon May 27, 2019 1:04 pm

I'm not quite clear on which device has the WAN connection, and which device you want to initialise the connection.

Anyway if you look at my old thread here: https://archlinuxarm.org/forum/viewtopic.php?f=48&t=12623

It gives one way of doing it. Basic idea is you'll need one side or other to bring up the usb gadget support. I used libcomposite - as its the newer system. Using gether is another option, and you'll need to google that.

Then you need to decide what kind of usb ethernet you are bringing up, I did CDC - mainly becuase i'm a linux guy and had no wish to support windows machines.

Once you have the usb ethernet set up - you should be able to do $this->bbcode_second_pass_code('', 'ip a') on both machines, and they should show a $this->bbcode_second_pass_code('', 'usb') device.

Then you'll need to bring the ethernet up. Suggest you have one side as the master. On that you'll need to configure the interface to come up with an IP number, and probably want to start a dhcp server on that machine, and handing out the IP address you want the far end to use.

At that stage, with any luck it will bring up ethernet on both sides.

Then on the side with the WAN you'll have to worry about routing, you can do forwarding, or NAT; depends on how widely you want to distribute the knowledge of the Ip sub net you have set up between the devices. Me, I propagate that subnet across my whole LAN, which means I can log into my machine from anywhere on the LAN. However for WAN I go out via NAT.

Sorry if this sounds complex, it is because it is. What must be, can not be avoided. Here trying to set up a totally new network connection via usb ethernet. That network needs its own existence, and that what needs doing.

Its actually a path worth following, because when you get it to work, you'll understand networking far better.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: arch over g_ether ipad

Postby ewge89 » Tue May 28, 2019 6:08 pm

Hey,

thank you for your answer and sorry if I did not express myself correctly.

yesterday I was success :mrgreen: i could bring a connection between pi and my Ipad however, after reboot the pi it’s fail again and I'm back to the beginning :oops: .

I think I know what the problem is and how I can fix it.

I have install the dhcpd on pi and configured as in your description after that i add usb0.network to systemd. First boot it work, after reboot no more. I think Dhcpd fail bring up the network, why i dont know!

Now i will try.
1. Add dhcp to usb0.network
2. Make script that run on boot after network starts, systemd!

If i get success, I will write a clear instructions step by step. maybe with your support, if you like ?
ewge89
 
Posts: 2
Joined: Sat May 25, 2019 11:56 pm

Re: arch over g_ether ipad

Postby summers » Wed May 29, 2019 10:51 am

What problem could be is a race condition with dhcpd. Usually dhcpd starts after the network, but bring up usb ethernet takes an age. hence if you machine has another network connection (e.g. ethernet); then dhcpd starts before the usb ethernet has come up. This means it fails as the interface its meant to run on doesn't exist.

Now if this happens, as long as you have configured everything else to start automatically (so gether/libcomposite; and then the various network settings), then you can still bring up the network on the far end with the right number by hand.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm


Return to ARMv6h

Who is online

Users browsing this forum: No registered users and 6 guests