Context information (not THAT important):
Let me start with saying I'm total noob regarding Linux and embedded SW development. I am used to code on Windows, desktop apps using C#. But I need to know these things, because of my job.
Getting Omega Onion 2+ working was a challenge from the start. First, power issues: too long cables. It took me about an hour to figure this out. In docs no mention of that (add it).
Later on, my Wi-Fi password has the “inches character” there, (") (I like long, complicated passwords). It basically caused Omega Onion 2+ to not connect. No mention about this anywhere (some list of do-not-use characters pro passwords would be very useful). Before that, how ever, your AP must transmit SSID. Mine doesn’t (by my request). Again. No mention about that. The fact, that the MAC on the sticker isn’t actually the one used by Omega Onion 2+, is just a cherry on top.
Those are only some of my already solved issues. (Writing it here just to demonstrate I'm not complete idiot.)
For unresolved issues, I have this:
After factory reset, when in the page for selecting Wi-Fi to connect to, even without any security what so ever, the circle is just spinning, and spinning, and nothing happens. About 2 minutes later it say it cannot connect (BS, it did, I can see it on DHCP server on my router). Doing it again results in circle-spinning probably indefinitely.
Fix for that is only a “hack”. In /etc/config/ is file onion. It has option setup '0', if 0 changed to 1, I can get to the console. For me, there is no other way. I cannot get pass the Wi-Fi page. This just isn't good.
Currently, I want to compile C++ code for Omega Onion 2+. I have spend good couple of days searching, how to do that. Cross-compilation using Linux PC, Linux VM, LETE image in docker and most recently, installing Ubuntu on Windows 10 (Pro) using WSL. People here posted helpful tutorials how to do that, so many thanks to the community. There is also the option for direct compilation on Omega Onion 2+ itself. I’ve followed the instructions in docs here, so far so good. But… This is pretty much end of good things.
My goal is to write code for communicating with (mostly) sensors (behind A/D converters, output in SPI or I2C), partially based on that set PWM output (using the same chip as in PWM expansion) and send data to other Omega Onion 2+s via Wi-Fi.
As I’ve read here, SPI is buggy as hell. For those, who actually have been able to get it working. I am not one of the lucky ones (probably because I just don’t know, how the hell communicate with that ADC (MCP3008)). So far, I’ve just connected the ADC (with some supporting circuitry) to breadboard and connected that to the Omega Onion 2+. No luck. In the dock, there is bus number and device ID in reverse order (but hey…). So my question would be, assuming I’ve plugged in everything correctly, how do I communicate with SPI device? Because if I put spi-tool -b 1 -d 32766 write 0x15 0x25 (random adress and random data), then spi-tool -b 1 -d 32766 read 0x15, just for chcecking, response is SPI Read from addr 0x15: 0x00. So… What went wrong?
Another question is regarding Wi-Fi. This one is simple. Is there any way, how to programmatically create (and/or change) Wi-Fi AP? And after that, connecting to it (with another Omega Onion 2+). You can imagine it as IoT devices put in to the world, and now, they need to link up together and some of them connect to gateway (physical distance plays a big role here). All of this must be done fully automatically, using some C++ code.
And my last question is regarding opkg. Let’s say I install some package. And it’s just fine. But I’ll still get this:
ums-alauda is already loaded
ums-cypress is already loaded
ums-datafab is already loaded
ums-freecom is already loaded
ums-isd200 is already loaded
ums-jumpshot is already loaded
ums-karma is already loaded
ums-sddr09 is already loaded
ums-sddr55 is already loaded
ums-usbat is already loaded
spidev is already loaded
*pkg_run_script: package "kmod-usb-storage-extras" postinst script returned status 255.
*opkg_configure: kmod-usb-storage-extras.postinst returned 255.
*pkg_run_script: package "kmod-spi-dev" postinst script returned status 255.
*opkg_configure: kmod-spi-dev.postinst returned 255.
I’m referring to kmod-usb-storage-extras and kmod-spi-dev. That USB one…I suppose I can live without it, I have expanded the overlay to an SD card.
As many other, I have had to install some packagess little bit differently, because of kernel version. In almost all cases it went as it should. But in these 2, nope. Of course I've used google. No luck.
I can imagine I do something wrong, so the cause might be something like missing semicolon in your code. Simple solution to complex (a lot of errors from debugger) problem.