Xilinx / PYNQ

Python Productivity for ZYNQ
http://www.pynq.io/
BSD 3-Clause "New" or "Revised" License
1.99k stars 818 forks source link

USB Network Cables #94

Closed schelleg closed 8 years ago

schelleg commented 8 years ago

Hi guys,

Not sure how best to automate the static IP on a USB-Ethernet cables. Right now our static IP scripts target only "Local Area Connection", but USB-Ethernet cables show up as a different name. I don't have one of these cables, but I'd be interested in what names you all see for your USB-Ethernet adapter ... maybe a pattern we can search for in batch script.

Can a volunteer run this script below when USB-Ethernet cable plugged in

from dos prompt

netsh interface ipv4 show interfaces

output for me (no USB-Ethernet cable)

C:\Users\grahams>netsh interface ipv4 show interfaces Idx Met MTU State Name


1 50 4294967295 connected Loopback Pseudo-Interface 1 11 10 1500 connected Local Area Connection

npurusho commented 8 years ago

Hi Graham,

The usb-ethernet shows up as Local Area Connection 2 I think it depends on how many recognized connections exist on the particular system. Patrick's system showed Local Area Connection 3

Idx Met MTU State Name


1 50 4294967295 connected Loopback Pseudo-Interface 1 12 60 1500 disconnected Wireless Network Connection 11 5 1500 disconnected Local Area Connection 17 5 1500 disconnected Wireless Network Connection 4 14 50 1500 disconnected Bluetooth Network Connection 20 20 1500 connected Local Area Connection 2

schelleg commented 8 years ago

Thanks Naveen - I tried modifying the batch script with Patrick and it didn't work with USB adapters.

What USB adapter should we support? - I'll buy one for here so I can patch the static IP script to work with these cables.

npurusho commented 8 years ago

Hi Graham,

We got two different adapters. 1.http://www.linksys.com/us/p/P-USB3GIG/

  1. http://www.tp-link.com/en/products/details/UE300.html

we tried 1 (Linksys) and liked it as it is compatible with chromebook. 2 (Tp-link) does not say on the box or website that it support chromebook. If we choose one adapter we may want to choose 1(Linksys).

schelleg commented 8 years ago

I think compatibility is needed for our cross-platform portability story.

I ordered one. I'll close once script can work with this cable.

cathalmccabe commented 8 years ago

Hi Graham, In my opinion, I don't think we need a script for this. Considering our target audience, they should be able to change the network adapter settings themselves, once they know they need to do this (documentation). This should be something easily found on google. Realistically, we would only properly support a script for Win 7, or whatever the Xil machines are, and possibly a couple of other OS where we have a machine (Chromebook etc) but we are fixed to specific OS versions. There are also corner scenarios where it will cause problems. (What if 2 adapters are in use?) I don't think it is worth the effort for this, or to try and force people to use specific USB adapters.

Personally, I would prefer to change settings myself, so I can revert if necessary or if something goes wrong.

I think we should give instructions that whatever platform (Win XX, Lin, Mac), for static IP they need to configure the network connection, and suggest that USB Ethernet adapters can be used on machines with no Ethernet port, or where they don't want to use the main network port.

plysaght commented 8 years ago

Have the docs point to the win7 and a Linux script if possible along with the how to and that should be enough?

Sent from my iPhone

On May 25, 2016, at 3:22 AM, cathalmccabe notifications@github.com<mailto:notifications@github.com> wrote:

Hi Graham, In my opinion, I don't think we need a script for this. Considering our target audience, they should be able to change the network adapter settings themselves, once they know they need to do this (documentation). This should be something easily found on google. Realistically, we would only properly support a script for Win 7, or whatever the Xil machines are, and possibly a couple of other OS where we have a machine (Chromebook etc) but we are fixed to specific OS versions. There are also corner scenarios where it will cause problems. (What if 2 adapters are in use?) I don't think it is worth the effort for this, or to try and force people to use specific USB adapters.

Personally, I would prefer to change settings myself, so I can revert if necessary or if something goes wrong.

I think we should give instructions that whatever platform (Win XX, Lin, Mac), for static IP they need to configure the network connection, and suggest that USB Ethernet adapters can be used on machines with no Ethernet port, or where they don't want to use the main network port.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/Xilinx/Pynq/issues/94#issuecomment-221505579

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

cathalmccabe commented 8 years ago

I should also have added, that unless I misunderstand, the script to configure the network will be on the board, which will not be accessible until the network has been configured. If we want to provide a script for this, it will need to be hosted with the docs on the webpage. I can see this being problematic, asking users to download a .bat etc. from the internet to run on their PC.

schelleg commented 8 years ago

I have modified the Windows batch scripts to support USB Ethernet adapters.

These github hosted scripts can be referenced from documentation (hosted off or on-board) - i.e. users should be directed to go to github to access these scripts, not local onboard docs. @cathalmccabe is right that users doing initial bringup will not have access to the board's docs or scripts.

yunqu commented 8 years ago

@schelleg

There are duplicated versions for these files:

https://github.com/Xilinx/Pynq/blob/master/ubuntu/pynq_enable_static_IP_windows.bat https://github.com/Xilinx/Pynq/blob/master/ubuntu/pynq_disable_static_IP_windows.bat

versus

https://github.com/Xilinx/Pynq/blob/master/ubuntu/scripts/pynq_enable_static_IP_windows.bat https://github.com/Xilinx/Pynq/blob/master/ubuntu/scripts/pynq_disable_static_IP_windows.bat

Do you want to keep these files separately?

schelleg commented 8 years ago

no, we don't want duplicate files - feel free to delete the older versions.

On Fri, May 27, 2016 at 4:21 PM, Yun Rock Qu notifications@github.com wrote:

Reopened #94 https://github.com/Xilinx/Pynq/issues/94.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Xilinx/Pynq/issues/94#event-675008462, or mute the thread https://github.com/notifications/unsubscribe/AL31CpNGZ0yg6BUPQWRv5VJKrJyhKhF8ks5qF25_gaJpZM4Ijm2K .

Graham