Quick question. It is possible to get adb via ethernet cable connected to my laptop instead of connecting to router?
This is possible, though it's a bit more work. Here are a couple of options:
Run a DHCP service on your laptop to assign the board an IP address.
Connect to the board over serial and assign a static IP address.
If the ethernet port in your laptop doesn't autocross, you may need to connect the devices using a crossover cable instead of a patch cable.
DHCP Service
Ubuntu: Use a local service like avahi-daemon.
Mac OS: Enable internet sharing on the Ethernet port.
Windows: I have never tried, but others have used DHCP Server for Windows for this purpose.
Static IP
Use the serial debug console instructions to connect a serial cable and access the shell.
Connect the Ethernet cable between the board and your computer.
Run the following command as root (replace x.x.x.x with a real IP address):
ip addr add x.x.x.x dev eth0
Verify that the IP address was set properly with ifconfig
Run adb connect x.x.x.x or adb connect Android.local
The static IP address will only stick as long as the Ethernet link is active. If the device reboots or ethernet is unplugged, you'll have to run this procedure again.
Related
I am running ubuntu 18.04 LTS on virtual box. Is it possible to scan for real (non virtual) BACnet devices on a LAN through the virtual box VM?
How would I set the BACpypes.ini?
My Windows 10 machine if I do a ipconfig/all this doesn't work with the BACpypes.ini when run bacnet_scan.py on my VM
Or this IP address of my Windows 10 machine.
Both IP addresses implemented onto the BACpypes.ini will throw an:
OSError: [Errno 99] Cannot assign requested address
If I do an ifconfig of my ubuntu VM this doesnt appear to error anything on the bacnet_scan.py but none of my BACnet devices come up either. Any tips greatly appreciated...
Currently your VM is set up with a host-only connection. Host-only connection does what it says on the tin: you're only able to communicate with the host. To contact with the LAN around the host, set the VM's networking mode to "NAT" (This makes your VM routable through the host machine). Then, look up your VM's IP again and try that.
My goal is to get some IPMI based data from a HP Server through a local pc. I am using ipmiutil. I have installed the ipmiutil on local pc. I tried the following command to discover the server from local pc.
ipmiutil discover -b XXX.XXX.XXX.XXX.
But it says 1 ping sent 0 responses.
I have also tried the following command:
ipmiutil.exe fru -N XXX.XXX.XXX.XXX -U username -P mypassword
But I got the following error:
ipmiutil fru version 3.12
Connecting to node XXX.XXX.XXX.XXX
ipmilan_open_session error, rv = -3
ipmilan receive from BMC failed
ipmi_open error = -3 receive from BMC failed
ipmiutil fru, receive from BMC failed
I think it may be connection problem. I have checked the lan connection, the server is connected to the lan. Even through putty i can access that particular server. So What may be the reason to not able to connect the server through ipmiutil???
There must be something wrong with the IPMI LAN configuration on the HP server.
My guess is that the IPMI LAN configuration was only partially complete.
So perhaps the IPMI LAN gateway IP/MAC is not set, or the LAN Access Mode is incorrect.
Another possibility is that the IPMI LAN IP address is not set to something unique.
Its IP must be different from the OS IP address, and from other systems on that LAN.
You can see all of the relevant parameters by running 'ipmiutil lan' from the HP server, and comparing the IP and Gateway with that of the HP OS (If Linux: 'ip addr', 'ip route').
I want to exchange messages between client and server which are on two different machines. The two machines are directly connected by an Ethernet cable. I can successfully send and receive messages between client and server if they are both on the same machine. What should be the server address in order to have communication between the two machines?
serveraddr.sin_addr.s_addr = htonl( ???? );
I've tried running ifconfig on the server machine but just found the MAC address and no IP to assign in the code.
Both machines are running DHCP.
Have a look at the UDP wiki, as you can see, it requires an network layer. This is typically IP. You can set a static IP address to both devices and use these static IP address or you can set up a DHCP server on one of these machines to assign IP addresses automatically.
Directly connecting the machines with a cable creates a unique independent network (with only the two nodes).
Note that the cable will have to be a crossover cable.
DHCP probably won't help if neither node is a DHCP server.
As indicated in the answer by Marrten Arias, assign both the client, and the server a static ip address; perhaps something like this:
Server IP: 192.168.01.01
Client IP: 192.168.01.02
Mask (for both): 255.255.255.0
i am working on a remote control program so i need to create connecting to the server(the remote pc) by MAC address (i cant go by ip because he is behind NAT)
It is not possible to connect to a TCP/UDP server by its MAC address, you must use its IP address. Every TCP/UDP server has an IP address, even behind a NAT. TCP/UDP are designed around IP and are transport-agnostic so they can run on networks that are not based on Ethernet/MAC to begin with.
Since your server is behind a NAT, you must connect to the NAT's IP address, and the NAT must be configured to forward that connection to the server's IP address. You cannot avoid that, that is simply how NATs work. If the NAT supports uPNP, the server can programmably configure a port forwarding rule on the NAT. Otherwise the NAT admin must configure it manually.
Due to space limitations in my office, I'd like to deploy my apps via network instead of via usb. Both the phone and the PC are in the same network.
I'm hoping for something similar to Ouya: a checkbox in the settings and then "adb connect "
Connect with USB cable and run:
adb tcpip 5555
Disconnect USB cable and run:
adb connect 192.168.0.100:5555
Change the IP to the actual IP of the device.