No GPS on Raspberry Pi LineageOS 18.1 - raspberry-pi

UPDATED See edit!
I have installed LineageOS 18.1 for Raspberry Pi 4 (which is an awesome piece of software) and everything seems to be working correctly.
With the exception of GPS. I have an A9G connected to the Pi. It is connected to the first Pi's UART and I can see the data coming on ttyAMA0.
:/ # microcom -s 9600 /dev/ttyAMA0
$GNGGA,092800.998,4955.7547,N,00900.2330,E,0,0,,102.0,M,48.0,M,,*5E
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$BDGSA,A,1,,,,,,,,,,,,,,,*0F
$GPGSV,1,1,00*79
$BDGSV,1,1,00*68
$GNRMC,092800.998,V,4955.7547,N,00900.2330,E,0.000,0.00,211021,,,N*55
$GNVTG,0.00,T,,M,0.000,N,0.000,K,N*2C
$GNGGA,092801.998,4955.7547,N,00900.2330,E,0,0,,102.0,M,48.0,M,,*5F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$BDGSA,A,1,,,,,,,,,,,,,,,*0F
$GPGSV,1,1,00*79
$BDGSV,1,1,00*68
$GNRMC,092801.998,V,4955.7547,N,00900.2330,E,0.000,0.00,211021,,,N*54
$GNVTG,0.00,T,,M,0.000,N,0.000,K,N*2C
$GNGGA,092802.998,4955.7547,N,00900.2330,E,0,0,,102.0,M,48.0,M,,*5C
I changed the GPS receiver to use ttyAMA0 in /vendor/build.prop
# GPS ro.kernel.android.gps=ttyAMA0
I also trying with adding
ro.kernel.android.gpsttybaud = 9600
or
ro.kernel.android.gps.speed = 9600
But not a single App can receive GPS data.
I have the feeling I am missing something very simple but essential.
Any help very appreciated
EDIT
Ok, I am a step further. The first problem was apparently, what a bummer, a permission issue.
I adjusted it in the file: /vendor/ueventd.rc
From:
/dev/ttyAMA0 0660 bluetooth bluetooth
To:
/dev/ttyAMA0 0660 system radio
Now it seems that the data is being received and correctly interpreted. But when I open a GPS testing App, the signal is flickering. It almost like if something else is reading from ttyACM0.
Is it possible?
just to clarify what I mean with "flickering", please take a look at https://cloud.sobi.pro/f/68f0398aea1549918376/

I also had the same flickering issue. I can see it in a map program or with physics toolbox where I can see the GPS LAT LONG. It flickers between the "real" position and 0.00000 for the LAT and LONG.
I am using LineageOS17.1 on a Raspberry Pi 4
my Ultimate GPS USB is from Adafruit and is on /dev/ttyUSB0
I tried updating build.prop in both /vendor and /system with the
ro.kernel.android.gps.speed = 9600
and
ro.kernel.android.gps = ttyUSB0
The solution that I eventually used was to remove the r0.kernel... from both build.prop and use the app GPS Connector
https://play.google.com/store/apps/details?id=de.pilablu.gpsconnector&hl=en_US&gl=US
Enable in developer options under "select mock location app" you can select the GPS Connector.
You can have the GPS Connector app start at boot.
If you find a more elegant solution than using an app, please reply.

Related

STM32 with LCD 2004 + I2C, can't communicate

I am using a STM32F030F4P6 MCU and a LCD 2004 with PCF8574T I2C display driver. I have tried the library from this tutorial: https://controllerstech.com/interface-lcd-16x2-with-stm32-without-i2c/. I have found a datasheet for the PCF8574T device, but there are no commands specified in there. I am quite new in the field, but I already communicated with other devices over I2C and SPI and got them to work. Can somebody tell me what I am doing wrong, or at least show me where to get a datasheet with commands for the device? I am sorry in advance if this is a noob question.
As already mentioned, PCF8574T - is an i2c expander. So you need to write a driver which manipulates data pins on PCF8574T in way described in tutorial you found.
Check the arduino code for this type of LCD. It may save your time/ https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
If you have an Arduino board, you can test your LCD according this tutorial https://create.arduino.cc/projecthub/Arnov_Sharma_makes/lcd-i2c-tutorial-664e5a
Nice to know that your device still alive before debug the code.

How do I create a Near Edge computing system? (Send sensor data with Raspberry Pi/DHT11 sensor)

I am working on edge computing for IoT applications and expected to create a system that acts as a near edge computer with the use of a raspberry pi hooked up to a dht11 sensor. How do I send this data over to a computer that is at the edge? Ideally I want to use my PC as this device but I have no clue how to send this data over in real time.
So far I have created the circuit and can view the temperature and humidity readings on the raspberry pi in python. Unsure of what the next steps are - I don't want to send this data over to the cloud just yet.
Side note: I believe i may be missing knowledge regarding this but is the raspberry pi an edge device because it is hooked up to the sensor directly?
Any help is greatly appreciated.
You need to think this through a bit more. What will you do with the temperature and humidity data that you receive?
For example, if you're just experimenting and want to just see the readings in a console on your PC, you can use netcat to send the console output of your Python program from the RPi to PC. No SW development needed, they just have to be in the same network. Not particularly useful for anything else, either.
Otherwise you need to set up some client-server solution between the RPi and your PC. There's a ton of possible solutions, all depending on what you plan to do with the data. You can use MQTT, HTTP, a straight database connection (MySQL, PostgreSQL), etc. You have to supply both sides of the connection. The Python code on client side which connects and sends data; and the server side thing that accepts the samples and stores them somewhere. Plus all the networking, authentication etc.
Or you can just download the Python client libraries for your favourite cloud solution and set that up according to a tutorial. TBH, this sounds a lot less work to me.

Attendance reader with iBeacon/eddystone and raspberry

I'm a bit confused. I explain to you my project, I would like to make a "reader" by using beacon technology (ibeacon for apple, eddystone for android) using a raspberry pi 3. The smatphone application sends an acknowledgment code when passing the person. The raspberry marks and updates an online database. I wanted to ask, first of all can this be done? My problem is to realize the beacon transmission, then for the app and the database I have no problems. I tried using bluez but I can not detect the phone. Is there any online tutorial that could help me? Thanks
If you are looking to use the phone to emit a beacon transmission and then use the Raspberry Pi 3 to detect the beacon, then yes, this is possible. I put together a tutorial on how to use the Android Things to detect beacons on the Raspberry Pi 3.
The problem with using BlueZ for beacon detection is that it is simply not stable on the Raspberry Pi, and will freeze up and stop detecting requiring a reboot.

Grove Pi+ CO2 MH-Z16 sensor

I am using a Raspberry Pi 3 B model with a Grove Pi+ (1.2.2 firmware), and Raspbian for Robots Image.
I have plugged in the CO2 MH-Z16 sensor in RPISER port, and I am trying
to execute the code that is available in Dexter's Github
I am getting the following issues:
First time I tried the code, it was working but it was getting very strange results, always out of range and strange temperatures.
It calls the sensor every 18 second.
Now, when I plugged-in the sensor in de RPISER port (with the rpi on), the raspberry pi get frozen. If I tried to restart it, it is not restarting until the sensor is plugged out the rpi. I do not know what is going on, and how to solve this issue. Sometimes, the rpi does not get frozen but the mouse and the keyboard suddenly stop working. If I try to restart the rpi whith the sensor, the rpi is not restarting, it get stucks.
Can I use this sensor in another port?
Any help or any hint?
Oh yes update your firmware. I also took a long time..
https://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/

Use Raspberry Pi like GoPro, Live Videostream over WiFi direct connection between Pi and Android

In the last weeks I experimented with my Raspberry Pi B and with the PiCamera. I had the idea to establish a connection between the RasPi and an Android device or (if it is easier) to a windows notebook without an access point in between, just like the GoPro camera and its App. I would like to have a live stream from the PiCamera to the other device and the possibility to start/stop recording a video or simply take a picture.
The app itself is not my problem, I wrote some simple apps before. But I didn't yet find a tutorial or description how to set up the communication and the stream.
I bought a WiFi dongle (Fritz!WLAN Stick N - by AVM) that supports WiFi direct and my phone (Samsung Galaxy S5 mini) does as well.
My first question is how to set up this stick on Raspbian - yet it is not recognises as a wifi dongle, and the second is how to achieve what I descriebed above.
Could anyone please describe what I can do?
Thanks in advance!
PS: I prefer a description for bash because I use SSH