Omega2S+ USB driver for Quectel BG95-M4
We are developing a IOT gateway and using Omega2S+ as the microprocessor for it.
Previously we have used Omega2S+ LTE dev board to develop and test the firmware written in Python. When we were comfortable with the firmware and knew which io pins we need, we went ahead with custom pcb with omega dev board as reference schematic.
We decided to go with the less powerful BG95, instead of EC25, as we don't need the higher bandwidth or speed.
Now we have received the pcb and are unsure on how to get BG95 working with the Omega2S+. Rest of the pcb is working fine.
Here is the stripped down version of the schematic:
Quectel offers official drivers for Windows and Linux, but we have no idea on how to install them on OpenWrt.
When we run 'ls /dev', there is no ttyUSB* device detected.
When we run 'lsusb', only two devices show up:
If we try to 'opkg install omega2-lte-base', we get the following error:
Any help would be appreciated as we are kind of stuck with a bunch of pcbs that are not functional and our business is depending on them.
If you reflow the Omega 2S+ off the board and hook the GND, D+, D- up to a computer are you able to see the BG95 then? It just makes sense to check the hardware out and ensure the BG95 is up and doing what you expect before trying to chase down issues on the Omeag2S+
@Waqas The first step is to determine if the hardware is detected, you can usually do this by rebooting and holding the reset button then turn on the debug logging so you get to see everything.
I don't know if there is a driver for the BG95-M4 for OpenWrt, you can check this on the OpenWrt site, where you can find a list of supported hardware.
The problem you are seeing with the opkg install is the kernel version requirement, you can try the --force option or otherwise just download and install the lte firmware package, http://repo.onioniot.com/omega2/images/
To check if hardware is correct, i first connected the BG95 as a usb device to a windows computer, and after installing the official drivers it was detected and working.
Then i connected the BG95 to a Omega2 pro board (which has usb port on board), and after running lsusb the device is detected.
but it doesn't show up on ls /dev
So the next question is how i "mount" the detected device as a ttyUSB* device so that i can write "AT" and receive "OK".
@Waqas The device files are often created by the device drivers or kernel parameters. The hotplug system also creates the device files, take a look at /etc/hotplug.json and review the hotplug documentation at https://openwrt.org/docs/guide-user/base-system/hotplug there are some examples of how to create the required hotplug script for a USB device
Thanks for the follow up @crispyoz
It makes sense that the ttyUSB* doesn't show up because the drivers are probably not installed.
The official driver from Quectel contains 3 files, Makefile, options.c and usb-serial.h:
I tried to compile the makefile, but it shows error:
If i manually make that /build folder then other errors show up:
Can you help me understand how to install and execute the drivers?
I tried to look online, but no luck.
I also looked at the hotplug and compared omega lte dev vs omega2 pro dev and they look similar, so im stuck there as well.
Really appreciate your time, I feel like we are getting closer.
@Waqas The driver looks like it was written for Linux so you'll need to cross compile it for OpenWrt. I don't know if there will be any requirement to modify the code to suit OpenWrt though.
BTW have you seen this article ?
Thank you @crispyoz for this helpful tip.
The link you shared was exactly what I was looking for, and by following the steps, I now have the device drivers installed and can communicate with BG95 over ttyUSB2 serial port.
Next step is for me to understand how to modify the omega2-lte-base package to work with BG95, but for now I can mark this post as solved.
Thanks again for your help.
@Waqas Glad to hear you solved the issue.
Regarding the LTE firmware, if you install the build system then you select the LTE configuration and then you can see which packages are selected in the standard LTE build.
The article I linked relies on some packages you need to install so I think you may be able to just update the standard LTE build to suit your requirements.