OZZMAKER SARA-R5 serial port issues

Home Forums Forums Technical Support for BerryGPS and BerryGPS-IMU OZZMAKER SARA-R5 serial port issues

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #18035
    Alex Babij
    Participant

    Hi, I have the SARA-R5 LTE-M GPS + 10DOF with an external GPS antenna which I have mostly working, but I have some issues I am still trying to work out.
    The accuracy and time to fix is slower than I was hoping, although that may just have to do with the conditions where I am. (not sure if there is a way to tell if it is using the external GPS antenna or if it just will use whatever is attached to the u.fl) If I give it clear sky access and let it use AssistNow Online, it gets a fix pretty fast and the location is mostly accurate. If I open up the GNSS stream on /dev/ttyGSM3 one of the strings has a bunch of weird characters in front of it(pic attached), although I am not sure if that matters or not.

    The first issue I am having is that I will frequently get the error 'minicom: cannot open /dev/ttyGSM3: Device or resource busy' when I try to access the gps data stream with the command 'minicom 115200 -D /dev/ttyGSM3'.
    If I wait long enough it will eventually work, but there will be no gps data, and if I open /dev/ttyGSM2 or 1, I can no longer input AT commands. I am assuming this is from some kind of issue with the serial connection but I have no idea how to fix it/what is going on.

    The second issue I am having is if I run 'sudo reboot' to restart the raspberry pi, multiplex channels disappear, but the 'cmux' command stops working and returns the error 'cmux: Cannot read /dev/serial0: Resource temporarily unavailable' I am able to open the serial connection with 'minicom 115200 -D /dev/serial0', but it just outputs a bunch of random characters. (pic attached)
    My guess is that it has to do with the gps staying powered on, since if I power cycle the raspberry pi and the gps it fixes the issue until I try to reboot again. Im not sure why its putting out random characters to the serial0 channel, I read that that can be a baud rate issue but I have no idea here.

    #18038
    Mark Williams
    Keymaster

    Hi Alex

    If you dont enable the mux and cold boot the Pi and the SARA-R5, do you get random characters when connecting to Serial0?

    In the second scenario, after the reboot... if you get garbage on serial0, can you try and connect the pin highlighted below to ground for 1 second. this will reset the SARA-R5. Then run CMUX again.

    Mark --OzzMaker.com --

    #18041
    Alex Babij
    Participant

    Thanks for the reply, disabling the mux and cold booting the whole system, I can enter serial0 and it works as expected, can send commands and get gps data from it, no garbage characters.

    Using sudo reboot, then resetting the SARA-R5 by connecting to ground lets me run CMUX again and it works as expected.

    I am still having the issue where after entering cgps or gpsmon, the serial connection through minicom becomes unresponsive. If I enter ttyGSM3, no data comes out, and if I enter ttyGSM1 or ttyGSM2 I am no longer able to type anything, and even exiting minicom with ctrl+A, Q becomes laggy.

    #18042
    Mark Williams
    Keymaster

    we should be able to update the cmux program so that it can workout if the SARA-R5 is in CMUX mode...  ill get back to you on this.

    There other issue is strange.  There is a little delay when accessing or leaving the virtual serials, but it should <1 second, this is normal.
    What Pi are you using?
    Is it overclocked?
    Do you have anything else attached or running?

    Mark --OzzMaker.com --

    #18043
    Alex Babij
    Participant

    I am using a raspberry pi 3a+, not overclocked, ssh into it so no display out or keyboard, only thing connected is the SARA-R5 and I am not running extra software on there, just the terminal. In terms of delay, it is usually <1 second to exit minicom, but when I get that error it will take 5+ seconds to give me the option to exit. I'll try a bunch of different combinations of cellular on/off inside vs sky access, etc. to see if that changes things.

    I have been using the python scripts from the gps and agps tutorials which I tweaked for python3 to set the gps parameters, but I have the same issue with the serial connection occur when setting them manually. The python script for the cellular connection can be a bit finicky and will sometimes return 'ERROR' when running: 'AT+CGACT=1,1', 'AT+UPSD=0,0,0', and 'AT+UPSD=0,100,1' . My guess is its still trying to establish a cellular connection and thats why it fails, since if I wait long enough and run those AT commands they will eventually work, although I'm not really sure, since if I run 'AT+CGDCONT?' I will get back an IP address but still have those 3 commands fail.

    #18044
    Alex Babij
    Participant

    From my testing so far, it seems that either using the cellular assisted gps mode or cgps is what is causing the serial port issues. If I turn off the cellular radio and dont go through any of the config, it is able eventually able to get a fix unassisted and doesn't have any issues with the serial port. gpsmon works fine and I can go back and forth between that and ttyGSM3 without issue. After maybe 20 minutes of running I went into cgps, it didn't seem to get any gps data (no text lines refreshing below the gui), and then at that point the serial connection broke and I had the same issue as before: no data into cgps or gpsmon, cant type in ttyGSM2, and ttyGSM1, etc.

    Using assisted mode and manually going through the cellular setup commands until I am able to successfully ping google.com before turning on the gps, I am amble to get a fix within a minute or two as expected. Entering gpsmon only, then exiting it and trying to access ttyGSM3 gives the device or resource busy error. If I keep trying to access it, ttyGSM3 will eventually open, but won't show any data, and reentering gpsmon after this point will make it fail to recognize the gps and nothing will work until a restart of the raspberry pi + gps/ a cold boot. (pic attached)

    I dont think its an issue with the raspberry pi itself, since it remains responsive even when minicom/ the serial connection stuff starts breaking. It doesn't seem to be overheating or anything like that, its cold enough outside where I am that it stays barely warm to the touch when its outside. Conversely when its inside and warms up more I still have the same issues.

    Another thing I am seeing is when I have some of those cellular commands for PDP and IPV4 fail it shows up in the hologram dashboard as a "session without data". Im thinking that may be the cause of the issues with the cellular commands, but in terms of how/if that could affect the serial connection I have no idea.

    Attachments:
    #18070
    Mark Williams
    Keymaster

    Hi Alex, sorry for the late reply.  how are you going with this?   Do you see the same issues if you run gpsmon only  and not cgps?

    Mark --OzzMaker.com --

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Blip, blop, bloop...