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.
I have loaded mod_portaudio in freeswich. But after that when pa rescan the device, i found no device in the device list. While the pi is connected to a bluetooth speaker and also a headset with a aux cable and those are working fine in the system.
Can anyone please help me to sort out this issue.
Thanks
I am also working on this and shortly believed to have solved it (see https://lists.freeswitch.org/pipermail/freeswitch-users/2020-August/133883.html and https://lists.freeswitch.org/pipermail/freeswitch-users/2020-August/133884.html), but it wasn't true:
I was testing with my headset and had successful "pa looptest" indicating both indev & outdev were working
Then, when I tested that in the context of my application for auto-answering incoming calls (I called with my mobile phone while putting it in front of a tv so that I can test if I would hear anything on my headset), I didn't notice that in that case the mic was not working because I had the headset on my ears and was hearing the tv (because of success of looptest, I was just assuming that the mic would also be working)
But when I finally got a Plantronics Calisto 620-M Bluetooth Speakerphone, even the looptest failed. At this moment, I tested more carefully my headset again, and there I found out that the mic was not working.
Because it seemed that something device-specific should be the reason for failure, I also tested with my bluetooth earphones; there the effect was equivalent to Calisto speakerphone.
I finally got a USB speakerphone and tried that one, but in that case "pa rescan" failed to find any devices.
With all four devices, always arecord and aplay were working perfectly, and the above issues appeared only with mod_portaudio.
I don't have any idea what the issue could be with the usb, but with the three bluetooth devices, I still believe that something device-specific should be causing the problems here, e.g. the sample rate. But, currently I am lacking time to further work on this...
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.
I have an android app that outputs sound normally on a phone. I also put it into an android device and can hear audio on tv through HDMI cable. I also have an android things app that moves a servo and can put audio on the tv, also working as expected.
What I can't do is get audio from the audio jack, which would be my preferred option since I want something without a display.
I have lots of logcat entries saying everything is normal and sound is not failing, but other than that I can't rule out if it's an OS capability that's turned off (there's no mention in release notes), something that needs to be tuned into config.txt, whether I need extra lines of code, or it is muted.
I'm assuming audio is not getting to the jack at all. I know that the Raspberry pi 3 b audio jack also carries video, and I've tried to tap into every combination of its pins without success, both using a cable splitter and putting cables on the pins of the connector directly on the board. I'm also assuming that one of the exposed pins under the board carries audio only. Though I'd be grateful if someone could clarify which has left / right channel, even if tested on Raspbian or other OSs.
As seen in following logs, audio focus is ok and SoundPool.play never return 0 (as showin in line that says RESULT === 8):
02-04 02:08:28.617 694-1722/com.example.androidthings.simplepio I/SoundEngine: Ask for focus
02-04 02:08:28.653 408-822/system_process I/MediaFocusControl: AudioFocus requestAudioFocus() from uid/pid 10025/694 clientId=android.media.AudioManager#f4664becom.example.androidthings.simplepio.audio.SoundEngine$1#c9ef91f req=3 flags=0x0
02-04 02:08:28.654 694-1722/com.example.androidthings.simplepio I/SoundEngine: Ask for focus and GOT it
02-04 02:08:28.655 694-1722/com.example.androidthings.simplepio W/SoundEngine: ********* RESULT === 8
02-04 02:08:28.656 408-420/system_process I/MediaFocusControl: AudioFocus abandonAudioFocus() from uid/pid 10025/694 clientId=android.media.AudioManager#f4664becom.example.androidthings.simplepio.audio.SoundEngine$1#c9ef91f
02-04 02:08:28.656 694-1722/com.example.androidthings.simplepio I/SoundEngine: release focus
As pointed in the Raspberry Pi overlay documentation
2) The onboard analogue audio output uses both PWM channel
So you can't use PWM to drive a servo and play sounds thru the onboard Audio simultaneously.
A few options are possible:
try the USB audio support announced in Developer Preview 2
file a feature request to add support for I2S in the Peripheral IO API.
I had the same issue sending audio to AUX port while the HDMI port is connected just for video output.
But, the solution that worked for me is, I first deployed my AndroidThings app onto RasPi and connected AUX port to test the audio, then I connected the HDMI to test the video out. In this sequence, everything worked both audio from AUX port and Video from HDMI.