Using FarmbotOS beta updates

This pretty accurately sums up Raspberry Pi in a nut shell. If it stops working for no reason - it’s probably just a broken board

I’ve tested this out and it works for me, tho i have no idea if wpa_supplicant actually uses the configured settings. How are you checking? Did you try this on the new board just in case it was caused by the broken rpi3?

I’m checking the contents of /tmp/vintage_net/wpa_supplicant.conf.wlan0 which is

ctrl_interface=/tmp/vintage_net/wpa_supplicant
country=US
bgscan="simple"
network={
ssid="IoT"
key_mgmt=WPA-PSK
scan_ssid=1
psk=<-deleted->
}

In the Advanced form for Wi-Fi I specified country AU ( using the non-broken RPi3B+ )

Looking into this right now. Thanks!

This looked like a pretty simple fix. RC55 should have the fix

Now testing on v8.0.0-rc55 from the CI .IMG file from GitHub.

Ahhh, well, that’s one small step for FarmBot’ters :tm: Regulatory Domain for Wi-Fi - works !
but a few things now broken :confused: ( looks like a skew in a DB schema )

  • SSH Console no longer works . . seems to ignore the configured public key
  • On the WebApp Device page, the little pop-down from the FARMBOT OS version field no longer show the Distribution node name :expressionless:
  • On same pop-down, WiFi Strength is N/A but I’m on Wi-Fi !

Oh, and I wonder what causes this on the Log . . no side-effects have showed up ( yet ) :slight_smile:

Re: Slooooow Configurator Access Point . . my original RPi3B+ hardware is just fine !

The issue appears when you have a live wired cable on the Ethernet port while you’re running the Configurator AP.

Looks like one for VintageNet . . so I’ll get some more evidence to support this theory and then post an Issue there ( or here ) :slight_smile: as appropriate.

1 Like

Found another one ( v8.0.0-rc55 )

Had a 45 minute outage of Wi-Fi . . bot reconnected Ok, but the yellow SYNC NOW button on the top common bar of the WebApp . . doesn’t do anything !
Last Log is Preloaded auto sync complete

I suspect this actually caused the other two problems listed. Investigating this right now, but i plan on depreciating this in favor of a new solution we are cooking up, so keep an eye out for that in the future. (probably post v8 release)

I’ve just released some fixes in RC56 that should fix the following things:

  • reboot causing firmware to not open
  • wifi reporting to the frontend
  • node_name reporting
  • ssh console

I’ve been doing this for a pretty long time. I’m wondering if your network/router is causing some incompatibilities such as with DHCP names or mdns etc.

Will try to investigate this one next.

Nice ! Most are fixed.

SSH Console, though, still doesn’t come up without manual “help” and doesn’t survive reboot.
From serial console I did

  • Application.put_env :nerves_firmware_ssh, :authorized_keys, ["ssh-rsa (blab-blab:)"]
  • FarmbotOS.Platform.Target.SSHConsole.restart_ssh

Wonder whether Configurator stored my public key in the right place ?

Hmmmm . . I think you’re probably right about that . . I think the new MAC address from the replacement RPi3B+ board was the factor that made things seem to work again. Back to the drawing board for me on that one.

I’ll dig into this one a bit more. are you using the mdns name or ip address?

also btw are you aware that you can do:

iex --name console@localhost --cookie democookie --remsh farmbot@${NODE_NAME}.local

to get a console to devices?

Absolutely am :slight_smile:
That and my FTDI cable are my friends !
Therefore, not so sad about SSH Console . . but it is nice to have for sure.

The good ol’-fashioned dotted-decimal IPv4 address for me :wink:

The issue seems to stem from platform/target/ssh_console.ex not using the shiny, new managed FarmbotCore.Asset.PublicKey but rather the older mechanism of the authorized_keys env var from :nerves_firmware_ssh app.

  defp start_ssh(port, decoded_authorized_keys) when is_list(decoded_authorized_keys) do
    # Reuse keys from `nerves_firmware_ssh` so that the user only needs one
    # config.exs entry.
    nerves_keys =
      Application.get_env(:nerves_firmware_ssh, :authorized_keys, []) |> Enum.join("\n")

    decoded_nerves_keys = do_decode(nerves_keys)

    cb_opts = [authorized_keys: decoded_nerves_keys ++ decoded_authorized_keys]

    # Reuse the system_dir as well to allow for auth to work with the shared
    # keys.
    :ssh.daemon(port, [
      {:id_string, :random},
      {:key_cb, {Nerves.Firmware.SSH.Keys, cb_opts}},
      {:system_dir, Nerves.Firmware.SSH.Application.system_dir()},
      {:shell, {Elixir.IEx, :start, []}}
    ])
  end

This should be using both mechanisms. Will inspect further in the future

1 Like

Ooops . . looks like I was too hasty to point a finger . . let me amend that :slight_smile:
Let’s see whether I can find the real bug before you do !

Indeed it should :wink:

This seems to fix the use of the FarmbotCore.Asset.PublicKey at least . . could you check that it won’t break the intended functionality ? :slight_smile:

Ummmm . . maybe this is better ( though not idiomatic ! )

Hmm looking at what you have, I think I may have forgotten to merge a PR or something. I changed that code I thought

1 Like

All Good (™) Only wanting to see v8.0.0 ready for “Prime Time” very soon :slight_smile:

About to have a crack at solving that other issue that I uncovered recently :

  • No Internet for a while then when network restored , the WebApp ( you call it “front-end” ) SYNC NOW button has no effect ( other buttons, also )

( Wish me luck ! :slight_smile: )

Ummm . . @connor, unless you can wait until the Xmas after next (!) I think this one really belongs to people who know the Front-End <–> Back-End architecture intimately :slight_smile: