richardp

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • #18578
    richardp
    Participant

    Regarding sparkfun’s guide, I think that may be related to the use the LED.

    We did test this in the past.. and I just tested now, it does work. The Pi can see the pin go high

    On a Pi 4 i connected the TP pin from the SARA-R5 to GPIO21 on the PI.
    I created a python script to see when this goes high;

    import RPi.GPIO as GPIO
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(21, GPIO.IN)
    while True:
            if GPIO.input(21):
                    print (" high!")

    I then configured the below commands on the SARA-R5

    AT+UTIMEIND=1
    AT+UTIME=1,1
    AT+UGPS=1,4,67

    The python script was able to see the pin go high every second.

    Richard --OzzMaker.com --

    #18563
    richardp
    Participant

    Hi Andy, we dont have one yet..  Someone has already started on it, hopefully it will lbe finished next week

    Richard --OzzMaker.com --

    #18496
    richardp
    Participant

    The I2C pins are broken out at on the bottom left in your image. Labelled SARA SDA SCL

    Richard --OzzMaker.com --

    #18495
    richardp
    Participant

    Good to see you have it working.   And apologies for the error in the guide.  I have just updated it to say /dev/ttyGSM0

    Richard --OzzMaker.com --

    #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 --

    #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 --

    #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 --

    #18364
    richardp
    Participant

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

    Richard --OzzMaker.com --

    #18362
    richardp
    Participant

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

    Richard --OzzMaker.com --

    #18352
    richardp
    Participant

    Hi Paul
    We updated the rpi-source to support Python 3.

    Did you try the new instructions with the new code?

    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

    Richard --OzzMaker.com --

    #18349
    richardp
    Participant

    Hi, what version OS are you using on your Pi?
    Can you show the output of uname -a

    Richard --OzzMaker.com --

    #18283
    richardp
    Participant

    You should be able to use the heading Measurment only. When rotating along yaw, you can just work out the difference in heading values from start to finish to see how far you have rotated.

    Richard --OzzMaker.com --

    #18282
    richardp
    Participant

    Hi Alex

    Sorry for taking so long to get back to you. We know have a fix and we would love to have your feedback.

    1.make sure the kernel module n_gsm is running
    sudo modprobe n_gsm

    2. pull down the new mux software, enter into the directory and make

    git clone https://github.com/ozzmaker/gsmmux
    cd gsmmux
    make

    You may get some warnings, you can ignore these.

    3. Run gsmMuxd, you should see output similar to below

    pi@raspberrypi:~/gsmmux $ ./gsmMuxd
    /tmp/ttyGSM0   Command Channel
    /tmp/ttyGSM1   Command Channel
    /tmp/ttyGSM2   GNSS Tunneling
    MUX started

    4.stop and then disable gpsd

    sudo systemctl stop gpsd.socket
    sudo systemctl disable gpsd.socket

    5. Start gpsd from the command prompt, point to the GNSS tunneling interface
    /usr/sbin/gpsd -n /tmp/ttyGSM2

    6.connect to command channel
    minicom 115200 -D /tmp/ttyGSM1

    7.Start GPS
    AT+UGPS=1,4,67

    8. View GPS data
    cgps

    Richard --OzzMaker.com --

    #18279
    richardp
    Participant

    What you could do is just apply hard iron offset , this should be good enough.

    You would only need to use the code below;

    //Apply hard iron calibration
    magRaw[0] -= (magXmin + magXmax) /2 ;
    magRaw[1] -= (magYmin + magYmax) /2 ;
    magRaw[2] -= (magZmin + magZmax) /2 ;
    //Compute heading
    float heading = 180 * atan2(magRaw[1],magRaw[0])/M_PI;

    Richard --OzzMaker.com --

    #18272
    richardp
    Participant

    Hi Kar

    You need to use the compass (magnetometer) to measure yaw.  follow the tutorials on this site,  make sure you calibrate the compass and use the code which includes tilt compensation

     

     

     

    Richard --OzzMaker.com --

Viewing 15 posts - 1 through 15 (of 40 total)

Blip, blop, bloop…