1

I am currently working in an environment without an OS, just binary boot files as well as .ini files that define the stuff like upnp audio connection in between locally-connected raspberry pis (the environment is supposed to simulate a multiroom effect) and general info like hostnames. Currently it can connect to a network only via ethernet, but I would like to run it via WiFi.

As there is no OS though, there doesn't seem to be a terminal either (I might be wrong), so I am not sure how to access it and setup the adapter myself. I would truly appreciate if someone could point out a way for a fix (I already checked some bare metal threads but a lot of them seem either outdated or not really helpful).

Thank you up front!

5
  • This makes no sense. Please give us some links to whatever you are using. The chances that a "real" OS like Linux isn't involved is very low, especially if "image" files are used.
    – flakeshake
    Feb 7, 2018 at 11:55
  • If it is bare-metal, there is no OS. For instance, see this github project.
    – jogco
    Feb 8, 2018 at 11:44
  • "there doesn't seem to be a terminal either (I might be wrong)" -> This strongly implies you did not write the bare metal code yourself, since if you did there would no room for doubt. Also, what you describe is an operating system, even if it is very minimal, written from scratch, and apparently nameless. You need to explain in more detail the context, where you got this code, how it was installed, etc.
    – goldilocks
    Feb 8, 2018 at 12:01
  • Thanks for your answers all. I can't give exact details of what the SD card consists of, but I can tell you that /etc/ is almost entirely empty, with just a file stating the hostname of the device, and inside of the "/boot/", there are binary files like u-boot, bootcode, boot and dev. I managed to access its terminal via minicom today, I just had a faulty uART adapter, where the TXD and RXD are swapped for some reason. Thanks for letting me know that I need to be more precise too, I am still new to asking questions here and stuff like this is good to know for the future.
    – sigmasrb
    Feb 9, 2018 at 11:04
  • @sigmasrb I'm also looking for an RPi bare metal WiFi driver that does not depend on a Linux kernel. USPi is the closest thing, but it's only for Ethernet. I'm trying to figure out if the Cypress Wi-Fi chip can be accessed as a USB device. Dec 12, 2018 at 15:56

2 Answers 2

1

I don't have much experience from bare metal programming on the Pi, but I do know that is much like working with a MCU. You should think of it as if the Pi is an Arduino and your programming environment is a computer with cross compiler, kind of like the Arduino IDE. (just not an IDE in this case).

Following that analogy, there are no drivers to "install". Instead you need include libraries that support the hardware you intend to use. I guess you are aware of that as ethernet is not supported out-of-the-box for bare metal Pi, it is supported by the USPi library. The documentation for a library/driver should tell you how to use it. Or you'll need to read the source code and possible examples. And all configuration for WiFi must be done when writing the code. Or code must be written to allow configuration, like when using an ESP8266 with the Arduino IDE, in which case you must also provide a user interface to do the actual configuration.

As of February 2018 I'm not aware of any WiFi library/driver for bare metal Pi, any pointers or links are welcome! An obvious solution for bare metal gurus would be to port an existing library for ARM. For RPi 3 and Pi Zero W users that want to take advantage of the internal WiFi, there is a complicating factor: the Broadcom chip is not exactly well documented..

Now, I'm ramblin', but it seems to me you are crossing the creek to get water.... If you just want synchronized multi-room audio, there are other solutions that can take latency into account. Just google for it. Some of these work on the RPi too, and does not require you going bare metal.

On the other hand; if you want to educate yourself, you're up for an adventure!

-1

This repo has a playbook to setup wifi: https://github.com/motdotla/ansible-pi

5
  • 1
    As I read there is to clone the project and edit the wpa_supplicant.conf and hosts files. But as stated in the question there is no operating system to do that ...
    – Ingo
    Feb 7, 2018 at 11:28
  • Sorry, I didn't notice to that part. I think you need a pc to setup wifi. or connect it to Monitor, enable ssh and do the same steps in terminal. Feb 7, 2018 at 11:30
  • Yes, and the pc must have an ARM processor. I only have one with intel or amd. But D. Bakic could use a second raspi? Interesting this question.
    – Ingo
    Feb 7, 2018 at 11:42
  • Why the PC needs ARM processor? Feb 7, 2018 at 11:43
  • The driver needs to compiled for an ARM. OK, I know what you mean. You can cross compile.
    – Ingo
    Feb 7, 2018 at 11:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.