You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having throble to connect my nerves_hub_web with my nerves project (firmware),
using the nerves_hub_link and nerves_hub_cli, and trying to connect to my local nerves_hub_web,
i am not using the default certificates, inside the test folder
pls note this variable NERVES_HUB_CA_DIR, i just assign the dir folder where i put the certificates,
i found this env var in config/dev.exs in nerves_hub_web,
and on the firmware project i change the config/dev.exs with the follow code:
Move nerveshub.nerves-hub.org.pem and nerveshub.nerves-hub.org-key.pem to /home/me/.nerves-hub
when i run
mix nerves_hub.device create --identifier myid --tag test --description "i am a device"
i had this:
Nerves environment
MIX_TARGET: rpi4
MIX_ENV: dev
Generated firmeware app
NervesHub server: nerveshub.nerves-hub.org:4001
NervesHub organization: myorg
14:49:34.567 [warning] [NervesHubLink] No CA store or :cacerts have been specified. Request will fail
** (ArgumentError) errors were found at the given arguments:
* 1st argument: not a binary
:erlang.binary_to_atom(nil, :utf8)
(tesla 1.8.0) lib/tesla/adapter/mint.ex:161: Tesla.Adapter.Mint.open_conn/2
(tesla 1.8.0) lib/tesla/adapter/mint.ex:121: Tesla.Adapter.Mint.do_request/5
(tesla 1.8.0) lib/tesla/adapter/mint.ex:61: Tesla.Adapter.Mint.call/2
(tesla 1.8.0) lib/tesla/middleware/json.ex:57: Tesla.Middleware.JSON.call/3
(tesla 1.8.0) lib/tesla/middleware/follow_redirects.ex:46: Tesla.Middleware.FollowRedirects.redirect/3
(nerves_hub_cli 2.0.0) lib/nerves_hub_cli/api.ex:42: NervesHubCLI.API.request/4
(nerves_hub_cli 2.0.0) lib/mix/tasks/nerves_hub.device.ex:278: Mix.Tasks.NervesHub.Device.create/3
and my firmware is not connected to nerves_hub and the nerves_hub_web not shows new devices
The text was updated successfully, but these errors were encountered:
Hello folks,
I'm having throble to connect my nerves_hub_web with my nerves project (firmware),
using the nerves_hub_link and nerves_hub_cli, and trying to connect to my local nerves_hub_web,
i am not using the default certificates, inside the test folder
i will walkthrow about my setup:
so, i cloned https://github.com/nerves-hub/nerves_hub_web
and the nerves_hub_web works perfect
after that i create a new nerves project with command line:
and put the sdcard into my rpi4 and connected into my network
so the command
mix update
works fine and nerves booted without any problemsthen i understand that i need to connect the link, so i did:
in the nerves_hub_web clone folder i created a "env" file: /home/me/nerves_hub_web/.env.dev.local
with the follow content
i found this reference in a elixirforum post: https://elixirforum.com/t/what-is-the-proper-certificates-configuration-for-nerveshub-2-0-and-nerveshublink/55809
pls note this variable
NERVES_HUB_CA_DIR
, i just assign the dir folder where i put the certificates,i found this env var in config/dev.exs in nerves_hub_web,
and on the firmware project i change the config/dev.exs with the follow code:
and the mix.exs:
and a .env file /home/me/firmeware/.env.nerves_hub_cli with:
the
NERVES_HUB_TOKEN
i created using the defaut user on nerves_hub_web on http://localhost:4000/account/nerveshub/tokensand then i follow this gist to create the certificates:
https://gist.github.com/guillego/86b31452e639d7558c0e63b6937606bc
and i finish creating the certificates like
Generate the ca.key with
Generate the ca.pem with
openssl req -x509 -new -nodes -key ca.key -sha256 -days 1825 -out ca.pem -subj '/OU=NervesHub/'
Generate nerveshub.nerves-hub.org-key.pem with
Generate nerveshub.nerves-hub.org.csr with
openssl req -new -key nerveshub.nerves-hub.org-key.pem -out nerveshub.nerves-hub.org.csr -subj '/CN=nerveshub.nerves-hub.org/'
Create nerveshub.nerves-hub.org.ext with:
authorityKeyIdentifier=keyid,issuer basicConstraints=CA:FALSE keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment [alt_names] DNS.1 = nerveshub.nerves-hub.org
Generate nerveshub.nerves-hub.org.pem:
Move nerveshub.nerves-hub.org.pem and nerveshub.nerves-hub.org-key.pem to /home/me/.nerves-hub
when i run
i had this:
and my firmware is not connected to nerves_hub and the nerves_hub_web not shows new devices
The text was updated successfully, but these errors were encountered: