Damirados

Damirados

How to use custom wifi drivers with Nerves?

Hi, for my project I need patched version of wifi drivers.
I already have custom nerves system but I have never done custom drivers.
How would I go about this after I compile drivers?
I will also need this card to be unmanaged, how does that work with VintageNet do I just not include it in config?

Marked As Solved

pojiro

pojiro

Hi!

When I added a driver, kernel-module, before, I made a buildroot package like following.

https://github.com/pojiro/nerves_system_rpi4_mouse/commit/5b6cc45f9962c87263107f0083e6047f2b7e4b43

Related Buildroot document is Chapter 18. Adding new packages to Buildroot.

Also Liked

abelino

abelino

@Damirados At a quick glance, the repo you link is a hard fork from fariouche/rtl8812au-unified which is a soft fork of aircrack-ng/rtl8812au. Buildroot’s has a package for aircrack-ng/rtl8812au and since svpcom’s repo is also merging in upstream changes from fariouche’s repo, I see two options for you:

  1. Generate a patch that captures the differences between svpcom and fariouche’s repo and add it to your patches/rtl8812au-aircrack-ng directory. This allows you to use the package available in upstream buildroot and also bring in all the code changes from svpcom in the form of a single or multiple patch files. More importantly, you don’t need to redefine a package. (This is the approach I would take long term)

NOTE: User defined packages can’t use existing names used by upstream packages.

  1. Define a custom package by copying package/rtl8812au-aircrack-ng. Rename it. Modify RTL8821AU_SITE to point to svpcom repo and fix any compilation issues that might come up. This might be the easier option of the two approaches because generating a patch file might require dealing with conflicts.

Buildroot also has an alternative driver you might want to look at: package/rtl8821au

Once you have buildroot compiling your driver, you will need to enable it in the linux defconfig via make linux-menuconfig or by editing the system’s linux defconfig file directly.

Damirados

Damirados

I am currently building companion computer system for autonomous drones that enables live streaming.

As test drone I am using 5 inch FPV drone with flight controller capable of running ardupilot.

I am basically implementing OpenHD using nerves and membrane. So video transmission, bidirectional Mavlink and data tunnel over wifibroadcast

Once that is done I plan to experiment with features like object detection and tracking…

Damirados

Damirados

Thanks,

I found a package that is very similar to the one I am trying to compile, so I think it won’t be that hard using it as starting point.

Damirados

Damirados

Here is PR that add this package to my nerves_system
https://github.com/colibri-cam/nerves_system_rpi0_2_drone/pull/1/files

Damirados

Damirados

I will create chat thread once there is some code to show. It is probably going to take few weeks.

But to quickly answer you questions.

Currently drone is controlled separately with ELRS radio but that is only for testing purposes and manual flying.

Autonomous scenario is different. Flight controller is running ardupilot, FC software that is capable of autonomous flying. Autonomous mission is a list of 3D positions (waypoints) along with some parameters(orientation, velocity…). Mission can be controlled using mavlink connection (can be achieved in many ways, I am using UART to connect FC and RPI). But companion computer needs to just do it’s stuff fast enough to deliver Ardupilot it’s next waypoint before one that it’s heading to currently is reached.

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Kurisu
For example for a current url like http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2, I would like to get: ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Other popular topics Top

JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement