Hello, I was trying to follow on of the posts where @giuliomoro gave a solution on how to connect to eduroam. When I got to the "$ sudo /usr/sbin/natd -interface en1 -dynamic" the terminal said that there is no such command. (Bela wasn't connected at that point). I then connected Bela and tried again to follow "Sharing wifi over USB with Bela" from github, then I rebooted Bela after following all the steps. After that I've been trying to access the IDE in the browser, and tried to log in using ssh but it wasn't working. I followed the troubleshooting and tried to manually put an IP address using DHCP with manual address and it still didn't work.
Sorry I don't know much about this. Can you please help ? Thank you!
no SSH connection after trying to connect to the internet via USB
cynthiak of the posts where @giuliomoro gave a solution on how to connect to eduroam
Which one?
What operating system are you on?
MacOS Mojave
for Bela using Bela mini Debian
I think the solution I gave would only work foe Yosemite or earlier. Do you have a link to the post you are referring to? Are you running the command as you typed it here with the quotes and the $ ?
giuliomoro Incidentally, this worked fine for me to share the connection to Bela over USB from eduroam (university network) on MacOS X 10.10 Yosemite:
$ sudo /usr/sbin/sysctl -w net.ihttps://forum.bela.io/d/280-how-to-set-up-osc-connectionnet.ip.forwarding=1
$ sudo /usr/sbin/natd -interface en1 -dynamic
$ sudo /sbin/ipfw add divert natd all from any to any via en1where en1 is your wifi interface
additionally, you have to issue proper route and resolv commands on the bbb
BBB:
$ echo "nameserver 8.8.8.8" > /etc/resolv.conf
$ /etc/init.d/networking restart
you may also need
$ route add default gw 192.168.7.1 usb0where 192.168.7.1 is the address of your host and usb0 is the connection in use
works a treat on the imac with yosemite
- Edited
giuliomoro I didn't use the $ but type everything after. ex: sudo /usr/sbin/sysctl -w net.inet.ip.forwarding=1
https://forum.bela.io/d/280-how-to-set-up-osc-connection
Yeah that is not meant to work on El Capitan and above as far as I know.
giuliomoro do you think any of the things I did affected the ssh connection? I can’t access the IDE anymore it loads forever, same on the terminal when I do sudo ssh root@192.168.7.2 (it times out)
Do you still have a fixed IP address set in the network preferences? Revert that to DHCP.
Can you show the output of the ifconfig
command, and a screenshot of the network preferences?
- Edited
After reverting back to DHCP:
ifconfig terminal (en147 and en148 are Bela's):
cynthias-mbp:~ cynthia$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
XHC20: flags=0<> mtu 0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:bc:32:c6:0a:c7
inet6 fe80::8e0:5cf6:a45f:9be3%en0 prefixlen 64 secured scopeid 0x5
inet 192.168.1.67 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fdaa:bbcc:ddee::18df:3d97:4d98:9a04 prefixlen 64 autoconf secured
inet6 fdaa:bbcc:ddee::64ed:fb03:3e68:abf9 prefixlen 64 autoconf temporary
inet6 2a00:23c5:40f:7b00:1852:de61:a1c:4951 prefixlen 64 autoconf secured
inet6 2a00:23c5:40f:7b00:a9f1:896a:23c0:7b39 prefixlen 64 autoconf temporary
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 0e:bc:32:c6:0a:c7
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether de:37:58:2f:8c:fd
inet6 fe80::dc37:58ff:fe2f:8cfd%awdl0 prefixlen 64 scopeid 0x7
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=60<TSO4,TSO6>
ether 4a:00:04:2b:41:c0
media: autoselect <full-duplex>
status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=60<TSO4,TSO6>
ether 4a:00:04:2b:41:c1
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 4a:00:04:2b:41:c0
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 8 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 9 priority 0 path cost 0
media: <unknown type>
status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::6b3b:7c86:838d:59c8%utun0 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
en147: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1486
ether 8a:d8:d9:f7:71:ce
inet6 fe80::1444:d2cc:68c4:7f0c%en147 prefixlen 64 secured scopeid 0x14
inet 169.254.195.221 netmask 0xffff0000 broadcast 169.254.255.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en148: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=4<VLAN_MTU>
ether ae:27:75:51:71:aa
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (none)
status: inactive
Network preferences:
this is what I get after trying to access:
cynthias-mbp:~ cynthia$ sudo ssh root@192.168.7.2
Password:
ssh: connect to host 192.168.7.2 port 22: Operation timed out
Thank you so much !
Try rebooting your computer, and that may resolve some of the issues.
Most importantly, did you change anything on the board?
- Edited
Yes I tried to reboot mutiple times, I also used a different Mac and I got the same thing.
The thing I changed on Bela is this (followed this https://github.com/BelaPlatform/Bela/wiki/Connecting-Bela-to-wifi Sharing wifi over USB with Bela):
auto usb0
iface usb0 inet dhcp
#iface usb0 inet static
#address 192.168.6.2
#netmask 255.255.255.0
#network 192.168.6.0
I uncommented the auto usb and commented out the rest
right, you need to revert it back to what it was before. Either you wait till you get to a different wifi than eduroam, you share the network connection again and you revert this change, or you can login via serial:
screen /dev/tty.usbmodem__bela*
then you type root
as the username and you are on the board. Use your favourite editor to edit /etc/network/resources
back to the way it was. Then reboot the board (and revert any changes on the host as well) and you should be ok.
I followed what you said (using screen /dev/tty.usbmodem__bela*) and it worked!! Thank you so much for your help.