Trying to get a Pi (with Volumio) to connect to my wifi hotspot
So I know this is involved with the Volumio OS, but I was hoping to reach any proficient Linux/Pi users that know how to mess with the supplicant.conf file and things I should look for when connecting a Pi to my phones hotspot. I don't get a lot of help on Volumio forums, I have my CCNA, and know some coding methods. I really want to get my home project working, so that's why I'm asking here.
I basically have not been able to get my pi to connect to only my hotspot. Currently it works if I have my hotspot on, and connect to my home wifi. I used journtalctl commands and found something that looks weird:
When I connect to my phone hotspot, I see it goes through the handshake steps, checks for the proper key, it says “connected to: Pixel 5”, “key negotiation completed”, “send eapol packet, recv eapol packet”, Once it gets to association it says " association success", Then: “rtw_cfg80211_indicates_connect(wlan0) BSS not found !!” then it has another association success, with it basically looking like it fails saying “Trying to associate with (instert my AP MAC ADDR)” I have not been able to use Wireshark but I think it's failing to associate. Is that what this looks like? I’ve never had an association issue before. Another weird thing is when I command “sudo iwconfig” it says “security mode: open” not sure if that is supposed to show my wifi encryption method instead?
It's really late so, tomorrow I will borrow a friends phone, because I'm not sure it's working completely with my phone.
do you know?
how many words do you know
See also questions close to this topic
-
Updating a Single Column In Room Database
That's the function I'm using for updat
private fun updateSettingsDatabase(settingsDao: SettingsDao) { lifecycleScope.launch { settingsDao.update(SettingsEntity( 1, nightMode=nightModeResult, )) } } @Query("SELECT * FROM `settings-table`") fun fetchCurrentSettings(): Flow<List<SettingsEntity>>
I specified
nightMode=
because I thought that this way I'm only updating this colummn, but it turns out that it resets every column, how do I update a single column, while keeping the values the rest of the columns? -
Using EdittextPreference for Goto search
sorry for my poor English. I want to use EditTextPreference in my bottom nav like the pic below, ![screenshot][1]
I have recycleview xml in my project with in many sub cardview layouts(which is scrollable) and I want to create item in the bottom nav which is called "Goto". When the "Goto" item is clicked i want it to pop-up like the screenshot. And when user enters a number(according to the cardviews i.e if the number of cardview is 40 user must enter 1-40) I want to search the cardview by its ID. Thank you and I hope u got it, If u have any questions let me know [1]: https://i.stack.imgur.com/grK8P.jpg
My xml format look like this. As you see in the blow since the cardviews are huge in number it is not cool to scroll all the way down that is why i need Goto item in the bottom nav to search it by its ID when the user click number in the EditTextPreference as u see in the screenshot. i.e The screenshot is not from my app
<LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> .. .. .. .. many more..
-
IOS Launcher in android studio
I'm trying to change the whole Android OS installed app icons into IOS icons, please help me with the proper code or library for android kotlin
-
Force 2.4GHz WiFi on Android 11
I have a phone with Android 11 and I want it to connect to the 2.4GHz band of the WiFi. The WiFi has both the 2.4GHz and 5GHz band with the same SSID. I am working on some testing which requires me to not change any settings on the router. Is it possible to have the phone get connected to the 2.4GHz band and not the 5GHz band? Previously, Android had options to select the band in Advanced WiFi settings, but it is not present right now and I cannot have two SSIDs for the 2 bands.
-
How to fix the problem with error "No virtual method" on android
I am writing an application in android studio for android Pie. I want to get wifi info.
@RequiresApi(api = Build.VERSION_CODES.S) public String getData() { String wifiDataTest; WifiInfo wifiInfo = wifiManager.getConnectionInfo(); int frequency = wifiInfo.getFrequency(); int ipAddress = wifiInfo.getIpAddress(); int speed = wifiInfo.getLinkSpeed(); String ssid = wifiInfo.getSSID(); int wifiStandard = wifiInfo.getWifiStandard(); wifiDataTest = "Frequency [MHz]: " + frequency + "\nIP address: " + ipAddress + "\nSpeed [Mbps]: " + speed + "\nSSID: " + ssid + "\nWifi standard: " + wifiStandard; return "WIFI\n" + wifiDataTest; }
With
int wifiStandard = wifiInfo.getWifiStandard ();
shows me the error:E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sensors, PID: 11040 java.lang.NoSuchMethodError: No virtual method getWifiStandard()I in class Landroid/net/wifi/WifiInfo; or its super classes (declaration of 'android.net.wifi.WifiInfo' appears in /system/framework/framework.jar)
I have not found information about such an error anywhere. Everything before
getWifiStandard ();
worked fine. -
Terrarium Sun Sim Led Strip - Need smooth brightness transitions between leds
Life had something different in store for me and so I haven't written a program in over 5 years: I'm a tad rusty. I'm building a new vivarium/terrarium for some frogs who require strict climate control. I decided to ad a strip of LEDs (the apa102) to simulate some positional sunlight. I dusted off my old Raspberry Pi 2b, wired up the 60 LED strip and got to playing. What I have written now, see code below, works for all intents and purposes (the cycle is set very fast for testing purposes). However, what I really want is for the LED's to slowly transition over into each other instead of jumping, for a more smooth and organic repositioning of the 'sun'. For the life of me I can't figure it out, meaning: your help will be much appreciated! I'd imagine it's a very simple line of code but I'm dead in the water. Here's what I imagined:
Transitioning would look like this: 3 LED's will be in operation at any given time. LED A, B & C. LED B is always at 100% brightness. On our 60 LED strip, our LEDs start at position 1, 2 & 3. LED A & B start at 100% brightness, C starts at 0%. To 'move' the sun, LED A will start to decrease its brightness to 0%, all while LED C increases its brightness to 100%. This ends the cycle. Now LEDs A, B & C will move up one position. Our LEDS are now on positions 2, 3 & 4. Repeat.
The library with drivers for the apa102 I use is: github.com/tinue/apa102-pi
import time from apa102_pi.driver import colorcycletemplate from apa102_pi.driver import apa102 NUM_LED = 60 BRIGHTNESS = 31 COLOR_SUN = 0xFCE570 class Sun(colorcycletemplate.ColorCycleTemplate): def init(self, strip, num_led): strip.set_pixel_rgb(0, COLOR_SUN, 5) #5 = brightness factor strip.set_pixel_rgb(1, COLOR_SUN) strip.set_pixel_rgb(2, COLOR_SUN, 5) def update(self, strip, num_led, num_steps_per_cycle, current_step, current_cycle): strip.rotate() return 1 def main(): strip = apa102.APA102(num_led=NUM_LED) strip.clear_strip() strip.set_pixel_rgb(0, 0x00FF00) strip.show() time.sleep(2) strip.clear_strip() my_cycle = Sun(num_led=NUM_LED, pause_value=3, num_steps_per_cycle=NUM_LED, num_cycles=2, order='rgb', global_brightness=BRIGHTNESS) my_cycle.start() time.sleep(3) if __name__ == '__main__': main()
-
Raspberry Pi 2 B Tkinter performance problem
I am trying to write a simple python program for a Rasperry Pi 2 Model B. When finished it should be able to get a few values via uart and display one out of 200 images based on that. Additionally, it will show a video and a few static images. For that, I use Tkinter and Tkvideo. But now I run in to serious performance problems. I thought this is a simple Project and would work. But the Raspberry has trouble, even if I only start VS Code on it, and the text input has a delay of over a second.
As OS, I use (Debian version: 11 (bullseye)), the python version is 3.9
I reduced the Code, so it only opens a window and plays the one video: Even if I only show the video, it renders in ca. 1-2 fps.
from tkinter import * from tkvideo import tkvideo from PIL import Image, ImageTk class App(): def __init__(self): self.timeStartMS = int(round(time.time() * 1000)) self.root = Tk() self.root.geometry("1280x800") label3 = Label(self.root, width=200, height=800, borderwidth=2, relief="groove") label3.place(x=420,y=0) label3v = Label(label3) label3v.place(x=200,y=100) player = tkvideo("Video/testVideo.mp4", label3v ,loop=1) player.play() self.root.after(self.msPerFrame, self.update) self.root.mainloop() app = App()
Is a Raspberry Pi 2 B simply not strong enough for this, or what else could I do to make it work? Thanks in advance.
-
Pulseeffects unable to see audio source
I am having issues with Pulseeffects on Pi OS Debian Buster. I am using custom distribution called "Volumio" which is special kind of buster that focus on music and listening to music from more sources (bluetooth, airplay, network drives, local music etc.) I also have GPIO sound card connected in there "HiFiBerry DAC2 Pro"
This Volumio OS has its custom alsa configuration which looks like this:
pcm.!default { type copy slave.pcm "volumio" } pcm.volumio { type copy slave.pcm "volumioOutput" } # There is always a plug before the hardware to be safe pcm.volumioOutput { type plug slave.pcm "volumioHw" } pcm.volumioHw { type hw card "sndrpihifiberry" }
And here my issue starts. When i launch pulseeffects and i play any music from any source, equalization is not working. In pulseeffects there is something called "apps.monitor" which should monitor which apps are playing something and then automatically start sourcing music from there but it doesnt work. In pulseeffects there are also monitors of outputs like jack or HDMI but those are IDLE, not muted, they just dont "see" the music iam playing. Iam so frustrated from this its been several weeks and iam still trying to solve it or get some help but unsuccessfully.
There is one scenario in which music is being equalized and played how it should be, actually two, but its more like bypassing actual problem. In Shairport-sync (package to have airplay playback from apple devices) you can set in its config file that it should send all audio to PA backed (pulseaudio) and if i do that, then its properly sent to pulseeffects, equalized and played. Another scenario in which iam able to equalize and play music is when i play locally saved files and i edit MPD.conf to send audio locally (127.0.0.1) over RTP stream and i enable RTP listening in pulseeffects, then it gets there, gets equalized and played.
But these two ways are not how it should work normally. It should either recognize any app (shairport, MPD or others) as an APP which plays music and then source that music from it. And if not then at least monitor of standard 3.5 mm jack should work, i could then set Volumio to play everything through 3.5 Jack, in pulseeffects set input to 3.5 Jack monitor and output to my Hifiberry and it would work but both app.monitor and 3.5 jack monitor are acting like iam not playing anything even though i am playing music.
So what am i doing wrong?
-
How to: Upgrade to Python 3.8.5 on ArchLinux / Raspbian / Volumio / Raspberry
I've faced the Problem, that my code needs at least Python 3.5... therfore I upgraded to Python 3.5.2. Unfortunatly the support for Python 3.5.x ehas ended and the support for PIP 21.0 will end in a few month... So I needed to upgrade aggain. You can find the whole Code behind it here. As soon I started to attemped the Upgrade/Upodate I noticed:
- There are no Guides in the Web to install Python 3.8.5 on a Raspberry/ArchLinux/Raspbian
- If you do the usual stepps you mess up SSL -> No Webinterface, No SSH, No GIT, No Pip Install...
So here you are, if you follow the steps, you should have a running Python 3.8.5 (Alt-)Installation.
Please Notice: In my Installation Steps I used the standard folder /home/USER/ -> Please change this to your Username! (For Volumio this would be: /home/volumio)
sudo apt-get update sudo apt-get install -y build-essential libffi-dev libc6-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev cd mkdir /home/USER/src cd /home/USER/src && mkdir openssl && cd openssl wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz tar xvf openssl-1.1.1b.tar.gz && cd openssl-1.1.1b ./config --prefix=/home/USER/src/openssl-1.1.1b --openssldir=/home/USER/src/openssl-1.1.1b && make && sudo make install cd echo "/home/USER/src/openssl-1.1.1b/lib" >> /etc/ld.so.conf.d sudo ldconfig export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/USER/src/openssl-1.1.1b/lib cd /home/USER/src && mkdir python && cd python wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz tar xf Python-3.8.5.tar.xz cd Python-3.8.5 sudo nano /home/USER/src/python/Python-3.8.5/Modules/Setup
Here please UN-comment lines 210-213, and change line 210 to:
SSL=/home/USER/src/openssl-1.1.1b _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -lssl -lcrypto
Save and exit with: ctrl+x, y, enter
./configure --prefix=/home/USER/src/Python-3.8.5 --with-openssl=/home/USER/src/openssl-1.1.1b && make -j4 && sudo make altinstall export PATH=~/home/USER/src/Python-3.8.5/bin:$PATH export LD_LIBRARY_PATh=/home/USER/src/Python-3.8.5/bin sudo /home/USER/src/Python-3.8.5/bin/pip3.8 install -U pip # sudo /home/USER/src/Python-3.8.5/bin/pip3.8 install -U setuptools # sudo /home/USER/src/Python-3.8.5/bin/pip3.8 install --upgrade setuptools pip wheel #
Now you are ready to go!
To use PIP3(.8) type: sudo /home/USER/src/Python-3.8.5/bin/pip3.8 YOURCOMMAND --YOUROPTIONS
To use Python3(.8) type: sudo /home/USER/src/Python-3.8.5/bin/python3.8 YOURCOMMAND --YOUROPTIONS
The Idea behind it: We Install OpenSSL 1.1.1b (needed by Python 3.8.5) to an alternative directory, so that the standard OpenSSL is still functional. After that, we Alt-Install Python 3.8.5 and tell it in the installation Process to use our custom OpenSSL Installation.
My Solution may not be the best, but it is functional. If you have ideas how to make it better / simpler, please make a comment.
Cheers!