ethernet

Android udp multicast with Ethernet

末鹿安然 提交于 2019-12-21 19:58:20
问题 Hello everyone, I'm working on a project with udp multicast. I have a server sending multicast udp packets via an ethernet cable. I have spent weeks of work reading all the posts about multicast on android and I still can't receive any udp packet on my Asus Transformer Tablet, 4.1. For some reasons, I can't put my code here, I will try to explain it carefully. I have a simple MainActivity displaying some stuff. Almost everything is n the Oncreate method, and so is the line where I call a

Assign static IP to ethernet card from OTG

两盒软妹~` 提交于 2019-12-21 19:43:16
问题 I would like to assign a static IP to an ethernet card, connected to the Android device via OTG cable. It should be done programmatically, but I can't find any reference regarding ethernet cards in android. Any ideas? Thank you 回答1: If its a rooted device you can try with this Process process = Runtime.getRuntime().exec(new String[] { "su", "-c", "netcfg eth0 192.168.0.123"}); process.waitFor(); And also you can use ifconfig instead of netcfg . 来源: https://stackoverflow.com/questions/23397803

High speed UDP receiver in MATLAB

落花浮王杯 提交于 2019-12-20 04:59:06
问题 I'd like to implement the receiving end of my system in MATLAB - this requires Gigabit Ethernet with sustained speeds of over 200Mb/sec. Using MATLAB's built-in UDP from the Instrument Control Toolbox does not appear to be sufficient. Are there any good alternatives? 回答1: If you know Java, you can write the networking part of your code in Java classes, load those into your Matlab session with javaclasspath(), and invoke them from M-code. This could transform the problem from getting the data

How to get the IP address of a remote host from its Ethernet address?

◇◆丶佛笑我妖孽 提交于 2019-12-20 01:58:18
问题 I'm looking for some Linux code to find an IP address from an Ethernet address. I suppose I have to do some inverse ARP trickery but I don't find any example... 回答1: http://compnetworking.about.com/od/networkprotocolsip/f/convertipmacadd.htm Try sending an IP broadcast (e.g. ping 192.168.1.255 if your subnet is 192.168.1.0/24) to prime your ARP cache, followed by arp -a to spit it all out. 回答2: For computers that you have communicated with, you can look at their arp entry. This is available

vagrant up command giving error and eth1 not showing a resolvable ip address

我的梦境 提交于 2019-12-19 11:58:18
问题 I am new to VMs, but have been using vagrant to run a Centos VM on Ubuntu 14.04. All of a sudden vagrant up command is giving this error: root@shanky:~/centos# vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'chef/centos-6.5' is up to date... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Available bridged network interfaces: 1) eth0 2) wlan0 ==> default

How can i receive the wrong Ethernet frames and disable the CRC/FCS calcul?

人走茶凉 提交于 2019-12-18 13:27:27
问题 I generate a traffic between two PCs running Linux (by sending Ethernet frames), the goal of this is to capture some errors frames. The problem is when the Phy layer detect an error on a frame (if the CRC or FCS is not valid) the frame is dropped and I can't receive it in my program. Are the any way to receive the wrong frame (disable the drops in the Phy layer and receiving a indicator that indicate that this frame is wrong for example) and how can i consult the statistic of the NIC card

linux raw ethernet socket bind to specific protocol

六月ゝ 毕业季﹏ 提交于 2019-12-18 03:38:25
问题 I'm writing code to send raw Ethernet frames between two Linux boxes. To test this I just want to get a simple client-send and server-receive. I have the client correctly making packets (I can see them using a packet sniffer). On the server side I initialize the socket like so: fd = socket(PF_PACKET, SOCK_RAW, htons(MY_ETH_PROTOCOL)); where MY_ETH_PROTOCOL is a 2 byte constant I use as an ethertype so I don't hear extraneous network traffic. when I bind this socket to my interface I must pass

How to check Ethernet in Linux?

懵懂的女人 提交于 2019-12-17 16:37:30
问题 I need the test case for Ethernet in Linux using C code to check eth0 . If eth0 is down, we enable the net then check if up and the test is passed. 回答1: To check if the link is up, try something like this. It works without root privileges. #include <stdio.h> // printf #include <string.h> // strncpy //#include <sys/socket.h> // AF_INET #include <sys/ioctl.h> // SIOCGIFFLAGS #include <errno.h> // errno #include <netinet/in.h> // IPPROTO_IP #include <net/if.h> // IFF_*, ifreq #define ERROR(fmt,

Arduino LED On/Off TCP C#

删除回忆录丶 提交于 2019-12-13 08:45:48
问题 I am now for Arduino, I want try to open switch on/off a led using C# with Arduino. So I try using serial port, and it works, but I want to use an Ethernet shield to switch on/off the led. My code using serial port This Arduino code #define BaudRate 9600 #define LEDPin 10 char incomingOption; void setup() { pinMode(LEDPin, OUTPUT); // serial communication Serial.begin(BaudRate); } void loop() { //read from serial port getting information from VS 2013 incomingOption = Serial.read(); //verify

How to send internet packets between two Arduinos?

本小妞迷上赌 提交于 2019-12-13 07:49:02
问题 For a project I am working on, I am wondering if there is a way to send internet packets between two Arduinos. The setup would be to have both Arduinos have ethernet shields. One shield is connected to a computer and the other to a router or other internet connection. The Arduinos need to communicate to each other relaying the packets of information. The goal is to be able to ping the router from my computer through these two Arduinos. Any help would be greatly appreciated. Thank you. 回答1: