Difference between revisions of "Beaglebone"
Line 95: | Line 95: | ||
After removing the resistor, use an iron to put small dobs of leaded solder on pad R93 (top side of board). Use hot air to heat the board until the solder is fluid, then place the 100K R onto R93, heating as necessary while being careful not to blow the resistor away. | After removing the resistor, use an iron to put small dobs of leaded solder on pad R93 (top side of board). Use hot air to heat the board until the solder is fluid, then place the 100K R onto R93, heating as necessary while being careful not to blow the resistor away. | ||
+ | |||
+ | ==External Links== | ||
+ | |||
+ | * https://github.com/mvduin/bbb-pin-utils/#show-pins Easily Display Information about pins. | ||
+ | * https://elinux.org/ - General Information | ||
+ | |||
+ | |||
+ | |||
{{Electronics}} | {{Electronics}} |
Revision as of 04:44, 22 May 2020
The beaglebone is similar to the RPI, but more powerful for microcontroller applications. There are more accessible GPIO and peripherals.
PocketBeagle
Connected via usb. Opens up cloud9 IDE, and gives you a web server connected arduino like interface to program the AM355x CPU.
Connecting to Beagle from host via usb
ip link ip link set en2923492024 up (whatever the interface was renamed to - see dmesg) dhclient en2923492024 ssh debian@192.168.6.2 (or 7.2)
See troubleshooting note about ipv4 not working below.
GNU\Linux Sharing internet with Pocketbeagle over USB
Had some trouble with this today. This guide: https://elementztechblog.wordpress.com/2014/12/22/sharing-internet-using-network-over-usb-in-beaglebone-black/ does NOT work. These guides are also no good: https://unix.stackexchange.com/questions/520528/sharing-internet-using-network-over-usb-in-raspberry-zero-based-on-beaglebone
You don't need to setup a bridge. It might work that way, but its not required. What works is the following:
- (pocketbeagle) Add route w/host ip
- (host) enable packet forwarding
- (host) NAT forwarding
- (pocketbeagle) DNS - resolv.conf
On beagle
Have Pocketbeagle Route to Host
# route add default gw 192.168.6.1
Or 192.168.7.1, see # route
On Host
Enable packet forwarding on Host
Check the current packet forwarding settings:
# sysctl -a | grep forward
You will note that options exist for controlling forwarding per default, per interface, as well as separate options for IPv4/IPv6 per interface.
Enter this command to temporarily enable packet forwarding at runtime:
# sysctl net.ipv4.ip_forward=1
Edit /etc/sysctl.d/30-ipforward.conf to make the previous change persistent after a reboot for all interfaces:
/etc/sysctl.d/30-ipforward.conf
net.ipv4.ip_forward=1
Afterwards it is advisable to double-check forwarding is enabled as required after a reboot. Enable NAT on Host With iptables
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT # iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT
ref: https://wiki.archlinux.org/index.php/Internet_Sharing
Fix DNS on beagle
At this point, you will have ip routing, but DNS isn't setup yet. To get DNS working put your preferred name server in /etc/resolv.conf
nameserver 192.168.1.1
Note: If you are testing an existing ping, when you change the iptables settings, you must stop / start a new ping to see the changes take effect. Note: It's nameserver ###.###.###.###, not just the #.
Question: Why isn't /etc/resolv.conf called /etc/nameserver ? How about a symbolic link? Is that too obvious?
IPv4 usb Interface Not Working
Had ipv4 not working for pocketbeagle today. Same image, same computer... Throw it out the window.
dhclient of usb interface on host gave only ipv6 address. ssh was able to connect via beagle's ipv6 address (ipv6%interface, e.g. ssh debian@fe80%usb1)
the two virtual usb ethernet interfaces that show up in host are always 192.168.7 or 192.168.6 range. Try one, if you can't ping the beagle at 192.168.6.2 (it's always 2) then try the 7 range. (on host)
ifconfig en238240224 192.168.6.1 ping 192.168.6.2
Sysvinit on pocketbeagle
Breaks ssh usb access. Only use if you have a wifi/ethernet adapter connected and ip info set in /etc/network/interfaces
Alpine on pocketbeagle
This script doesn't compile on Debian (Devuan) Stretch (kernel phase. uboot compiles). GCC appears to be the wrong version. GCC 5 has been removed from Debian stretch repos. https://github.com/BrianSidebotham/alpine-on-bbb
Beaglebone Black
Always Boot from SD Card
"...move R68 to R93 if you want to make the board boot from SD by default."
ref: https://stackoverflow.com/questions/33030802/fix-the-boot-order-emmc-on-a-beagle-bone-black
A latching switch would be nice. Onboard flash is built in obsolescence.
Instructions
Put some leaded solder on both sides of R68 (bottom of board, the silkscreen is misplaced, but just count down the line). Use hot air to remove R68, being careful not to use too much air flow which will knock the resistor off your bench, onto the floor. The resistor is a 100K, in case you lose it.
After removing the resistor, use an iron to put small dobs of leaded solder on pad R93 (top side of board). Use hot air to heat the board until the solder is fluid, then place the 100K R onto R93, heating as necessary while being careful not to blow the resistor away.
External Links
- https://github.com/mvduin/bbb-pin-utils/#show-pins Easily Display Information about pins.
- https://elinux.org/ - General Information
|