I can't help but comment that after 30 years writing C and ASM code, I consider gdb to always be a last resort. Logging is your friend, search for my response on how to set up a remote logging server for your Omega. I have 80+ devices, all running my own custom applications, and there is nothing I need to know about these devices that I cannot understand using logging, or by listening on wireshark.
You are hero. Logging, asserts, tracing are good instruments, but I drop much time to find errors without Debugger. The debugger is more perfect instrument for me. And I'm codding in C++ - it's need powerfull IDE such as Visual Studio or Eclipse, because C++ syntax is too difficult for a simple text editor.
By the way. The problem was links with different versions of Kernel and Packages. Default repository downloading packages from the OpenWRT v. 19xx, but the Onion OS is based on version 18.06.
Now I'm installed gdb and gdbserver. Both of them are already tested and works! Subject can be closed.
A note for anyone else that may stumble upon this topic looking for information about python and i2c.
The link above for SMBus has some examples, here is one of them.
from smbus2 import SMBusWrapper
with SMBusWrapper(1) as bus:
# Write a byte to address 80, offset 0
data = 45
bus.write_byte_data(80, 0, data)
In this example two things need to be changed to make it work. Well, three really.
Change SMBusWrapper(1) to SMBusWrapper(0) as the i2c bus on the omega 2 is 0 and not 1.
Change the address (80 in the example) to the address of the chip you are using.
Add 0x to the beginning of your address so that it is something like 0x80.
Without these changes smbus2 will not work on the omega 2. It took me a bit to figure this out and I hope it helps others.
@Jon-Gordon yeah, sorry about that. i need to stop reading the forum after a night at the bar. i'm looking at making a small protoboard needing just 8 pins and for some reason thought you were also. demon alcohol.
I think, RnD team must to know, when we change option country, or option htmode, or option channel parameters in file /etc/confog/wireles, system behavior becomes unstable.
Every 5 seconds the system freezes and does not respond on ping for 1-2 seconds.
My problem, that sometime system wakes up on Channels 10/11/12, but we can not use these channels, according to regulation acts.
In case, that issue hasn't solution, we can not use Onion Omega in our product.
I2C is supported pretty well on former Omega2 firmwares.
Only the i2cdetect command didn't work up to the firmware v0.2.2 b194.
The i2cdetect command is a part of the 'i2c-tools' package, it's a separate utility: /usr/sbin/i2cdetect.
You could live without it.