Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "hostapd"
-
My setup at work as a juniour dev. Got a month ago a 3rd monitor (the left), because I'm working on some backend services and had to test them with a touchscreen. Now only the frontend dev and I have 3 monitors in the whole company 😁6
-
Developer vs Tester
(Spoiler alert: developer wins)
My last developent was quite big and is now in our system testing department. So last week i got every 20 minutes a call from the tester, that something did not work as expected. For about 90% of the time i looked at the testing setup or the logs and told him, that the data is wrong or he used the tool wrong. After a couple of days i got mad because of his frequent interruptions. So I decided to make a list. Every time he came to me with an "error" i checked it and made a line for "User Error" or "Programming Error". He did not liked that much, because the User Error collum startet to grow fast:
User Errors: ||||| |||
Programming Errors: |||
Now he checks his testing data and the logs 3 times before he calls me and he hardly finds any "errors" anymore.3 -
So I have that custom-made wifi router I've built. And it uses a USB wifi adapter with AC (wifi5) capability - the fastest one I could find in AliExpress.
I set it up a while ago - the internet access works fine, although speeds are somewhat sluggish. But hey, what to expect from a cheapo on Ali! Not to mention it's USB, not a PCIe...
A few days ago I ran a few speedtest.net tests with my actual AC router and the one I've built. Results were so different I wanted to cry :( some pathetic 23Mbps with my custom router :(
This evening I had some time on my hands and finally decided to have an umpteenth look.
nmcli d wifi
this is what caught my eye first. The RATE column listed my custom router as 54Mbps, whereas the actual router had 195Mbps.
I have reviewed the hostapd configuration sooo many times - this time nothing caught my eye as well.
Googling did not give anything obvious as well.
What do we do next? Yes, that's right - enable debug and read the logs.
> VHT (IEEE 802.11ac) with WPA/WPA2 requires CCMP/GCMP to be enabled, disabling VHT capabilities
This is one of the lines at the top of the log. Waaaaiiitttt.. VHT is something I definitely want with ac -- why does it disable that??? Sounds like a configuration fuckup rather than the HW limitation! And config fuckups CAN be fixed!
Turns out, an innocently looking
`wpa_pairwise=TKIP`
change into
`wpa_pairwise=TKIP CCMP`
made a world of a difference!
:wq
!hostapd
connect to the hostapd hotspot and run that iperf3 test again, and... Oh my. Oh boi! My pants fell off -- the speed increased >3x times!
A quick speedtest.net test deems my custom router's download speeds hardly any worse than the speeds obtained using my LInksys!!
The moral of the story: no matter how innocent some configurations look, they might make a huge difference. And RTFL [read the fucking logs]
In the pic -- left - my actual router, right - my custom-built router with a USB wifi adapter. Not too shabby!7 -
My day in one sentence: I found about 20 ways in which my code doesn't work as expected.
I hate these days, where you spend 80% of the time debugging and always find tiny new bugs.5 -
How to NOT write unit tests:
A colleague of mine has developed a new package of software, many of our new projects are going to use. So in his presentation of the new functionalities he also showed us that he used unit tests to cover some of his code. So i asked him to show me that all tests passes.
He: I can show you, but one test suit will fail currently.
Me: Why?? You told us, everything is finished and works fine.
He: That's right, but they will fail because I'm currently not in the customer VPN.
Me: Excuse me, WHAT??
He: Yes, I'm not in the VPN that connects me to this one customers facility in Hungary, where the counterpart of the software is runnung live.
Me: YOU WROTE UNIT TESTS THAT TEST AGAINST A RUNNING LIVE FACILITY??
He: Yes, so I can check, that the telegramms I send are right. If I get back the right acknowledgement, the telegramm structure is right and my code is working.
Me: You know, that is not the porpose of unit tests? You know, that these test should run in any environment?
He: But they are proving, that my code is working. Everytime I change something I connect to the customer and let the tests run.
Me: ...
Despite the help of some other developers we could not convince him that this was not good and he should remove them. So now this package is used in 2 new projects and this test suit is still failing, everytime you execute all unit tests.7 -
## Building my own router
So after poor luck with mPCIe in my miniPC I decided to go with USB wifi solutions. So I got the https://aliexpress.com/item/... , hooked it up and started setting things up. Took me a day to figure out that firewalld (CentOS7/8 firewall) is not directly compatible with raw iptables commands. Damn it! But hey, a lesson learnt is time well spent!
Installed named, dhcpd, hostapd, disabled NetworkManager for my wifi card, etc.. And had to learn another lesson -- if a netowrk interface is bridged then iptables sees the bridge rather than the raw interface. That's another 2 hours well spent :)
In the end I have a working AP!!! It's still hooked in to my router via RJ45, but it does work and does work quite well!
Here's some comparison for now:
via router (2.4): https://speedtest.net/result/...
via router (5): https://speedtest.net/result/...
via miniPC (2.4): https://speedtest.net/result/...
via miniPC (5): <TBD>
Not that bad, aye?
All in all I'm happy with my decision to build a miniPC based router. Now I have the modularity I wanted so mush and a complete control on my networking! Can't wait for wifi6 USB dongles to be released :)3 -
So I'm writing this code, that does 2 important things, that cannot be seperated. I run the code, thing1 is correctly executed, thing2 not. No fucking idea, why this happens. Execute again, same result. Debugg the wohle thing, now everything works fine.
WHAT?
I check the code, there are no background tasks, no paralell processing, nothing that should go wrong.
Asking a Senior developer for help, he also has no fucking idea. He tells me to try to wait one second between the two things. Looking for a delay() or wait() function in my programming language but there is none. Ok, building my own delay, writing a "do 1000 times" loop, calculate some shit in it. Execute the code, it works perfectly.
Nobody has a fucking idea, why this is happening and why this solution is working, but now the code is productive and it works fine.9 -
Not really a rant (?)
I started my first programming job in January this year. I went there staight after Highschool, so i had no real experience, knew only the basics of software development and my written code was quite a mess. So one of my first real tasks (after 2 months) was to write a business logic for batch handling (for a warehouse management system). I invested quite some time to develop a suitable architecture, talked with some other developers and wanted to cover the whole thing with unit tests (which really nobody at the company uses). So I spent about 3 weeks to write the whole thing, test it and improve it many times. It worked perfectly and I got pretty good feedback from the code-review.
1 month ago - the code worked perfectly and was multiple times testet (also by the client) - the client came with some totally new requirements for the batch handling. I tried to impelemt them, but soon found out, that the architecture doesn't supported them, it was not build for the required handling and would soon become a totally mess, if i tried to make it work.
So I was pretty mad, because I had to change the whole fucking thing, but I also wanted to make it better. I hab gained some experience and decided (with some help of a senior dev) to make a completely new try with a different architecture, that can be easily expanded, if needed. I build my concept, wrote and tested the whole new code in 3 days. Fucking 3 days compared to the initial 3 weeks, and it worked, better and even faster.
I was quite pissed to delete the old code, and especially that i had wasted 3 weeks for it and had to struggle with many different things. But I lerarned so much from it and also in the months between, that I was also really glad that I had the opportiunity to write it again.
This whole thing made me now realize that this is, what I really like to do and what I'm good in. I really enjoy learning new things and for me, programming is the best and easiest way to do it. Despite alle the cons and annoying side effects of it, I really found my dream job here.1 -
- wake up
- check the news
- find some interesting video to watch [listen] to
- go get some breakfast
- heat it up in the microwave
*BT headset* stops receiving audio
*video player* stops receiving data via wifi
- write a rant in dR
*phone* sorry, wifi conn jeopardised, can't post
aahhh, the beauty of wireless. If only hostapd had a flag bypass_microwave_noise=1 for bgn APs15 -
## building my own router
I hoped things would go more smoothly :)
Anyway, my new miniPC easily accepted CentOS 8 - no fuss here. And I've got to say - I love CentOS8 so far! Shell has amazing nifty tricks, UI (gnome3) is also snappy, video/audio/ethernet,.. everything works.
What I did NOT expect is hardware being off. Well okay, the price was low - it was obvious smth is not right. But still.. I decided to build my own router so that I could swap wifi card whenever I want. So that I could run my own network services in there. Turns out - the card swapping is not as easy as one might think.
I got the AX200 WiFi6 card for that very purpose. But once plugged in the OS can only see it's bluetooth module. Weird... What's even weirder is that even though the card is PCIe, the OS uses btusb module to talk to that device. What? USB?? emm.. What??
And there it is. After opening it up again I noticed that the mPCIe area is marked with a label: "USB WIFI / WWAN". USB? Does that mean this PCIe slot is wired into the USB bus? Not impossible I guess.
Googling for a "pcie wifi over usb" or smth like that brought me to one reddit (I think?) where someone wanted to build a DIY wifi mPCIe -> USB adapter and someone else adviced hime that (for some reason) at best he could only get bluetooth working (hey! just like me!). It's got to do smth with pcie channels and USB being too weak to handle all that load, or smth.. IDK, I'm not a HW guy.
Well that sucks then! I have a mPCIe slot that does not work as a PCIe. Shit! So I guess the best I could do is to plug back in the same wifi card that came with the device. It smells like 2003 - supports only g protocol. Fine, let's try that. Maybe I'll find a way to work around this mPCIe limitation later on (USB adapter or smth... except there are no USB WIFI6 dongles yet :( ). So I plug it back in and start turning it into a router. Disable NetworkManager, configure static NCs' settings, install dhcpd, hostapd, bind and others. Looks like all is done! Now it's time to start it all. systemctl start hostapd --> FAILED. wtf? journalctl says it could not initialize a driver. umm okay? Why? Forums say I should airodump-ng check and kill whatever's using that device. Fine. airodumo reveals avahi and wpa_suppl are still using it. kill, kill, GOTTA KILL 'EM ALL!! Starting hostapd again -- same shit... wtf?
iw list
My gawd... That shitty network card does not even support AP mode :( I mean.. My USB wifi dongle for 2€ supports 2x more modes, is faster, has better range and is easier to work with than this old tart!
Yeah. That was an interesting day. When enfironment engineers break my testing environments at work I'm glad I have where to spend my time now.
BTW any ideas how to bypass this mPCIe nonsense? Come on, there are USB GPUs out there.. Why can't they make a USB (or dual-USB if they really need to) mPCIe adapter?8 -
I always used to think that Linux + Intel == <3
And here I am, ordering Qualcom and Realtek wifi cards to replace my Intel one.
Fuck you Intel for removing the lar_disable iwlwifi parameter!!!
FTR: https://dev.to/netikras/...10 -
Project Lead in the morning: This one story needs to be finished till 2pm for the QA department.
Me: No problem, everything is finished and there is only one test case open. It should be finished in no time.
Also me: Spends 7 hours of intensive lagacy code debugging to find out why this shit isn't working sometimes. Try to fix it, broke some other things. Retested all cases and found 3 other minor bugs. End of the day, story is still not finished.
Now: Project Lead is mad, QA guy is mad, I am mad.
Conclusion: I hate debugging legacy code and I never again trust the last open test case!!2 -
I'm kinda amazed at how simple it is to host my private git server on my raspberry pi. That being said I couldn't get it to work well as an access point with hostapd. Therefore pushing and pulling while on my home wifi works like a charm, but doing this in public requires ethernet. Having an Ethernet run from outside my backpack really does make me look like some hacker terrorist person, especially in NYC5
-
what the f....
So I'm making some changes to my setup. I'm relieving my current router from its duties and retiring it as a mini PC for my desktop setup. And I got my hands on a Dell Optiplex that will become my new router.
Now, firstly, the Optiplex came w/o a wifi antenna. I booted it up into a LinuxMint install USB for the first time and didn't expect much from it, but to my surprise, I got a popup: "There are wifi networks available". At that spot there was also my Fenvi PCI wifi card's antenna of my current (soon-to-be-previous) PC and it was barely seeing any wifi, and there came Optiplex with NO antenna attached to it and it managed to maintain stronger and more stable signal. wtf....
Alright, it's Fenvi, it's chinese -- there's probably not much I should expect from it.
Then I hooked it up right next to my current router with an external USB wifi adapter having 4x6dBi antennas on it, serving as my current wifi AP. Trying out hostapd configs, searching for the right channels,... should I test it? Naah, it still doesn't have an antenna - it won't reach my laptop. Meeh, for shits and giggles! `hostapd -d /etc/hostapd/hostapd_custom.conf`, on my lappy `nmcli d wifi rescan; sleep 5; nmcli d wifi` and... wtf... To my surprise, the AP was there! A thick wall away, no antenna whatsoever, and I still could connect to that Optiplex AP and post this rant!
What magic is this??? I'm now a bit concerned about ordering an antenna for it - I'm worried it could either worsen the signal or make it so strong that it'll fry my brains overnight.4 -
I'm on vacation and we wanted VPN connections back to Sweden to access some sites thats only available in Sweden
So I setup a raspberry pi as access point using hostapd and openvpn from there.
So we have two wireless network options where we are: fast unsecure or slow and from Sweden, just choose what you are going to do on the device that you connect with.
Tablets, computer, phones and so on.