ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    AT commands to a Sierra Wireless EM9291

    Cellular Modems
    4
    42
    3296
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • groupoG
      groupo @tom
      last edited by groupo

      @tom Might you be able to help with the install? I have the drivers but I am a not very savvy with any software that isnt MATLAB.

      the readme is very straightforward, but I am running into issues:

      1. run 'make' to install driver binaries
      2. run 'make install' and reboot to install them

      The makefile script looks for /lib/modules($shell uname -r)/build... which does not exist. I can mkdir it but I still get make errors. I am not even sure where I should place the folder 'usb' that these drivers are in.

      I can provide the actual make script and anything else you'd wanna see... just want to see if youre able to help before dumping it all haha

      tomT 1 Reply Last reply Reply Quote 0
      • tomT
        tom admin @groupo
        last edited by

        @groupo Try this before building:

        sudo ln -s /usr/src/header /lib/modules/$(uname -r)/build
        
        groupoG 2 Replies Last reply Reply Quote 0
        • groupoG
          groupo @tom
          last edited by

          @tom

          Done but still get errors

          voxl2:/$ sudo ln -s /usr/src/header/ /lib/modules/$(uname -r)/build 
          voxl2:/$ cd usb
          voxl2:/usb$ make
          make -C /lib/modules/4.19.125/build M=/usb
          make[1]: Entering directory '/lib/modules/4.19.125/build'
          make[1]: *** No targets specified and no makefile found.  Stop.
          make[1]: Leaving directory '/lib/modules/4.19.125/build'
          Makefile:12: recipe for target 'all' failed
          
          1 Reply Last reply Reply Quote 0
          • groupoG
            groupo @tom
            last edited by

            @tom I see this is running libqmi 1.22.0. The latest, 1.32.0, has a command for AT commands. Have you tried this new version internally? Could I upgrade mine?

            tomT 1 Reply Last reply Reply Quote 0
            • tomT
              tom admin @groupo
              last edited by

              @groupo Ooh cool, we haven't tried that before. Looks like you should be able to try upgrading it via. apt. Feel free to try that and let me know if you have luck!

              groupoG 1 Reply Last reply Reply Quote 0
              • groupoG
                groupo @tom
                last edited by groupo

                @tom just apt update libqmi ? Again sorry, but I am not very familiar with linux.

                Another thing, I may have deleted the contents of /usr/src/header while trying to delete that symbolic link you had me make earlier. I swore there was stuff in /header, but I dont see anything in there now. I ran rm -r /lib/modules/###/build which I thought should not touch anything past the link itself. If there is supposed to be stuff in there, can I get it back without reflashing?

                tomT 1 Reply Last reply Reply Quote 0
                • tomT
                  tom admin @groupo
                  last edited by

                  @groupo I don't know of a way to get those files back without reflashing.

                  I just checked and it doesn't seem like there's a newer version available via. apt with the repos currently on there.

                  You may have to build and install it via. source

                  groupoG 1 Reply Last reply Reply Quote 0
                  • groupoG
                    groupo @tom
                    last edited by

                    @tom I was just typing a msg up to relay apt isnt showing any of them available for updating. I will try to reflash.

                    I need to be able to connect to a private LTE network (MCC-MNC 001-01) which, as far as I have read, the EM9291 does not natively search for. I've read you can issue AT commands to tweak how the modem operates but am at a standstill trying to either install drivers to enumerate ttyUSB0 or update qmicli to the newest version so that I can issue AT commands that way. I think reflashing is necessary to get those files back and reestablish some ground truth with my drone. I should be able to go through those directions on my own. After that, are you able to assist me with either of the two avenues I discussed? I am grossly unfamiliar with the platform's architecture, but if I could get you on even a short call I think it would greatly accelerate this process for the two of us.

                    tomT 1 Reply Last reply Reply Quote 0
                    • tomT
                      tom admin @groupo
                      last edited by

                      @groupo I can't provide a ton of help as I haven't tried it myself but you should be able to build and install a newer version of libqmi by following the instructions from here:

                      https://modemmanager.org/docs/libqmi/building/building-autotools/

                      In terms of which AT commands are required to send I can't really help there, it may require reading through Sierra's AT command docs

                      groupoG 2 Replies Last reply Reply Quote 0
                      • groupoG
                        groupo @tom
                        last edited by

                        @tom I am talking to a dev from Sierra Wireless who can help with the AT commands. there are some very useful forum posts there for connecting to 'test' LTE networks. I just need to send the AT commands to do so. I need your assistance in either installing that driver to enumerate the port or updating qmi. I will try to update qmi first, as that seems like the simpler approach. I need libqmi 1.34 which switched from GNU autotools to Meson. That means nothing to me, I will just follow the steps, more FYI

                        1 Reply Last reply Reply Quote 0
                        • groupoG
                          groupo @tom
                          last edited by groupo

                          @tom need Meson to get newest libqmi. Tried installing that but ran into more errors, I hate feeling like I am asking to be spoonfed but I really could use some guided direction here - I am extremely out of my element

                          tomT 1 Reply Last reply Reply Quote 0
                          • tomT
                            tom admin @groupo
                            last edited by

                            @groupo You can install meson and ninja with

                            sudo apt install meson ninja-build
                            
                            groupoG 1 Reply Last reply Reply Quote 0
                            • groupoG
                              groupo @tom
                              last edited by

                              @tom I did that successfully, the error came with running the third line below

                              0020794d-03f5-4ad3-9daa-20c7ce635d5f-image.png

                              voxl2:/$ sudo apt install meson ninja-build
                              Reading package lists... Done
                              Building dependency tree       
                              Reading state information... Done
                              ninja-build is already the newest version (1.8.2-1).
                              meson is already the newest version (0.45.1-2ubuntu0.18.04.2).
                              0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
                              voxl2:/$ cd libqmi
                              voxl2:/libqmi(main)$ meson setup build --prefix=/usr
                              The Meson build system
                              Version: 0.45.1
                              Source dir: /libqmi
                              Build dir: /libqmi/build
                              Build type: native build
                              
                              meson.build:223:10: ERROR: lexer
                              test_env = {
                                        ^
                              
                              A full log can be found at /libqmi/build/meson-logs/meson-log.txt
                              
                              
                              tomT 1 Reply Last reply Reply Quote 0
                              • tomT
                                tom admin @groupo
                                last edited by

                                @groupo Hmm meson isn't something I'm familiar with so I don't know how to debug that.

                                Do you know if the version of libqmi has to be newer than 1.30? Otherwise you could try the older way to build using make

                                groupoG 1 Reply Last reply Reply Quote 0
                                • groupoG
                                  groupo @tom
                                  last edited by

                                  @tom unfortunately, the ability to send AT commands via qmicli was introduced in 1.32. What about trying the drivers again? I goofed the symbolic linking earlier. I redid it and the make script gets farther, but still eventually fails.

                                  How come PORT is initialized with certain modems in voxl-configure-modem but not with the em9291. It looks like you just set PORT to ttyUSB0 and echo to it to send AT commands. Can i not just add that into the em9291 logic flow?

                                  tomT 1 Reply Last reply Reply Quote 0
                                  • tomT
                                    tom admin @groupo
                                    last edited by

                                    @groupo /dev/ttyUSB0 only enumerates if the driver recognizes the hardware of having said capability. In this case, the driver that controls that port doesn't recognize that modem hardware, likely the driver is from before that hardware existed.

                                    In these cases we usually have to make custom tweaks to the linux kernel drivers in order to add the support for the hardware.

                                    If you'd like to experiment with doing that you can, building custom kernels allows adding custom support for new or existing hardware.

                                    You can read more about building a custom kernel here: https://docs.modalai.com/voxl2-kernel-build-guide/

                                    groupoG 3 Replies Last reply Reply Quote 0
                                    • groupoG
                                      groupo @tom
                                      last edited by

                                      @tom I will explore the kernel stuff.

                                      Re updating qmicli, I need meson >= 0.53.0 which is not supported on drone's ubuntu version. Is upgrading to a newer ubuntu on the drone an option?

                                      tomT 1 Reply Last reply Reply Quote 0
                                      • tomT
                                        tom admin @groupo
                                        last edited by

                                        @groupo It is not. Ubuntu 20 is on our road map but that's a while out

                                        groupoG 1 Reply Last reply Reply Quote 0
                                        • groupoG
                                          groupo @tom
                                          last edited by

                                          @tom If I solely wanted to update the driver that controls that port is making a custom kernel the only way to do that? If that is the case, what is the least invasive way to do that? Where does that driver exists and what is the process for updating it? Which driver is responsible for that port? It looks like the guide shows you the things to download if you wanted to make your own kernel, but where do you change stuff to make it your own?

                                          1 Reply Last reply Reply Quote 0
                                          • groupoG
                                            groupo @tom
                                            last edited by

                                            @tom Found the drivers I believe I want to change. Do i change them inside or outside of the docker?

                                            Alex KushleyevA 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB | Contributors