Monitoring network and internet speeds can be a major concern, especially in the case of LAN parties or video streaming. Modern Operating Systems provide utilities to track all the bits and bytes that pass over a network connection, but typically these tools lack obvious visualization. That’s where the Internet Speedometer can help. Using a BeagleBone Black and the power of its two Programable Realtime Units (PRUs), the Internet Speedometer will not only test download times, but also output the speed results visually to the tricolor LED strip.
But what are PRUs and why use them? PRUs are quite possibly the coolest feature of the BeagleBone Black, and one that sets it apart from other single board computers. They function much like microcontrollers; however, the two PRU cores on the BeagleBone Black operate at 200mhz with instructions executing on them at a fixed time of 5NS. That’s fast! What’s more is this speed does not come at a cost to the main processor’s load. Applications run in Linux will not take a performance hit even if there is high PRU activity. The two cores are not completely isolated and can share data between themselves and the CPU making interoperation possible. Programming of the cores is done using assembler in Linux and the execution of code is started by the main CPU. And this sharing of data and signaling features enable clever developers to offload work from the main processor and parallelize their applications. The result is a BeagleBone Black can perform high speed I/O with no performance hit to user experience — other boards simply don’t have this combination.
NOTE: Recently the BeagleBone Black switched Linux distributions from Ångström to Debian, and to anticipate this the Internet Speedometer uses Debian. If your BeagleBone Black is not a Rev C. or is not running Debian, consult our guides for Installing Debian on the BeagleBone Black (for OSX and Windows users).
Maybe I’m being delusional, but couldn’t this work on the raspberry pi as well?
PRUs are unique to BeagleBones, read more about them here:
https://github.com/beagleboard/am335x_pru_package/blob/master/Documentation/01-AM335x_PRU_ICSS_Overview.pdf
Yes. It just wouldn’t be as easy. Of course, you could also do it on a $2 atmel, but why be efficient with hardware when you have so much of it?
Internet speed would depend on various factors Bashd.mannd broadband Internet Kabl.srt I Nyst.amydvarm a very good day to increase internet speedپارتیشن – تست جوش – کرکره برقی
Very neat, I did a similar project based around a PIC microcontroller. It shows the last 16 seconds of network usage on a pair of LED matrices. More details here:
https://www.bonafidegeek.com/Bandwidth/
Very neat! I did a similar project based around a PIC microcontroller. It shows the last 16 seconds of network usage on a pair of LED matrices. More details here:
https://www.bonafidegeek.com/Bandwidth/
To be honest, it is ridiculous that these guys needed to use a $50 1GHz processor dev board with 80 inputs/outputs and to execute the same task a couple of $1 microcontrollers could do. It’s just depressing how lazy Mkezine editors have gotten.
True, but when you’re done with that project you’re left sitting with a couple of $1 microcontrollers. The guy with the BBB can go do a lot of other things with his device, or even do them while doing this function.
I love this. And it’s a good stepping stone to a christmas project I want to do. However, I have a question. If I set the .p files value of SEGMETS_TO_LIGHT to be 10 or 0, it simply fails to glow that color and the lights are done until I restart. I need to be able to light all the segments, but the most I can get is 9. I plan to dig into this a bit more later this week when I get some time, but I’m hoping there is a simple answer. Note, I can get between 1 and 9, but not 0 or 10, which doesn’t make sense with the very limited code in the .p files. Thanks though for a great hack.
Can I use a normal LED Strip for this build, or does it need to be the RadioShack version with the embedded support files?
I am outside of the US and can’t source the exact same part.
Thanks in advance
You could use a different type of strip. You may need to modify the PRU code (or maybe eliminate it entirely) depending on what controller your LED strips use. Get your LED strip working first. Next, alter the base script where it calls the PRU programs.
Thanks for the reply Tyler! Theres one more thing you may be able to help me with..
This is the first time I have used a BeagleBone Black and I am attempting to connect it to my MacBook.
I have bought an Ethernet adapter to allow an Ethernet connection but, but I am unable to connect to the SSH with the session timing out.
I installed the HoRNDIS and FTDI updates but this has not solved the issue.
My question is can i complete this build accessing SSH using just the USB connection, and not the Ethernet connection?
Thanks again
You should be able to do the entire project using just the USB connection. We never disabled it that I can remember.
Ethernet:
Are you trying to connect the Beagle and the Mac directly together via Ethernet? If so, then configuration is most likely the issue. The easiest way to get this working is assigning both devices a static IP. See here: http://elinux.org/Beagleboard:Terminal_Shells#SSH:_Setting_up_a_Static_IP
If you aren’t directly connecting them and have a different setup, let me know and I’ll see if I can give you a hand.
Tyler thanks for the reply.
Before your response I’d managed to get the SSH log in working, but now when I try to clone the git repository PyPRUSS it isn’t connecting. In fact, I can’t even ping google, so I know it is a networking issue but I cant figure out what I am doing wrong.
I have allowed the internet connection to be shared on my network preferences, but I am not sure if I need to do something first to allow the Macbook to talk to the Beaglebone on the Ethernet, and share its internet connection.
Any ideas?
Your help is greatly appreciated.
Thanks
Sonny
Hey Sonny – I’m glad you got SSH working. You have to do a few more steps to get internet sharing working across the connection though. Check out this video walkthrough to get it setup. https://www.youtube.com/watch?v=Cf9hnscbSK8
Basically make the Beagle see the Mac as a gateway. Then force the Mac to share it’s internet connection with the Beagle over the USB interface.
Thanks Tyler,
Unfortunately I still can’t get it to work. I am unable to complete the first line of code in the terminal re:
“screen /dev/tty.usb*B 115200”
And when I try to skip this step and move to the next operation, I am given this result:
BeagleBoard.org BeagleBone Debian Image 2014-04-23
Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
Last login: Wed Apr 23 20:20:40 2014 from 192.168.7.1
root@beaglebone:~# udhcpc -i usb0
-bash: udhcpc: command not found
root@beaglebone:~#
Not sure if there is anything you can see here? I really can’t determine why I am unable to share the internet connection.
Thanks
Sonny
Do you think it would be possible to just install Angstrom to the BeagleBone for the build as it already contains PyPRUSS (I believe)? Presumably though it needs the internet connection anyway to analyse and display output via the LED?
I’d skip Angstrom as the direction forward for the beaglebone is Debian. It would need the internet connection to display and output via LED. See my other post about using dhclient on debian to get DHCP working for your internet sharing.
You can either install udhcpc client on Debian (it comes with angstrom) or use Debian’s packaged dhclient.
try substituting dhclient for that command or if that doesn’t work “dhclient usb0”
Thanks for putting this up. I really helps learning to develop on the beaglebone PRU. Programming the beaglebone and the 2 PRU’s make the whole beaglebone one heck of board
Hi,
Please can you give me some suggestions?
I got all the way to the end of your step #9 but then got a Segmentation fault:
root@beaglebone:~/pypruss/examples/blinkled# modprobe uio_pruss
root@beaglebone:~/pypruss/examples/blinkled# cat $SLOTS
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONE-PRU
root@beaglebone:~/pypruss/examples/blinkled# python blinkled.py
AM33XX
File ./blinkled.bin open failed
Segmentation fault
Sorry I’m a bit late in replying.. Someone just linked me to this and said some more questions were posted.
Did you ever get this resolved? If not, let me know and I can try to recreate the build. I haven’t tried the example again since after we tested it for the article. It’s possible something may have changed in the libraries it depends on.
interesting project
at the end of the steps why I’m getting this kind of error?
1.86
Traceback (most recent call last):
File “pyGet.py”, line 23, in
print speed[0]
IndexError: list index out of range
and this is what i get when trying to print out cmd and cmd.stdout
<open file '’, mode ‘rb’ at 0xb67aa0d0>
any explanation would be great since I’m green with this thing :)
Did you have a speed.txt file populated with data? If the python script didn’t have any data to write to speed.txt for some reason, when it goes to read it would probably generate that error. Did you ever get it working?
If you still have problems, let me know and I can try to recreate this build.
Apologies for the late reply, someone just notified me there were questions on the article. Make doesn’t notify the authors of new questions after the post originally runs.
Where are the steps?????
Can someone help me with a pypruss.open(0) error? I’ve tried everything twice now but get the same “SystemError: error return without exception set”.
Apologies for the late reply. Usually this is caused by the device not being available.
Did you run?
echo BB-BONE-PRU > $SLOTS
after if you run cat $SLOTS you should match the image shown in Step 9 above. If that doesn’t happen, let me know! I saw on the PyPruss issues page that a bug was opened for this issue, it’s not been verified though as a bug vs the device tree not being set properly so I can’t say for certain it’s PyPruss causing this.
I have a Freetronics Arduino EtherTen and wanted to make this with either an analog gauge or a servo motor. I am unable to find code for an arduino to monitor my network traffic. Can I get the data from my routers inbuilt monitoring page somehow?
Sorry for the late reply. If your router provides that information via some API or a page that you could scrape, you can probably grab it by requesting that page and stripping out the data you need.
Unless your Arduino actually has all the network traffic flow through it, you’ll have to get the information from some other device.
OK – I’m hung up trying to create the DTC file, I copied the lines in the instructions into it,but keep getting Syntax errors when I try to compile it. Looks like it’s supposed to download a file from git?
Did you ever get this working? I’ve noticed the page with the original DTS file is now down. I found it in waybackmachine. The contents of the DTS file should be as follows:
Hows does this possibily calculate when my network speeds go high? Could someone please explain? As I know, packets are addressed directly to IPs from routers. So, how could the BBB calculate my others PCs internet speed?
Sorry for the late reply. This isn’t calculating the speed of your other PCs. This is simply downloading a file at a regular interval and reporting the difference between speed at which it downloads and the previous time.
If you have other PCs using data on your network they will take away from the bandwidth available to this device.
I am having a problem with step three. i keep getting the could not resolve host error and have absolutley no idea what is going wrong. Help please
ConfigureACCEPT
Privacy Overview
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.