0

I am trying to automate copy/transfer a file from my local mac machine to a local nanopi-neo-linux machine. The two machine are connected via serial cable using VCP driver of Silicon Labs

scp username@192.168.1.111:/path/to/myfile.txt /Users/Jamie/local/path/to/myfile.txt

scp and ssh requires the host address/IP addres of the nanopi-neo-linux but I cannot get it without accessing it. I am accessing different nanopi-neo-linux machines so the IP address is dynamic.

Is there a way to directly copy/transfer a file without getting the IP address? or is it possible to directly extract the host address/IP address of nanopi-neo-linux so I can make it a variable?

Ricky Aguilar
  • 329
  • 1
  • 8
  • 19
  • I don't fully understand the last part of your question. Yes it is always necessary to know the IP address, weather it is dynamically or statically assigned. – avermaet Jul 17 '19 at 07:41
  • I am looking for a way to get the IP of the nanopi-neo-linux machine from my mac machine. – Ricky Aguilar Jul 17 '19 at 08:16
  • Try `arp -a`. This gives the hosts in the local network. – avermaet Jul 17 '19 at 08:18
  • But it gives all connected in the local network. Is there a way to get the specific IP address? My mac and linux are connected via serial cable (VCP driver of Silicon Labs) – Ricky Aguilar Jul 17 '19 at 08:21
  • I think you can use a Serial terminal to directly access the device, like `minicom` or `gtkterm` – avermaet Jul 17 '19 at 08:23
  • are all ip addresses dynamic? and if you have serial connection and you don't want to connect to it every time, you can echo ip address of the target machine through the serial port. you can write some script that echoes the ip address to the serial port every few seconds? – Amir H Jul 21 '19 at 17:47
  • @AmirH Yes, all IP addresses are dynamic. I think that would be very convenient if new devices through serial connection would be able to echo their IP. – Ricky Aguilar Jul 23 '19 at 04:59

0 Answers0