Post here for support on the OzzMaker SARA-R5 LTE-M GPS + 10DOF

Home Forums Forums Technical Support for the OzzMaker SARA-R5 LTE-M GPS + 10DOF Post here for support on the OzzMaker SARA-R5 LTE-M GPS + 10DOF

Tagged: 

Viewing 15 posts - 16 through 30 (of 49 total)
  • Author
    Posts
  • #18361
    paulzx14
    Participant

    Hi,

    I tried the next step which is the “Build the N-GSM Kernal module” (the line that says “make -C /lib/modules/$(uname -r)/build M=$(pwd) -e CONFIG_N_GSM=m modules”

    …and it throws up pages of warnings, the last section of which looks like this….

    ————————————————————————

    ./arch/arm64/include/asm/memory.h:231:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

    231 |  u64 __addr = (__force u64)(addr);     \

    |               ^

    ./arch/arm64/include/asm/signal.h:21:9: note: in expansion of macro ‘untagged_addr’

    21 |  return untagged_addr(addr);

    |         ^~~~~~~~~~~~~

    ./arch/arm64/include/asm/memory.h:233:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

    233 |  (__force __typeof__(addr))__addr;    \

    |  ^

    ./arch/arm64/include/asm/signal.h:21:9: note: in expansion of macro ‘untagged_addr’

    21 |  return untagged_addr(addr);

    |         ^~~~~~~~~~~~~

    In file included from ./include/linux/mmzone.h:19,

    from ./include/linux/gfp.h:7,

    from ./include/linux/xarray.h:15,

    from ./include/linux/radix-tree.h:21,

    from ./include/linux/idr.h:15,

    from ./include/linux/kernfs.h:12,

    from ./include/linux/sysfs.h:16,

    from ./include/linux/kobject.h:20,

    from ./include/linux/energy_model.h:7,

    from ./include/linux/device.h:16,

    from /root/linux/drivers/tty/serial/sc16is7xx.c:14:

    ./include/linux/page-flags-layout.h: At top level:

    ./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory

    6 | #include <generated/bounds.h>

    |          ^~~~~~~~~~~~~~~~~~~~

    compilation terminated.

    make[2]: *** [scripts/Makefile.build:250: /root/linux/drivers/tty/serial/sc16is7xx.o] Error 1

    make[2]: Leaving directory ‘/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed’

    make[1]: *** [scripts/Makefile.build:500: /root/linux/drivers/tty/serial] Error 2

    make[1]: Leaving directory ‘/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed’

    make: *** [Makefile:2012: /root/linux/drivers/tty] Error 2

    make: Leaving directory ‘/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed’

    #18362
    richardp
    Participant

    I see you are using a 64bit version of Raspbian.
    Do you need 64bit… could you try 32bit?

    Richard --OzzMaker.com --

    #18363
    paulzx14
    Participant

    Hi,

    Again, thanks for the help.

    I don’t really want to rebuild the OS and loose all the mods I’ve made so far.

    Does this mean the SARA-R5 will only work on a 32bit OS?

    If so, is there a way around it?

    Regards, Paul.

    #18364
    richardp
    Participant

    I’ll look into this. give me a day or so

    Richard --OzzMaker.com --

    #18365
    paulzx14
    Participant

    No problem.

    Kind regards,

    Paul

    #18366
    richardp
    Participant

    can you try and install the kernel enders using this sudo apt-get install raspberrypi-kernel-headers
    And then run the make command again.
    please let me know if it works and ill get someone to update the web page.

    Richard --OzzMaker.com --

    #18376
    paulzx14
    Participant

    Hi,

    I tried it, but the same error I think.

    Just check I did it right tho..

    I basically replaced this step… “wget -O /usr/bin/rpi-source https://raw.githubusercontent.com/ozzmaker/rpi-source/master/rpi-source&#8221; with “sudo apt-get install raspberrypi-kernel-headers”.

    Then tried this step “make -C /lib/modules/$(uname -r)/build M=$(pwd) -e CONFIG_N_GSM=m modules”

    which produced pages of the same error, which ended in …..

    —————————————————————–

    …….. In file included from ./include/linux/mmzone.h:19,

    from ./include/linux/gfp.h:7,

    from ./include/linux/xarray.h:15,

    from ./include/linux/radix-tree.h:21,

    from ./include/linux/idr.h:15,

    from ./include/linux/kernfs.h:12,

    from ./include/linux/sysfs.h:16,

    from ./include/linux/kobject.h:20,

    from ./include/linux/energy_model.h:7,

    from ./include/linux/device.h:16,

    from /root/linux/drivers/tty/serial/sc16is7xx.c:14:

    ./include/linux/page-flags-layout.h: At top level:

    ./include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory

    6 | #include <generated/bounds.h>

    |          ^~~~~~~~~~~~~~~~~~~~

    compilation terminated.

    make[2]: *** [scripts/Makefile.build:250: /root/linux/drivers/tty/serial/sc16is7xx.o] Error 1

    make[2]: Leaving directory ‘/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed’

    make[1]: *** [scripts/Makefile.build:500: /root/linux/drivers/tty/serial] Error 2

    make[1]: Leaving directory ‘/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed’

    make: *** [Makefile:2012: /root/linux/drivers/tty] Error 2

    make: Leaving directory ‘/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed’

    ———————————————————————————————

    Let me know if I did something wrong, as what these steps are doing are a bit beyond my level of understanding!

    Thanks,

    Paul.

     

    #18378
    richardp
    Participant

    I just tested with a clean install of 64 bit.

    This is what I did right after first logged in

    sudo -i
    apt update
    apt install bc bison git build-essential flex libssl-dev -y
    wget -O /usr/bin/rpi-source https://raw.githubusercontent.com/ozzmaker/rpi-source/master/rpi-source
    chmod +x /usr/bin/rpi-source
    /usr/bin/rpi-source -q --tag-update
    /usr/bin/rpi-source
    cd /root/linux/drivers/tty/
    make -C /lib/modules/$(uname -r)/build M=$(pwd) -e CONFIG_N_GSM=m modules

    I get these errors

    make[1]: Leaving directory '/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed'
    make[1]: Entering directory '/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed'
      MODPOST /root/linux/drivers/tty/Module.symvers
    ERROR: modpost: "alt_cb_patch_nops" [/root/linux/drivers/tty/serial/sc16is7xx.ko] undefined!
    ERROR: modpost: "__const_udelay" [/root/linux/drivers/tty/serial/sc16is7xx.ko] undefined!
    ERROR: modpost: "alt_cb_patch_nops" [/root/linux/drivers/tty/n_gsm.ko] undefined!
    ERROR: modpost: "__arch_copy_from_user" [/root/linux/drivers/tty/n_gsm.ko] undefined!
    ERROR: modpost: "__arch_copy_to_user" [/root/linux/drivers/tty/n_gsm.ko] undefined!
    ERROR: modpost: "__warn_printk" [/root/linux/drivers/tty/n_gsm.ko] undefined!
    ERROR: modpost: "_raw_spin_unlock" [/root/linux/drivers/tty/n_gsm.ko] undefined!
    make[1]: *** [scripts/Makefile.modpost:126: /root/linux/drivers/tty/Module.symvers] Error 1
    make[1]: Leaving directory '/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed'
    make: *** [Makefile:1964: modpost] Error 2
    make: Leaving directory '/root/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed'
    root@raspberrypi:~/linux/drivers/tty#

    I then install headers using apt-get
    sudo apt-get install raspberrypi-kernel-headers

    Ran make again and it worked

    root@raspberrypi:~/linux/drivers/tty# make -C /lib/modules/$(uname -r)/build M=$(pwd) -e CONFIG_N_GSM=m modules
    make: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
    make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
    make[2]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
    make[2]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
    make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
    make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
      MODPOST /root/linux/drivers/tty/Module.symvers
    make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
    make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
      CC [M]  /root/linux/drivers/tty/n_gsm.mod.o
      LD [M]  /root/linux/drivers/tty/n_gsm.ko
      CC [M]  /root/linux/drivers/tty/serial/sc16is7xx.mod.o
      LD [M]  /root/linux/drivers/tty/serial/sc16is7xx.ko
    make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
    make: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'

    Richard --OzzMaker.com --

    #18383
    paulzx14
    Participant

    Hi,

    Thanks for all the help, much appreciated, but I’ve tried it every way I can, (without a complete re-install of the OS).
    Still no joy, and I need to make some progress with the rest of the project so I’ve decided to return the module and use separate Qwiic connected components instead.

    I do appreciate the time and effort you have put in trying to get it working, but I’m on the limit of my understanding at this point and don’t want to take up anymore your time.

    Thanks for all the help,
    Regards,
    Paul.

    #18405
    g189ffin
    Participant

    Hi,

    This solved my issues with compiling the gps module, thank you for your help.

    sudo apt-get install raspberrypi-kernel-headers

    However, I now have a problem when I run gsmMuxd:

    pi@raspberrypi:~ $ sudo modprobe n_gsm
    pi@raspberrypi:~ $ gsmMuxd
    /tmp/ttyGSM0 Command Channel
    /tmp/ttyGSM1 Command Channel
    /tmp/ttyGSM2 GNSS Tunneling
    MUX startup failed. See syslog for details.

    When I look at the logs, I see:

    pi@raspberrypi:~ $ journalctl -e

    Aug 04 10:56:55 raspberrypi sudo[14726]: pam_unix(sudo:session): session closed for user root
    Aug 04 10:56:57 raspberrypi sudo[15450]: pi: TTY=pts/2 ; PWD=/home/pi; USER=root ; COMMAND=/usr/sbin/modprobe n>
    Aug 04 10:56:58 raspberrypi kernel: n_gsm: loading out-of-tree module taints kernel.
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Port -1 : gsmMuxd
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Port 0 : (null)
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Port 1 : SHELL=/bin/bash
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Malloc buffers…
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Open devices…
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Can’t create symbolic link /tmp/ttyGSM0 -> /dev/pts/3. File exists (17).
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Can’t create symbolic link /tmp/ttyGSM1 -> /dev/pts/4. File exists (17).
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Can’t create symbolic link /tmp/ttyGSM2 -> /dev/pts/5. File exists (17).
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Open serial port…
    Aug 04 10:57:04 raspberrypi gsmMuxd[15458]: Opened serial port. Switching to mux-mode.
    Aug 04 10:57:06 raspberrypi gsmMuxd[15458]: Modem does not respond to AT commands, trying close MUX mode
    Aug 04 10:57:10 raspberrypi gsmMuxd[15458]: MUX mode doesn’t function.

    #18410
    Mark Williams
    Keymaster

    it looks like the files are already there

    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Can’t create symbolic link /tmp/ttyGSM0 -> /dev/pts/3. File exists (17).
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Can’t create symbolic link /tmp/ttyGSM1 -> /dev/pts/4. File exists (17).
    Aug 04 10:57:03 raspberrypi gsmMuxd[15458]: Can’t create symbolic link /tmp/ttyGSM2 -> /dev/pts/5. File exists (17).

    Are you running this a second time?

    Before you run it the first time, can you check to see what you see under /dev/pts/

    Mark --OzzMaker.com --

    #18438
    bob556
    Participant

    Hello, I’m having similar issues to those previously seen – I couldn’t get the unit to work on 64 bit raspberry pi os, so reverted to 32bit which seemed better. I’m now struggling with gsmMuxd recieving the same MUX mode fail to function error seen two comments above. As part of fault finding I’ve blown it away (again) to a fresh os and am just trying to read serial data from the gps without multiplexing and cant get that to come through – cat /dev/serial0 just hangs and doesn’t return anything. Any hints? The pi is running a pisugar, could that be impacting things?

    #18440
    richardp
    Participant

    Hi, we just updated the code for gsmMuxd.. and you no longer should need the n_gsm kernel, and you can compile the gsmMuxd driver under a 64 bit OS.
    The guide has also been updated https:/ozzmaker.com/how-to-enable-multiplexing-on-the-raspberry-pi-serial-interface/

    The serial should work even if you haven’t enabled multiplexing.   Does the PiSugar also use the serial connection on the Pi?

    Richard --OzzMaker.com --

    #18443
    bob556
    Participant

    Hi Richard, so I’ve blown the sd card away and re-installed 64 bit pi os. I followed the updated instructions without n_gsm and on the first occasion it worked. I then rebooted the pi, and gsmMuxd consistently failed.

    I blew the os away again and re-installed a fresh image. I then re-installed gsmMuxd. Before I ran gsmMuxd for the first time I checked the contents of pts file which were two files named ‘0’ and ‘ptmx’.

    I then ran gsmMuxd and there were files named 0 1 2 3 ptmx present. I then configured gsmMuxd to start on boot, and rebooted the pi to test. After reboot I waited a period, then checked the pts folder and only files ‘0’ and ‘ptmx’ were present. I then manually ran gsmMuxd and it failed again. It seems after a reboot gsmMuxd is failing for me. I am using the current raspberry pi bullseye 64 bit release, and conduct a update prior to installing gsmMuxd. The pi sugar occupies the I2C pin, not the serial pins unless I am mistaken, and prior to a reboot, I was able to use minicom to issue AT commands to the modem and received expected outputs, so that seems to be a non issue hopefully…

    Sorry for the long response, do you have any other suggestions to get the board working?

    #18461
    julienvm
    Participant

    Hi there,

    Using Bullseye 32-bit fresh install, I followed all instructions.

    The module already had the header soldered on it (home style) when I received it so I assume it is second hand.

    Issue: I have no I2C comms, no LTE connection and no GPS data.

    LTE antenna is connected, Hologram sim card activated and inserted, GPS antenna connected

    I2C connections are good (checked continuity between I2C breakout pins 3.3V, SDA, SCL, GND on module and their respective pins on the Raspberry – they all are connected except for 3.3V. There is 3.3V on the module but there is no continuity)

    What more info can I give you to help with finding the root cause of this?

    • This reply was modified 7 months, 2 weeks ago by julienvm.
    • This reply was modified 7 months, 2 weeks ago by julienvm.
Viewing 15 posts - 16 through 30 (of 49 total)
  • You must be logged in to reply to this topic.

Blip, blop, bloop…