Upcoming Debian April release for DB410c-- call for testing

@ljking: thanks for trying this out.

  • for the sensor mezzanine guide, i am not familiar with that. I am hoping akira can support that. The user space packages are fairly generic for all the linaro builds, and I know that we recently added libmraa package by default in our images, so maybe that conflicts with the instructions… e.g. I can see this:

libmraa0 0.10.1-1

  • for the mezzanine guide, can you confirm the instructions used to with the previous build you tried? If so which build was that?

  • for SPI, SPIDEV is enabled as module in our build now:
    CONFIG_SPI_SPIDEV=m
    However we do not have the DTS change to create the spidev node. As I think I mentioned here (at least I hope i did) such a change cannot be done in the DTS , which is expected to contain only nodes that represent ‘real’ devices. Our 96boards team is working on adding a specific DTS overlay config file that would contain the spidev node. Akira might have some pointers for that too, hopefully.

Hi @barryb
Thank you for the instructions on how to install python spidev. The instructions worked no issues.

The bus=32766 is one of the issues that were resolved during the spi debugging that we did in this thread http://www.96boards.org/forums/topic/how-to-enable-spi-and-access-it-in-debian-os/, one of the patches Srini did resolves the numbering. I think you should be using bus=0 now. I haven’t tested it because I am still recompiling the kernel to turn on spidev.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions expressed in this or any other post may not reflect the opinions of my employer.

Hi @ndec,

I had the expectation that the libsoc library would be included in this release. I have not been able to find the Python bindings for the libsoc library. Should the Python bindings be there?

With reference to SPI, is there a way of enabling SPI on the board without needing to have a HostPC? I have a setup where I’m doing development directly on the DB410c.

Thanks

hi,

as i said earlier, i am not familiar enough with libsoc… i will ask others for help here…

related to the host PC, yes everything is doable directly on the board… i know ljking builds his kernel on the board :wink: I wouldn’t recommend doing that to be honest… doing embedded Linux dev without a Linux PC (or VM) is a bit brave, i would say… the DB410c is a little ‘low’ on the performance , especially with its 1GB of RAM, so you might end up into some memory limitations … but you should still be able to get all instructions to work.

Hi @barryb

as @ndec says I always do my builds on the 410c. You do need a SDCard with a swap space (1GB is enough) to get the download and compile to run. It’s not that slow, about 30 mins to rebuild the kernel and the device tree. The basic instructions are in this thread: http://www.96boards.org/forums/topic/rebuilding-the-boot-partition-on-410c/#post-8330

a couple minor differences for this build:

 git checkout -b build-80 6ee1ac74d8115fd050cb76a5e668f11ef0c8a266

and
make Image dtbs -j4 KERNELRELEASE=make kernelversion`-linaro-lt-qcom"

in the command above you need back-ticks around the make kernelversion, but the forum formatter mess them up.
No need to set up a cross compiler, the native compiler works just fine.

Wrt UPM/MRAA, packages are available in the overlay repositories and should be included in the latest images. The relevant commit is:
https://git.linaro.org/ci/ubuntu-build-service.git/commitdiff/fd1bc6aa150f837300875c721bb12387f8aaa183

For libsoc, the package available is the latest release which doesn’t include the python bindings. An updated package with the python bindings enabled is coming shortly. The official 0.8 release should done in the next couple of weeks by upstream.

You should probably install libmraa-dev, libupm-dev and libsoc-dev if you want to build the examples.

I can’t comment on spidev as I haven’t tried but using python3 looks suspicious. The default python version is 2.7 so I suggest to use the default python.

Hi,

This release is fantastic.

(1)
The USB-Sound card works.
This is really good!
$ sudo apt-get install vlc
and was able to play mp4 file. :slight_smile:
This is the dmesg.
[ 775.369177] usb 1-1.1: new full-speed USB device number 4 using msm_hsusb_host
[ 775.462848] usb 1-1.1: New USB device found, idVendor=0d8c, idProduct=000c
[ 775.462931] usb 1-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 775.468805] usb 1-1.1: Product: C-Media USB Headphone Set
[ 775.514117] input: C-Media USB Headphone Set as /devices/platform/soc/78d9000.ehci/usb1/1-1/1-1.1/1-1.1:1.3/0003:0D82
[ 775.570144] hid-generic 0003:0D8C:000C.0001: input: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-78d9000.3

(2)
Supports Grove Starter Kit for 96Boards out of the box.
To install libmraa and libupm for using them. No more building them from source.
$ apt-get update
$ sudo apt-get install libmraa0
$ sudo apt-get install libmraa-dev
$ sudo apt-get install libupm-dev
$ wget https://github.com/96boards/Starter_Kit_for_96Boards/archive/master.zip
$ unzip master.zip
$ cd Starter_Kit_for_96Boards-master
$ cd rgb_lcd_demo
$ make
$ sudo ./rgb_lcd_demo
(this is the only minor changes, now it requires to use “sudo”)
Now you could see LCD working.
:slight_smile:

So I’ve been fighting with the WIFI bug for the past couple of days on a dragonboard running :

https://bugs.96boards.org/show_bug.cgi?id=272

And was tempted to attempt to patch the WIFI bug myself and quickly realized it would be an all day project. Thus I took the plunge on this dev release and found that the same “hal_remove_bsskey” error occurring on network restart.

I did not find anything out of the ordinary in dmesg / journalctl other than the hal_remove_bsskey warning. I did find ssh sessions dropping and general Internet connectivity to be latent. Ping times, even to the local router, were sporadic, with the device sitting next to it. However, it did not disconnect at all. After updates, several reboots + trying different hotspots, the results were the same.

My assumption is that bug (id 272) has not been patched. Or it has been patched and I’m fighting something else.

All of my troubleshooting (prior to reading about the bug) pointed me to ipv6 & ssh/ssl issues. Everything I tried resulted in failure and continued intermittent connectivity. When I attempted to ssh or scp in or out of the box, the connection would become latent.

I installed vino & dconf-editor, enabled the vnc server and started vino-server, while running a continuous ping to the router. When I started vino-server, some packet loss occurred.

Between reboots, disabling ipv6 (set to local link only), setting a static IP, resetting the wifi router, running nm-applet as root, I ended up getting a stable connection. Now I’m using vino successfully for a good 20 minutes. I see these new errors in dmesg, related to qualcomm codec (I assume this is because I ran nm-applet as root):

[ 20.026361] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_rx1 DAI-ID 0 rate 48000 num_ch 2 format 2
[ 20.027991] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_tx1 DAI-ID 1 rate 48000 num_ch 2 format 2
[ 20.117127] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.117187] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.161051] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.185116] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.216710] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_rx1 DAI-ID 0 rate 48000 num_ch 2 format 2
[ 20.289797] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_tx1 DAI-ID 1 rate 48000 num_ch 2 format 2
[ 20.369117] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.369170] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1

I updated; upgraded & for shits & giggles, installed kodi. While typing this the vnc session is lagging, but still connected.

Nothing new in dmesg.

I ran kodi and it was surprisingly peppy; far more responsive than I have seen it on any other install. After adding digitally imported to music, the vnc session froze, presumably because of intermittent network. I restarted the network and was able to connect again. After some time, digitally imported finally loaded and was able to play. However, I do not have any speakers on the HDMI monitor, so I added a bluetooth speaker. The vnc session reconnected sporadically but functioned, even with kodi running.

Another error in dmesg:

1075.866789] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_rx1 DAI-ID 0 rate 48000 num_ch 2 format 2
li

sh: 1: nmblookup: not found
sh: 1: nmblookup: not found
sh: 1: nmblookup: not found

finally nothing working right, so…

reboot

now having a hard time connecting to any wifi…

I did manage to connect a bluetooth speaker, but without Internet did not get any noise. Seems once the bluetooth is up, the wifi won’t authenticate.

Does this release include the wifi patch?

this release does not include fix for 272, but for 294 (e.g. SoftAP). we will make another update when 272 is fixed.

Not sure if this is related to 272 or not, but I did confirm that once you install bluetooth, blueman, bluez, the wifi modem will continuously timeout while trying to authenticate (even with bluetooth modem down). Once you purge bluetooth, wifi instantly connects.

I managed to get through testing the spi on the latest build. I have to make some changes to the device tree to enable /dev/spidev0.0, and a change to the spi driver to make the chip select work properly. Here are the changes. Add the block of code proceeded with a ‘+’ sign into the file arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi:

        spi@78b9000 {
	/* On Low speed expansion */
	label = “LS-SPI0”;
	status = <Okay>;
+		spidev@0 {
+			compatible = "spidev";
+			spi-max-frequency = <50000000>;
+			reg = <0>;
+		};
        };

In the file arch/arm64/boot/dts/qcom/msm8916-pins.dtsi near line 211 change the line marked with a + to:

        pinmux_cs {
+		function = “blsp_spi5”;
		pins = “gpio18”;
	};

In the file drivers/spi/spi-qup.c near line 549 add the line:

’ + control |= SPI_IO_C_MX_CS_MODE; ’

I think this should be added to the driver at all times.

Recompile the kernel, and rebuild the device tree and SPI works.

You can also access to spidev from Python by installing python spidev:


sudo apt-get install python-pip
pip install spidev’

and then write code to read the ADC on the linker board:


import spidev
spi=spidev.SpiDev()
spi.open(0,0)
spi.max_speed_hz=100000
channel_select=[0x01, 0x80, 0x00]
if name==’main’:
print(“welcome to the slide pot reader”)
try:
while True:
adc_data=spi.xfer(channel_select)
adc=((adc_data[1]<<8)&0x300)|(adc_data[2]&0xFF)
print(adc)
except KeyboardInterrupt:
print(“CTRL-C, Exiting”)’

I did not check that the SPI driver changes to allow packets larger than 16 bytes, I will leave this to @suicidaleggroll to check.

what do you mean by ‘install bluetooth’ or ‘purge bluetooth’?

also, how did you install the release, did you use the SD card install or are you flashing the kernel and rootfs directly? If the latter, are you sure to use the latest ‘linux bootloader’ package, e.g.

http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/16.02/dragonboard410c_bootloader_emmc_linux-46.zip

the sbl1 binary in this package contains a fix needed for the WLAN firmware.

ndec, yes I am using the boot loader that was built on 2-10 and flashed to emmc.

When you have a connection to wifi, without bluetooth blueman bluez bluez-tools installed, and you install them:

sudo apt-get install bluetooth blueman bluez bluez-tools

And turn on bluetooth, make a connection to a device (bluetooth speaker in my case), the wifi stops working and times out while trying to re-authenticate.

Then typing:

sudo apt-get purge bluetooth blueman bluez bluez-tools

The wifi reconnects and authenticates on its own (but remains intermittent and latent).

hi ndec -

I was able to stabilize the wifi connection by stopping NetworkManager from scanning using this:

sudo killall -STOP NetworkManager

Once it stops scanning, bug 272 goes away and it is stable.

Regardless of what I do, I cannot get the bluetooth modem & wifi modem to work simultaneously. As soon as bluetooth is loaded, regardless if the service is running or the modem on, the wifi disconnects and cannot re-authenticate (with network-manager on).

I’m using 16.04 every day with dragonboard410c_bootloader_emmc_linux-46.zip bootloader. Any suggestions on how to make bluetooth work as well is much appreciated.

Once the wifi is stable, everything else works well, other than bluetooth.

Update:

Yesterday I took the 5/04 developer build and stripped out the bloat (which was minimal, pulseaudio, network-manager, alsa, avahi, blah) and added the stretch sources, while keeping the linaro sources. updated; upgraded; purged; upgraded; purged; solved dependency issues; rebooted - in a cycle for about 20 minutes and ended up with a nice stable stretch build with both wifi & bluetooth running nicely, other than that pesky 272 bug. I even updated with the most recent boot-loader again for good measure.

Then I added LXDE, alsa, pulseaudio, etc.

With NetworkManager stopped all is stable and I was able to install a bunch of audio / visual packages and start broadcasting both audio wireless throughout the house (working on video).

Of course I am not using anything other than USB wireless keyboard mouse, bluetooth speaker, pulseaudio-dlna, HDMI, so I am not exactly sure what I broke from the standard build by quasi-upgrading to stretch.

I noticed that the wifi starts to degrade (ping times go from ~1ms to sporadic ~30ms to 50ms) once the CPUs are pegged at 50%+ and RAM is pegged at ~90%, which I guess would be expected. I’m sure there is some tuning that could be done, which is admittedly beyond my capabilities. 272 remains the biggest issue.

Hi @noah,

Thank you for your great update report.
:slight_smile:

Any thoughts on when bug #272 will be patched in a official release? I see a 5/11 build released. Is it patched there?

I’m running 4.48 kernel with Stretch + linaro distros and the board is mostly stable. I’ve managed to corrupt the OS a couple of times by installing debootstraps and ended up without NetworkManager altogether.

I’m ready to help if I can…

hi, we are looking at 272, not sure yet, when it will be done. an initial patch was shard on the list:

http://www.spinics.net/lists/netdev/msg377402.html

but this is just a first attempt, not the final solution yet.

To follow up on the Apr 29 post by @ljking, I’ve finally upgraded to the 16.04 release so I could test it. This release does not include the SPI patches required for transfers >16 bytes, but the patches described in the previous spi thread still work, so there’s no major issue there:
http://www.96boards.org/forums/topic/how-to-enable-spi-and-access-it-in-debian-os/

I had to make the same changes ljking made to the dtsi files described on Apr 29, as well as apply the patches mentioned earlier to support my 32kB SPI transfers, and afterward everything is working fine. With the 16.02 release the CPU would lock up hard after about an hour of processing, and with 16.04 I’m at about 3 hours and counting with no issues. So far so good.

The original device I built a few months ago is still doing long term testing with the 15.12 release, but earlier this week I built two more devices, one of which is now doing long term testing on the 16.04 release, so in a week or two I’ll know how stable it is relative to 15.12.

One thing I’ve been noticing with the 15.12 release is I’ll get an occasional half-second CPU hiccup once or twice per day. It’s not too severe, and the hardware buffering I have on my device is enough to ride through it, but I wonder if this is related to the cpufreq issue that’s been resolved in this release. It’ll be interesting to see if that clears up now.

6 posts were split to a new topic: Problems with python-upm: Cannot import upm