mcarlin
I’m trying to set a fixed IP address for the USB VintageNetDirect type using VintageNet. Currently am trying to use the same syntax as a wired Ethernet (VintageNetEthernet), but this is failing. Below is a fragment from the target.exs.
config :vintage_net,
regulatory_domain: "US",
config: [
{"usb0",
%{
type: VintageNetDirect,
ipv4: %{
method: :static,
address: "192.168.20.10",
prefix_length: 24,
gateway: "192.168.20.1",
name_servers: ["8.8.4.4"]
}
}
},
{"eth0",
%{
type: VintageNetEthernet,
ipv4: %{method: :dhcp}
}
}
]
RingLogger shows that the configuration is failing, and usb0 is getting the internal default configuration inet 172.31.133.37 netmask 255.255.255.252. Does VintageNetDirect support fixed IP addresses?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
fhunleth
VintageNetDirectis specialized to the point-to-point use case with no routing or anything else. If you switch your"usb0"configuration toVintageNetEthernet, it looks like the configuration should work:mcarlin
Thanks Frank,
This doesn’t work at compile time, but does work at runtime when I configure from the iex prompt. The IP address takes (I can ping and load web pages), but something is not as VintageNet.info returns errors after the VintageNetEthernet assignment. No big issue, I’m using this for testing multiple prototype units on the same network, we won’t be using usb networking in our production hardware. Below is a console grab if you are interested:
iex(2)> ifconfiglo: flags=[:up, :loopback, :running]inet 127.0.0.1 netmask 255.0.0.0inet ::1 netmask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffffhwaddr 00:00:00:00:00:00sit0: flags=[]hwaddr 00:00:00:00usb0: flags=[:up, :broadcast, :running, :multicast]inet 172.31.133.37 netmask 255.255.255.252 broadcast 172.31.133.37hwaddr ca:08:56:00:13:beiex(3)> VintageNet.configure("usb0", %{ type: VintageNetEthernet, ipv4: %{ method: :static, address: "192.168.20.10", prefix_length: 24, gateway: "192.168.20.1", name_servers: ["8.8.4.4"] } }):okiex(4)> [ 73.596366] dwc2 49000000.usb-otg: dwc2_hsotg_ep_sethalt(ep 46007d83 ep1in, 0)[ 73.603222] dwc2 49000000.usb-otg: dwc2_hsotg_ep_sethalt(ep 8db1c0f3 ep1out, 0)[ 73.610577] dwc2 49000000.usb-otg: dwc2_hsotg_ep_sethalt(ep b82c4a2e ep2in, 0)niliex(5)> ifconfiglo: flags=[:up, :loopback, :running]inet 127.0.0.1 netmask 255.0.0.0inet ::1 netmask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffffhwaddr 00:00:00:00:00:00sit0: flags=[]hwaddr 00:00:00:00usb0: flags=[:up, :broadcast, :running, :multicast]inet 192.168.20.10 netmask 255.255.255.0 broadcast 192.168.20.10hwaddr ca:08:56:00:13:beiex(6)> VintageNet.infoVintageNet 0.7.6** (ArgumentError) argument error(stdlib 3.13) :ets.match(VintageNet, {["interface" | :"$1"], :"$2"})(vintage_net 0.7.6) lib/vintage_net/property_table/table.ex:28: VintageNet.PropertyTable.Table.get_by_prefix/2(vintage_net 0.7.6) lib/vintage_net.ex:83: VintageNet.all_interfaces/0(vintage_net 0.7.6) lib/vintage_net/info.ex:22: VintageNet.Info.do_info/1-Mark
fhunleth
Hi Mark,
This isn’t a configuring that I use, but I definitely want it to work as well - especially since it seems like it should.
We’ve made a few updates to VintageNet since 0.7.6. Is it possible for you to update? 0.7.9 should be a straightforward update. The latest is 0.9.0 which has breaking API changes, but they don’t affect many people. The updates include a few improvements to
VintageNet.infoto give more debugging information.I don’t believe that any of the updates address whatever is causing compile-time configuration to not work. (I’m assuming that you don’t have a run-time configuration that is overriding it). In any case, could you file a bug with a few details on your device’s network connection so that we can track and fix this issue.
Thanks!!
mcarlin
Hi Frank,
Will be looking at this again early next week. Will be happy to file bug, on GitHub or somewhere else?
Thanks for the info!
fhunleth
Thanks!
Here’s the preferred place for filing an issue: Issues · nerves-networking/vintage_net · GitHub.