WiFi/Bluetooth Demo release

#21

Hi All,
I have layout a custom small formfactor board that includes the TI WL1835 wiFi/BT chip connected dirrectly to a WP8548 processor, using the same connections UART connection and SD signals as the Mangoh platform and WiFI IOT card, Including same GPIO pins for the interrupt lines and BT and WL Enable signals.

There are direct connections with no I2C switches(PCA9548A) in the path, or SDIO switch (TXS0216)
The only other difference as far as I can tell compared to the Mangoh platform is there is no 24C32 1K Eeprom connected.

When trying to initialise the WiFI using wifi client start the first time, it comes back with an error,
and if I try wifi client scan it core dumps.

What would be the best way to manually intialise the TI Wifi driver and print out all the warnings/error messages?

root@swi-mdm9x15:~# ifup wlan0
ERR* failed to write i2c data
FTL* Failed to enable PCA9548A I2C switch

From the Above I suspect that it will be necessary to comment out code that initialises the PCA9548A I2C switch.
May I ask which files I should start to look at to modify in the Source code, and what would be the best way to include back onto the embedded linux platform ?
Is it possible that only the driver may need to be updated, and insmod back in? or is it likely that I shall need to go to the yocto project and recompile the entire environment from the Yocto project?

$>dmesg

[ 137.469311] cfg80211: Calling CRDA to update world regulatory domain
[ 137.783610] cfg80211: World regulatory domain updated:
[ 137.787761] cfg80211: DFS Master region: unset
[ 137.793438] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 137.802624] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 137.810407] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 137.818129] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 137.826644] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 137.835830] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 137.845322] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 137.853349] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 137.861376] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 144.934564] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:187
[ 144.941095] qup_i2c qup_i2c.0: I2C slave addr:0x71 not connected
Any pointers would be most appreciated,
Kind Regards
Jason

0 Likes

#22

Hi Asyal,
The new firmware image has yocto built-in. Do I still need to follow the instruction here: https://github.com/mangOH/mangOH/wiki/Bluetooth-WL18xx-driver-for-mangOH to install Bluetooth driver to the mangOH board?

Here is the firmware version:
root@swi-mdm9x15:~# microcom -E /dev/ttyAT
ati8
Legato Ver: 16.10.1_a6a25fbda05738774857dccb9fd76a99_modified
Yocto Ver: SWI9X15Y_07.11.21.00 2016-12-07_20:57:53
OS Ver: Linux version 3.14.29ltsi-a00e464379_b0ce579abb (gsmbuild@CARMD-EV-FRMWR1) (gcc version 4.9.1 (GCC) ) #2 PREEMPT Wed Dec 7 20:56:58 PST 2016
LK Ver: 1.3.0_a50272dbb2
RootFS Ver: SWI9X15Y_07.11.21.00 2016-12-07_20:57:53
UserFS Ver: unknown
MCU Ver: 001.011

OK

Here the apps that in my board:
root@swi-mdm9x15:~# app status
[running] atClient
[running] atServer
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] devMode
[running] fwupdateService
[running] gpioService
[running] modemService
[running] positioningService
[running] powerMgr
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[running] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[stopped] bluetoothUtil
[running] muxCtrlService
[running] muxCtrlTools

Here is the error message when trying to start Bluetooth on the board:
root@swi-mdm9x15:~# logread -f | grep "bluetooth"
Jan 8 01:03:10 swi-mdm9x15 user.info Legato: INFO | bt-init.sh[4667] | PWD is: /legato/systems/current/appsWriteable/bluetoothUtil
Jan 8 01:03:11 swi-mdm9x15 user.err Legato: =ERR= | bt-init.sh[4667] | modprobe: module bluetooth not found in modules.dep
Jan 8 01:03:16 swi-mdm9x15 user.err Legato: =ERR= | bt-init.sh[4667] | /legato/systems/current/apps/bluetoothUtil/read-only/bin/bt-init.sh:
Jan 8 01:03:16 swi-mdm9x15 user.err Legato: =ERR= | bt-init.sh[4667] | /legato/systems/current/apps/bluetoothUtil/read-only/bin/bt-init.sh:
Jan 8 01:03:30 swi-mdm9x15 user.info Legato: INFO | supervisor[462]/supervisor T=main | apps.c DeactivateAppContainer() 340 | Application ‘bluetoothUtil’ has stopped.

Looking forward your reply and thank you for your help!
Thank you!
YK

0 Likes

#23

Hi YK,

You need to build the Bluetooth drivers and follo instructions as the Bluetooth driver is not built in.

Regards,
Ashish

0 Likes

#24

Hi Asyal,
Thanks for your reply. I have encountered issue at step#6ii and iii when I try to change kernel configuration: https://github.com/mangOH/mangOH/wiki/Bluetooth-WL18xx-driver-for-mangOH. Please advise.

Also, the VM I am using to build this image is Ubuntu-16.04. Could you advise what is the “tested distribution” would be best to make this image? What is the hardware spec? By any chance, would that be possible to share the new build CWE images: yocto_wp85.cwe ? We are using the same Bluetooth WL18xx.

**step#6 ii Cannot provide "f"
mangoh@mangoh-virtualbox:~/legato/yk/downloads/yocto/build_bin$ bitbake linux-yocto -c kernel_configme f
WARNING: Host distribution “Ubuntu-16.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#########################################################################################################################| ETA: 00:00:00
Loaded 2073 entries from dependency cache.
Parsing recipes: 100% |#######################################################################################################################| Time: 00:00:06
Parsing of 1602 .bb files complete (1600 cached, 2 parsed). 2074 targets, 200 skipped, 0 masked, 0 errors.
ERROR: Nothing PROVIDES ‘f’

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Step#6 iii, _ERROR: Function failed: do_menuconfig
mangoh@mangoh-virtualbox:~/legato/yk/downloads/yocto/build_bin$ bitbake linux-yocto -c menuconfig
WARNING: Host distribution “Ubuntu-16.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#########################################################################################################################| ETA: 00:00:00
Loaded 2073 entries from dependency cache.
Parsing recipes: 100% |#######################################################################################################################| Time: 00:00:06
Parsing of 1602 .bb files complete (1600 cached, 2 parsed). 2074 targets, 200 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "swi-mdm9x15"
DISTRO = "poky-swi-ext"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "arm armv7a vfp neon"
TARGET_FPU = "vfp-neon"
meta
meta-yocto
meta-yocto-bsp = "(nobranch):c282df8993828bd7b1d50cfcf637a477eaf481a1"
meta-mangoh = "(nobranch):b58ad3c6a4e4d0f2d563e8af86c46f96f8ba3bb6"
meta-python
meta-networking
meta-oe = "(nobranch):70beecb2716bca1b9dfbc7d6a264233e1f05e82b"
meta-swi
meta-swi-mdm9xxx
meta-swi-mdm9x15 = "master:70317fa501d3af2a5fa04e92a9bf25feb716efa8"
meta-swi-extras
meta-swi-bin = “master:dc7691c2766b5ac7d8be82930de19066355628fe”

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Unable to spawn terminal auto: Execution of ‘/home/mangoh/legato/yk/downloads/yocto/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/3.14.29+gitAUTOINC+a00e464379_b0ce579abb-r0.1/temp/run.do_terminal.26657’ failed with exit code 1:
Option “-t” is no longer supported in this version of gnome-terminal.
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8

ERROR: Function failed: do_menuconfig
ERROR: Logfile of failure stored in: /home/mangoh/legato/yk/downloads/yocto/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/3.14.29+gitAUTOINC+a00e464379_b0ce579abb-r0.1/temp/log.do_menuconfig.26657
ERROR: Task 7 (/home/mangoh/legato/yk/downloads/yocto/poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb, do_menuconfig) failed with exit code '1’
NOTE: Tasks Summary: Attempted 254 tasks of which 253 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/mangoh/legato/yk/downloads/yocto/poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb, do_menuconfig
Summary: There was 1 WARNING message shown.

Thanks
YK

0 Likes

#25

Sorry! It should have been -f instead of just f. I have corrected the wiki page. We had a number of issues like this because we migrated some documentation from word into the wiki and it didn’t copy-paste very well.

0 Likes

#26

Thanks for your reply. I actually found this in http://www.yoctoproject.org/docs/1.6.1/kernel-dev/kernel-dev.html as well so I could get Step6 ii worked without error, but still have same error for Step6 iii. Any hints would help, thanks!

ERROR: Unable to spawn terminal auto: Execution of ‘/home/mangoh/legato/yk/downloads/yocto/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/3.14.29+gitAUTOINC+a00e464379_b0ce579abb-r0.1/temp/run.do_terminal.3387’ failed with exit code 1:
Option “-t” is no longer supported in this version of gnome-terminal.
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8

ERROR: Function failed: do_menuconfig
ERROR: Logfile of failure stored in: /home/mangoh/legato/yk/downloads/yocto/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/3.14.29+gitAUTOINC+a00e464379_b0ce579abb-r0.1/temp/log.do_menuconfig.3387
ERROR: Task 7 (/home/mangoh/legato/yk/downloads/yocto/poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb, do_menuconfig) failed with exit code ‘1’

0 Likes

bluetoothUtil - sensorTag - WL18XX driver issues
#27

@Wavefront_yk I think you should try this from an other terminal, one that support the “-t” option, I’m using terminator and I didn’t have the issue

Option “-t” is no longer supported in this version of gnome-terminal.

1 Like

#28

Solution:
I have to switch to Linux machine instead of VM with 4 cores, 8GB ram, 50GB disk.
Add “dbus-launch” into line 55 in this file: yocto/poky/meta/lib/oe/terminal.py

class Gnome(XTerminal):
command = 'dbus-launch gnome-terminal -t “{title}” -x {command}'
priority = 2

1 Like