Can't ssh into Pocketbeagle

Hi,

I’m trying to get access using the am335x_evm usb connection so I can use balena ssh [ip address] into the Pocketbeagle.

I’ve tried the -s arg.

added custom ssh key to config.json . This worked on my raspberry pi 3, but the beaglebone still doesn’t like it:

{
  "deviceType": "beaglebone-pocket",
  "localMode": true,
  "persistentLogging": false,
  "hostname": "[hostname]",
  "os": {
    "sshKeys": [
      "[rsa key]"
    ]
  },
  "uuid": "[uuid]"
}

The ip is self assigned. the original beaglebone clearly shows connection, but Balena doesn’t I’m using

Pocket Beagle BalenaOS 2.31.5+rev1 production

Kind regards,

Martijn

Hi, did you check that the config.json file is parseable after the modification?
You can do:

cat config.json | jq .

To verify its syntax.
Also, can you access the log files on the PocketBeagle? Could you please paste the part relevant to the ssh attempt?
Thanks.

Hi, the config.json file is valid. How can I get the logs off the device without any working network connection? I already checked the partitions, but there’s accessable no log data there.

I’ve ordered the beaglebone black wireless. That one is almost the same.

Hi Martijn

By default, logs are not persisted to disk. But you can enable “persistent logging”, and they will be available under /var/log/journald
Pleasae change “persistentLogging” to “true” in config.json, plug the sd card back in the board and retry

Federico

journal.log (166.1 KB) here you go

edit: added a few other ones journal2.log (153.6 KB)
journal 3.log (86.1 KB)

Hi there.

Looking at the logs you sent, it looks like the usb0 ethernet device is present, but is only being configured with a link-local IPv6 address and no IPv4 address. It seems like it’s expecting your host computer to provide a DHCP address. You could potentially use NetworkManager to create a DHCP server on that interface by following the static up instructions[1] and replacing the [ipv4] section with:

[ipv4]
dns-search=
method=shared

1: https://www.balena.io/docs/reference/OS/network/2.x/#setting-a-static-ip

Good luck!
James.

Oh, and remember to set the interface-name value to usb0.

Only journal.log. But the thing is that it’s not really needed, because am335x_evm has built in ethernet connection through usb. It would be the an extremely handy Balena OS test device when I can feed and create connection the Pocketbeagle with one USB cable. Aparently this is not a feature of Balena OS User wants support for networking over USB

edit: But here it says it is added: Add scripts for PocketBeagle usb ethernet

Hello Martijn.

According to the logs you sent, the Ethernet via usb interface on this device works.
It does not have an ip address configured, this is why you can’t reach it with balena ssh.
The default image provided by beaglebone assigns the 192.168.7.2 ip address to this interface. This is not the case for any other Linux distribution.

If you don’t have a config file with a static ip address, NetworkManager (which runs in BalenaOS images) expects the other side of the Ethernet (in this case usb) cable to provide an ip address via DHCP. If the other side is your computer, I guess it is not running a DHCP server.

It seems like the device still assigns the usb0 interface a link-local IPv6 address so you may be able to see it with tools like avahi-discover, but that is not the point.

You need to configure a static ip for this interface, in order to do so, create a file in the system-connections folder of the boot partition of the sd card containing ( like described here https://www.balena.io/docs/reference/OS/network/2.x/#setting-a-static-ip ):

[connection]
id=my-ethernet
type=ethernet
interface-name=usb0
permissions=
secondaries=

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.1.111/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
dns-search=
method=manual

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

The above will assign the address 192.168.1.111 to the beaglebone and use 192.168.1.1 as a gateway for accessing any other address.
It means that the computer on which the usb cable is plugged needs to be assigned the address 192.168.1.1 on this usb-ethernet interface and do NAT if you need the beaglebone to be able to access anything else than this computer.

I will close the linked issue as the usb ethernet driver works according to the logs you’ve sent.

Yes, This worked like a charm. Thanks! Could you add this to the Pocketbeagle wiki? Is very handy for other developers.

But balena push [local address] doesn’t work Could not communicate with local mode device at address

[debug] original argv0="/usr/local/lib/balena-cli/bin/node" argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,push,neonlink.local] length=4
[debug] Using . as build source
[Debug]   Checking we can access device
[Debug]   Sending request to http://neonlink.local:48484/ping
Could not communicate with local mode device at address neonlink.local

When I go to http://neonlink.local:48484/ping in my browser, it says Unauthorized

I even tried to change priorities of network devices, but there is no difference. The config.json has localMode enabled.

Client:

 Version: 17.12.0-dev

 API version: 1.35

 Go version: go1.9.4

 Git commit: fe78e2c9a69313007c53c83fff4b5525fbc2ba45

 Built: Tue Mar 26 11:20:49 2019

 OS/Arch: linux/arm

 Experimental: false

 Orchestrator: swarm

Server:

 Engine:

Version: 17.12.0-dev

API version: 1.35 (minimum version 1.12)

Go version: go1.9.4

Git commit: fe78e2c9a69313007c53c83fff4b5525fbc2ba45

Built: Tue Mar 26 11:20:49 2019

OS/Arch: linux/arm

Experimental: true

journal.log (152.8 KB)

Update:

got it working flashed development image again and followed manual

Want to add a OSX users tip. When you set your ipv4 settings

[ipv4]
method=auto

And enable internet sharing:

Apple menu > System Preferences, click Sharing , then select Internet Sharing

And select your am335x_evm as device who can use the shared internet.

The hostname is accessible and internet is available on your Beaglebone.

Thanks for sharing @neonlink