So far we want to make hook up one or two BNC connector (with voltage divider/LLC) to GPIO pin(s) and maybe add a USB hub in-between the Omega SoC/LTE module to support more USB devices (from what I gathered the LTE is module is directly tied to the USB pins on the SoC).
Agree with @crispyoz's recommendation to clean the contacts. If it were a hardware issue or manufacturing defect, it likely wouldn't have worked at all.
I also recommend checking if the contacts have been damaged during SIM card insertion and removal.
@jasoneer Try again using the very latest build (b253).
It looks like the kernel checksum changed when we released b253:
(screenshots from http://repo.onioniot.com/omega2/packages/core/ and http://repo.onioniot.com/omega2/images/)
More info on openwrt kernel checksums here.
I had ordered the ANT-LTE-RPC-UFL before I saw your message:
They work well for WiFi/LTE/GNSS but you need 4 of them for completeness.
Once I saw your message, I also ordered the ones you recommended which just arrived today:
They work as well as the ones I used before except you have to cross the LTE and diversity wires over each other when the antenna front/label is facing you or twist the wires around so the connectors line up when the antenna back/label is facing you.
Ideal solution—Is it possible to accomplish the omega2-ctrl gpiomux set spi_cs1 gpio command in a C program?
Yes, if you want to learn how, have a look at the omega2-ctrl sources on github, in particular gpiomux.c and gpiomux.h
What it does is setting and clearing bits in the GPIO1_MODE and GPIO2_MODE registers of the MT7688 SoC (see MT7688 Datasheet page 61ff).
These registers are at 0x10000060 and 0x10000064 in the physical address space - so to access these from user space (any regular program runs in user space), omega2-ctrl needs to map that part of physical addresses into user space.
The gpiomux_mmap_open function in gpiomux.c maps 0x10000000..0x100003FF into the gpio_mmap_reg pointer, using the linux mmap function. After that, SoC registers can be accessed via that pointer (i.e. gpio_mmap_reg+0x60 points to GPIO1_MODE).
Would a system() call work (something like system(omega2-ctrl gpiomux set spi_cs1 gpio))? Is that the best way to accomplish it?
Yes, using system works too, and is much less code. So that might be the best way in your case
However, I mentioned all of the above because via mmap you could access all SoC registers, and do many more things (superpower, be careful!) not exposed by omega2-ctrl.
Another reason to directly access SoC registers and bypass all Linux tools would be speed - system() is orders of magnitude slower (several milliseconds) because it involves forking a shell which in turn forks omega2-ctrl. That's fine for a one-time setup operation, but sometimes one needs nanosecond order speed, which is what mmap-ed direct access to SoC registers can deliver.