Detecting a Beaglebone IP Addtress

Asked by 5 months ago
Board members: I've got an interesting problem that I'm trying to come up with a solution for. I am going to be teaching a class next quarter on the Beaglebone Black. Students will attach their bones to a network and program them remotely over ethernet. Code will be developed on a virtual machine running Linux and then connected via sftp to the board. However, the students will only have a bone and a prototyping cape available to them. WHat I am trying to figure out is the best way for them to determine the IP address of their board. By default, I know that the boards use dhcp to get an ip address. However, without a display, it's somewhat hard to get an ip address. Is there an easy way, maybe by using the usb connection, that students can figure out the IP address of the board so they can remote to it in an appropriate fashion. I've thought about simply pinging the boards, but with multiple boards on the network, that would only indicate that a board is connected, not that their board is connected. I suppose I could go to fixed IP's, but that would require them to change the SD card, which at first I'd rather use "stock" until they have gotten their feet wet. Any ideas or suggestions? Thanks, Walt PS: We'll be using a Debian image based of of Robert Nelson's work unless a new "standard" image comes out from Circuitco before then.

Your Answer

Name:
Reply:

All Answers

Answer by 5 months ago
Most DHCP servers will record the ethernet MAC address of each IP number assignment and try to assign the same IP when they see that MAC address again. That lets node users determine their DHCP-assigned IP address once and assume they will get that same IP address when they attach to the network again. But if there are a lot of nodes that come and go, the DHCP server might have to reuse IP numbers. If your students are connecting to a network with a lot of laptops, workstations, and BBBs, I think the probability of such mixups is high. I would avoid relying on this, and setup the BBBs to use their own fixed IP addresses. Maybe that could be their first exercise? Or maybe you could just do it before the quarter starts, assuming you have all the BBBs. As soon as you connect a Beaglebone Black to a Windows PC with the flash-resident drivers, it brings up a USB serial port emulation. You can use any free terminal program (like Tera Term) to log into the BBB. From there it is pretty easy to set it to use a fixed IP address whenever it boots. Derek Molloy has a YouTube video that details this. Once they have each done that, then SSH and SFTP and an ethernet cable is all they need to talk to their boards. I think this would also present some advantages for you as the instructor: Every student’s network activity would be very easy to track, if they all use assigned IP numbers. From: Walter Schilling Sent: Thursday, February 13, 2014 7:58 PM To: beagleboard [ at ] googlegroups.com Subject: [beagleboard] Detecting a Beaglebone IP Addtress Board members: I've got an interesting problem that I'm trying to come up with a solution for. I am going to be teaching a class next quarter on the Beaglebone Black. Students will attach their bones to a network and program them remotely over ethernet. Code will be developed on a virtual machine running Linux and then connected via sftp to the board. However, the students will only have a bone and a prototyping cape available to them. WHat I am trying to figure out is the best way for them to determine the IP address of their board. By default, I know that the boards use dhcp to get an ip address. However, without a display, it's somewhat hard to get an ip address. Is there an easy way, maybe by using the usb connection, that students can figure out the IP address of the board so they can remote to it in an appropriate fashion. I've thought about simply pinging the boards, but with multiple boards on the network, that would only indicate that a board is connected, not that their board is connected. I suppose I could go to fixed IP's, but that would require them to change the SD card, which at first I'd rather use "stock" until they have gotten their feet wet. Any ideas or suggestions? Thanks, Walt PS: We'll be using a Debian image based of of Robert Nelson's work unless a new "standard" image comes out from Circuitco before then.
Answer by 5 months ago
Hi Walter, This would depend on your setup, but some routers can be configured to issue a fixed IP based on a Mac address. Mark
Answer by 5 months ago
I agree, creating host entries on your DHCP server to provide a fixed iP address based on the MAC address of the board is probably the easiest solution. If you've got DDNS setup, you could register a MAC address based hostname when they get their IP w/o having to create static host entries for each board (a problem if you are frequently getting new boards or have more boards than available IP addresses).
Answer by 5 months ago
Hi, I'm kind of a newbie on all this (so use at your own risk) but I would consider: 1. A unique hostname for each board and then each student could *ping hostname* for their BBB which should return the IP address [Reply from 192.168. ... ] (?) 2. Have a boot script write the ip address to a file onto a thumb drive which they could pop into a laptop after the BBB booted 3. Have a boot script mail the ip address to their email account 4. Have a boot script print their name/hostname/ip address to a printer (not very enviromentally friendly) 4. Get them to learn morse code and have a boot script flash the LEDs in morse code ;) .... best regards,
Answer by 5 months ago
#1 I don't have access to the routers to adjust their setup, as that is controlled by our IT department that doesn't want to deal with configuration in that manner. #2 Students may work at home / dorms with a different network confiuration. I'm entrigued by the idea of writing the IP address to a file at boot. If I did that, then I probably could connect via usb and read that file back. I'll have to try that and see if I can get that working reliably. I've also thought about a program that blinked the lights on the board to display the ip, but I';m not sure that will be reliable either. (Hint: Maybe that would be a cool heartbeat to build into the onboard leds for this reason.)
Answer by 5 months ago
Quoted message by Dumb.looks.free 5 months ago
Hi, I'm kind of a newbie on all this (so use at your own risk) but I would consider: 1. A unique hostname for each board and then each student could *ping hostname* for their BBB which should return the IP address [Reply from 192.168. ... ] (?) 2. Have a boot script write the ip address to a file onto a thumb drive which they could pop into a laptop after the BBB booted 3. Have a boot script mail the ip address to their email account 4. Have a boot script print their name/hostname/ip address to a printer (not very enviromentally friendly) 4. Get them to learn morse code and have a boot script flash the LEDs in morse code ;) .... best regards,
fyi: if you look closely at the debian testing images i've been pushing, the ip address is listed on the serial console above the login prompt.. However with systemd, it boots to fast, so eth0 is usually never updated (it's a race between getting ip and the init script that updates /etc/issue). Otherwise give each board a unique host name.. then user can just "ssh root [ at ] unquie-hostname.local" Regards,
Answer by 5 months ago
For what it is worth, I get the IP address that is seen from the web by curl http://ipecho.net/plain
Answer by 5 months ago
If they have a serial port access they can simply type “ifconfig”. Failing that, I use the table in my router to determine the ip address. You would have to turn on one Bone at a time however L Bill http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book From: beagleboard [ at ] googlegroups.com [mailto:beagleboard [ at ] googlegroups.com] On Behalf Of Walter Schilling Sent: Monday, February 17, 2014 8:26 AM To: beagleboard [ at ] googlegroups.com Subject: [beagleboard] Re: Detecting a Beaglebone IP Addtress Board members: I've got an interesting problem that I'm trying to come up with a solution for. I am going to be teaching a class next quarter on the Beaglebone Black. Students will attach their bones to a network and program them remotely over ethernet. Code will be developed on a virtual machine running Linux and then connected via sftp to the board. However, the students will only have a bone and a prototyping cape available to them. WHat I am trying to figure out is the best way for them to determine the IP address of their board. By default, I know that the boards use dhcp to get an ip address. However, without a display, it's somewhat hard to get an ip address. Is there an easy way, maybe by using the usb connection, that students can figure out the IP address of the board so they can remote to it in an appropriate fashion. I've thought about simply pinging the boards, but with multiple boards on the network, that would only indicate that a board is connected, not that their board is connected. I suppose I could go to fixed IP's, but that would require them to change the SD card, which at first I'd rather use "stock" until they have gotten their feet wet. Any ideas or suggestions? Thanks, Walt PS: We'll be using a Debian image based of of Robert Nelson's work unless a new "standard" image comes out from Circuitco before then. No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4335 / Virus Database: 3705/7098 - Release Date: 02/16/14 _____ No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4335 / Virus Database: 3697/7086 - Release Date: 02/12/14
Answer by 5 months ago
Use port scanning software On Mon, Feb 17, 2014 at 9:30 PM, William Pretty Security <
Answer by 5 months ago
Quoted message by William Pretty Security 5 months ago
If they have a serial port access they can simply type “ifconfig”. Failing that, I use the table in my router to determine the ip address. You would have to turn on one Bone at a time however L Bill http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book From: beagleboard [ at ] googlegroups.com [mailto:beagleboard [ at ] googlegroups.com] On Behalf Of Walter Schilling Sent: Monday, February 17, 2014 8:26 AM To: beagleboard [ at ] googlegroups.com Subject: [beagleboard] Re: Detecting a Beaglebone IP Addtress Board members: I've got an interesting problem that I'm trying to come up with a solution for. I am going to be teaching a class next quarter on the Beaglebone Black. Students will attach their bones to a network and program them remotely over ethernet. Code will be developed on a virtual machine running Linux and then connected via sftp to the board. However, the students will only have a bone and a prototyping cape available to them. WHat I am trying to figure out is the best way for them to determine the IP address of their board. By default, I know that the boards use dhcp to get an ip address. However, without a display, it's somewhat hard to get an ip address. Is there an easy way, maybe by using the usb connection, that students can figure out the IP address of the board so they can remote to it in an appropriate fashion. I've thought about simply pinging the boards, but with multiple boards on the network, that would only indicate that a board is connected, not that their board is connected. I suppose I could go to fixed IP's, but that would require them to change the SD card, which at first I'd rather use "stock" until they have gotten their feet wet. Any ideas or suggestions? Thanks, Walt PS: We'll be using a Debian image based of of Robert Nelson's work unless a new "standard" image comes out from Circuitco before then. No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4335 / Virus Database: 3705/7098 - Release Date: 02/16/14 _____ No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4335 / Virus Database: 3697/7086 - Release Date: 02/12/14
Morse code on usrX led's..
Answer by 5 months ago
Quoted message by Walter Schilling 5 months ago
#1 I don't have access to the routers to adjust their setup, as that is controlled by our IT department that doesn't want to deal with configuration in that manner. #2 Students may work at home / dorms with a different network confiuration. I'm entrigued by the idea of writing the IP address to a file at boot. If I did that, then I probably could connect via usb and read that file back. I'll have to try that and see if I can get that working reliably. I've also thought about a program that blinked the lights on the board to display the ip, but I';m not sure that will be reliable either. (Hint: Maybe that would be a cool heartbeat to build into the onboard leds for this reason.)
Thanks for all the ideas. This is the direction I plan on going now that I've made it work. As a side note, if you are trying this, make sure you have your VM in Bridges mode and not NAT mode. NAT will not work, but it works fine once you go into bridged mode. I just about strangled myself after I messed with it for a few hours thinking I had something really wrong with my hosts files only to change this and have it work.
Answer by 5 months ago
Quoted message by Robert Nelson 5 months ago
fyi: if you look closely at the debian testing images i've been pushing, the ip address is listed on the serial console above the login prompt.. However with systemd, it boots to fast, so eth0 is usually never updated (it's a race between getting ip and the init script that updates /etc/issue). Otherwise give each board a unique host name.. then user can just "ssh root [ at ] unquie-hostname.local" Regards,
Last night I set up a VM (Ubuntu 12.04 with Virtual Box) and was able to plug my BBB in via USB, have the VM take control of the USB and then ssh 192.168.7.2 and talk to the beagle. This seems like the easiest way to set up the beagles. --Mark