How to connect to Wifi on start-up using Buildroot? - embedded-linux

I am trying to connect my Raspberry Pi CM4 to Wifi automatically after start-up. I am using Buildroot based Linux distribution. I have worked with Yocto before and it provides systemd-networkd and wpa_supplicant feature to connect to wifi on boot. I am lloking something similar in Buildroot but couldn't find any notes online.
So far, I think I have enabled the necessary config/driver using make menuconfig :
but now, how can I set-up wpa_supplicant.conf? Any link to notes or suggestion would be helpful.
Can anyone please let me know how to proceed further with it?
Your help will be much appreciated.
Thanks in advance.
P.S: I am using Buildroot 2022.02 release and also using systemd feature and let me know if any info is missing here.

I tried to do the same thing but ultimately could not get wpa_supplicant to cooperate with connman. Connman kept throwing "Error /net/connman/technology/wifi: Not supported" and none of the fixes I found online worked.
Instead I switched to using iwd, the modern replacement for wpa_supplicant.
I only needed to add the file
/var/lib/iwd/<MyWifiSSID>.psk
with the contents:
[Security]
Passphrase=<MyWifiPassword>
Then everything worked! By default it will try to autoconnect at boot. If it disconnects, it reconnects whenever possible. It is basically everything I need, and therefore I have given up trying to get wpa_supplicant to cooperate.
ps. I have also tested iwd with connman on top, which also seems to work quite nice.

Related

CouchDB can't set up HTTPS

I am learning to work with CouchDB and I am usually making Ajax calls in order to communicate with my database. I started getting '
Cross-Origin Request blocked
' and as the reason
Access-Control-Allow-Origin
, so I decided to work with CouchDB through HTTPS and not the standard HTTP. For that, I have followed the instructions given on Link to manual.
Problem on Linux:
I first tried to set it up on my laptop where I use Linux. But I couldn't find the Local.ini file where I was supposed to set the paths to the certificates.
After unsuccessfully trying to find a solution for it, I gave up and started from the beginning on my computer, where I use Windows.
Problem on Windows:
So I installed the newest version of CouchDB on my Windows, I have created the certificates, found the Local.ini file, did everything as it is explained in the manual. The problem was that I couldn't restart CouchDB so that the changes would take place. So, after google-ing the problem, I found a possible solution, to stop CouchDB through the Task Manager->Services-> Stop Apache CouchDB. But when I tried to Start it again I get the problem
Windows could not start the Apache CouchDB on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specification error code 3.
I would be very happy if someone could help me with my problem(s). I prefer getting a solution for the Linux problem since I work mostly on my laptop, but I will be satisfied if I get it going even on Windows.
Thanks in advance
On Linux, you can add CORS to CouchDB with this package:
https://github.com/pouchdb/add-cors-to-couchdb

remote compile and run code directly on raspberry pi 2 with intelij

I am developing a robot using raspberry pi 2 in java.
Up until now I was writing the code itself on my pc in InteliJ-IDEA (since its not running smoothly on the pi).
Then I am connecting to the pi with WinSCP in order to sync my project and afterwards I am using putty to compile and run the code remotely thru ssh.
I would like to compile and run the code directly from my PC (with intelij & maven) as that guy does in that video.
I searched quite some time for an answer and I couldn't find one.
I would really appreciate if someone could provide me a solution to my problem,
it will save me a lot of time, and I would be able to debug my code efficiently again.
Thanks in advance.
I found plugin which help a lot.
If you have the same issue as I had, you can download it from that link,
or install it directly from the IDE:
settings >> plugins >> browse repositories, and search for "Embedded Linux JVM Debugger".

HASP service will not start

I have a client who's HASP driver will not start. When we go into services and attempt to start it manually it still will not start. It is set to start automatically. Additionally, and obviously, attempting to go to http://localhost:1741 in their web browser does not work.
Does anyone know why the HASP driver would fail to start?
The version in question is from 02/12/2004 (back when it was still Aladdin) although I'm not sure of the actual version number. We're also talking about a Windows 7 (32-bit) PC.
The cause of the problem was that the HASP driver will not work sometimes if you access the PC through a remote desktop connection.
You trying to use a very ancient version of the HASP driver. You need to get an actual version and try to install it. Official website with drivers located here: https://sentinelcustomer.safenet-inc.com/sentineldownloads/?s=&c=End+User&p=HASP4&o=Windows&t=all&l=all
If you will still get an error, then you need to check installation logs: C:\Windows\aksdrvsetup.log

NoSuchMethod Exception for createLiveCard

I am learning how to use the GDK and a nice explorer shared their HelloWorld project with me (https://code.google.com/p/hello-world-google-glass/source/checkout)
Unfortunately when I try to run the code I get the error:
java.lang.NoSuchMethodError:
com.google.android.glass.timeline.TimelineManager.createLiveCard
I have been searching for solutions, but the closest I could find to my problem was addressed in this post: Google glass sample projects are crashing
As the accepted answer suggested, I went into the SDK manager and updated my whole API 15, including the GDK sneak peak. My GDK shows Revision 2. Still doesn't work.
Even weirder, all of the sample apps Google included work just fine. Any advice?
EDIT: The sample apps DO NOT WORK just fine, I just realized when I manually launch the apps instead of voice command, I am actually given 2 choices of each app. One works, one gives the exact same error as described above. I imagine the working one came from MyGlass and the other is the one I loaded.
EDIT #2 I looked on MyGlass and it turns out my Glass is running XE11 instead of 12. I can't find any instructions on how to update it to XE12. Ideas?
GDK incompatible changes were introduced in the change between XE11 and XE12, so this makes some sense.
It is a little odd that you're on XE11 still, however. There is no way to force the upgrade, but it should happen on its own when charging and on WiFi. You may want to do a reset (hold the power button down for 15 seconds - this is just a forced power off instead of sleep and won't delete anything) and see if that resolves anything or a hard reset (which will delete everything) from the settings menu. You may also want to contact a Glass Guide for further assistance in getting the upgrade.
To connect to secured Wifi, you can try Connectify (http:www.connectify.me) and turn your laptop into a Hotspot. First, connect the laptop to school wifi with authentication, then share the hotspot with your Glass. I assume that you know how to generate QR Code for Google Glass to connect to Wifi. The info is available on glass.google.com/myglass
Once it connects via Wifi, it should be able to upgrade. If Glass does not prompt you to upgrade to XE12 after connecting to Wifi, you can try Prisoner's suggestion to reset the Glass. BTW, thanks for trying my Hello World app. Good Luck!

Is there any way of making windows reload a driver without reboot?

I was wondering - how do windows driver developers test themselves?
Lets' say I'm debugging a nasty problem in a driver I wrote. I want to be able to constantly add traces and logs, modify small parts of code, etc.
Each time I build a version of my driver and get a .sys file I want to deploy on a test-machine, and have a look at a tool like dbgview to understand what's happening.
AFAIK, in order for the modifications in code to take place, the only way is to reboot the test server.
This is awful! This means I have to wait a long time between making a minor adjustment in code and being.
Is this really the case? Is there no way of telling windows to dynamically reload my driver?
If not - how do windows driver developers work?? Do they constantly reboot their testing servers in order to see if things worked for them?
We are using virtual machines to test and debug drivers. Reverting to snapshot is much faster then rebooting and gives you always the same environment.
Also you can stop and replace your driver if it supports unloading: disable device in device manager or stop the driver using sc stop service_name.
You can also disable/enable host controller in Device Manager.
This does the trick for me:
devcon disable <driver>
devcon enable <driver>
Devcon download here: http://support.microsoft.com/kb/311272

Resources