微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > 嵌入式系统设计讨论 > 5.WaRP7开发板自带WIFI功能验证和MPL3115A2模块功能验证

5.WaRP7开发板自带WIFI功能验证和MPL3115A2模块功能验证

时间:10-02 整理:3721RD 点击:
  根据下图我们知道WaRP7有一个自带WIFI模块。接过多方查找终于找到了WIFI的名字LBEE5KL1DX。



  下面是尝试如何加载驱动。最简单的方式是按照文档User_Guide_Manual_v1-3.pdf说明更换新的Yocto项目。
  

  1. $ mkdir ~/bin
  2. $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
  3. $ chmod a+x ~/bin/repo
  4. $ PATH=${PATH}:~/bin
  5. $ mkdir fsl-community-bsp
  6. $ cd fsl-community-bsp
  7. $ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b krogoth
  8. $ repo sync

复制代码

经过差不多8个小时下载,编译,然后开发板将新的系统固件跑起来。从网上找到一个使能WIFI的脚本程序,https://github.com/WaRP7/warp7-unit-test/blob/master/unit_test/Wifi_BCM4343_enable.sh

  1. #!/bin/sh
  2. #WaRP7 Wi-Fi Enablement Script
  3. FILE=/lib/modules/$(uname -r)/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko
  4. if [ -f $FILE ];
  5. then
  6.         modprobe bcmdhd
  7.         ifconfig wlan0 up
  8.         echo "Enter the network name (SSID)"
  9.         read SSID
  10.         echo "Type the passphrase for the network and hit enter"
  11.         read PSW
  12.         wpa_passphrase $SSID $PSW  > /etc/wpa_supplicant.conf
  13.         cat /etc/wpasupplicant.conf
  14.         wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211 &
  15.         wait
  16.         udhcpc -i wlan0
  17.         echo "You can now use the ping command to test your connection"
  18. else
  19.         echo "bcmdhd.ko module file not found"
  20. fi

复制代码

在开发板上运行此脚本







































































  1. U-Boot 2016.07+fslc+ge6b4241 (Aug 05 2017 - 16:12:34 +0800)

  2. CPU:   Freescale i.MX7S rev1.2 at 792MHz
  3. CPU:   Extended Commercial temperature grade (-20C to 105C) at 36C
  4. Reset cause: POR
  5. Board: WARP7
  6. DRAM:  512 MiB
  7. MMC:   FSL_SDHC: 0
  8. *** Warning - bad CRC, using default environment

  9. In:    serial
  10. Out:   serial
  11. Err:   serial
  12. Net:   CPU Net Initialization Failed
  13. No ethernet found.
  14. Hit any key to stop autoboot:  0
  15. switch to partitions #0, OK
  16. mmc0(part 0) is current device
  17. switch to partitions #0, OK
  18. mmc0(part 0) is current device
  19. reading boot.scr
  20. ** Unable to read file boot.scr **
  21. reading zImage
  22. 6270216 bytes read in 94 ms (63.6 MiB/s)
  23. Booting from mmc ...
  24. reading imx7s-warp.dtb
  25. 37585 bytes read in 12 ms (3 MiB/s)
  26. Kernel image @ 0x80800000 [ 0x000000 - 0x5fad08 ]
  27. ## Flattened Device Tree blob at 83000000
  28.    Booting using the fdt blob at 0x83000000
  29.    Using Device Tree in place at 83000000, end 8300c2d0

  30. Starting kernel ...

  31. Booting Linux on physical CPU 0x0
  32. Linux version 4.1.32-4.1-1.0.x-imx-warp7+g511f37a (gaozh@T430) (gcc version 5.3.0 (GCC) ) #1 SMP PREEMPT Sat Aug 5 12:23:21 CST 2017
  33. CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
  34. CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
  35. Machine model: Warp i.MX7S Board
  36. Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB
  37. Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
  38. Memory policy: Data cache writealloc
  39. PERCPU: Embedded 12 pages/cpu @8bb23000 s16908 r8192 d24052 u49152
  40. Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
  41. Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk2p2 rootwait rw
  42. PID hash table entries: 2048 (order: 1, 8192 bytes)
  43. Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
  44. Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
  45. Memory: 179216K/524288K available (7816K kernel code, 455K rwdata, 2788K rodata, 424K init, 473K bss, 17392K reserved, 327680K cma-reserved, 0K highmem)
  46. Virtual kernel memory layout:
  47.     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
  48.     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
  49.     vmalloc : 0xa0800000 - 0xff000000   (1512 MB)
  50.     lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
  51.     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
  52.     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
  53.       .text : 0x80008000 - 0x80a634a4   (10606 kB)
  54.       .init : 0x80a64000 - 0x80ace000   ( 424 kB)
  55.       .data : 0x80ace000 - 0x80b3ffe0   ( 456 kB)
  56.        .bss : 0x80b42000 - 0x80bb8640   ( 474 kB)
  57. SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
  58. Preemptible hierarchical RCU implementation.
  59.         Additional per-CPU info printed with stalls.
  60.         RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
  61. RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
  62. NR_IRQS:16 nr_irqs:16 16
  63. Architected cp15 timer(s) running at 8.00MHz (phys).
  64. clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns
  65. sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
  66. Switching to timer-based delay loop, resolution 125ns
  67. mxc_clocksource_init 3000000
  68. Ignoring duplicate/late registration of read_current_timer delay
  69. clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
  70. Console: colour dummy device 80x30
  71. Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=80000)
  72. pid_max: default: 32768 minimum: 301
  73. Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
  74. Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
  75. CPU: Testing write buffer coherency: ok
  76. /cpus/cpu@0 missing clock-frequency property
  77. /cpus/cpu@1 missing clock-frequency property
  78. CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
  79. Setting up static identity map for 0x80008280 - 0x800082d8
  80. CPU1: failed to come online
  81. Brought up 1 CPUs
  82. SMP: Total of 1 processors activated (16.00 BogoMIPS).
  83. CPU: All CPU(s) started in SVC mode.
  84. devtmpfs: initialized
  85. device-tree: Duplicate name in lcdif@30730000, renamed to "display#1"
  86. VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
  87. clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
  88. pinctrl core: initialized pinctrl subsystem
  89. NET: Registered protocol family 16
  90. DMA: preallocated 256 KiB pool for atomic coherent allocations
  91. cpuidle: using governor ladder
  92. cpuidle: using governor menu
  93. DDR type is LPDDR3!
  94. hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
  95. hw-breakpoint: maximum watchpoint size is 8 bytes.
  96. imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl driver
  97. imx7d-pinctrl 30330000.iomuxc: initialized IMX pinctrl driver
  98. gpio-reset mipi-dsi-reset: reset-gpios property missing, or not a single gpio
  99. gpio-reset: probe of mipi-dsi-reset failed with error -22
  100. MU is ready for cross core communication!
  101. mxs-dma 33000000.dma-apbh: initialized
  102. SCSI subsystem initialized
  103. usbcore: registered new interface driver usbfs
  104. usbcore: registered new interface driver hub
  105. usbcore: registered new device driver usb
  106. 30800000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
  107. 30800000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator
  108. i2c i2c-0: IMX I2C adapter registered
  109. i2c i2c-0: can't use DMA
  110. i2c i2c-1: IMX I2C adapter registered
  111. i2c i2c-1: can't use DMA
  112. i2c i2c-2: IMX I2C adapter registered
  113. i2c i2c-2: can't use DMA
  114. i2c i2c-3: IMX I2C adapter registered
  115. i2c i2c-3: can't use DMA
  116. Linux video capture interface: v2.00
  117. pps_core: LinuxPPS API ver. 1 registered
  118. pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
  119. PTP clock support registered
  120. MIPI CSI2 driver module loaded
  121. Advanced Linux Sound Architecture Driver Initialized.
  122. Bluetooth: Core ver 2.20
  123. NET: Registered protocol family 31
  124. Bluetooth: HCI device and connection manager initialized
  125. Bluetooth: HCI socket layer initialized
  126. Bluetooth: L2CAP socket layer initialized
  127. Bluetooth: SCO socket layer initialized
  128. Switched to clocksource arch_sys_counter
  129. NET: Registered protocol family 2
  130. TCP established hash table entries: 4096 (order: 2, 16384 bytes)
  131. TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
  132. TCP: Hash tables configured (established 4096 bind 4096)
  133. UDP hash table entries: 256 (order: 1, 8192 bytes)
  134. UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
  135. NET: Registered protocol family 1
  136. RPC: Registered named UNIX socket transport module.
  137. RPC: Registered udp transport module.
  138. RPC: Registered tcp transport module.
  139. RPC: Registered tcp NFSv4.1 backchannel transport module.
  140. imx rpmsg driver is registered.
  141. Bus freq driver module loaded
  142. futex hash table entries: 512 (order: 3, 32768 bytes)
  143. VFS: Disk quotas dquot_6.6.0
  144. VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
  145. NFS: Registering the id_resolver key type
  146. Key type id_resolver registered
  147. Key type id_legacy registered
  148. jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
  149. fuse init (API version 7.23)
  150. io scheduler noop registered
  151. io scheduler deadline registered
  152. io scheduler cfq registered (default)
  153. backlight supply power not found, using dummy regulator
  154. MIPI DSI driver module loaded
  155. 30760000.mipi-dsi supply disp-power-on not found, using dummy regulator
  156. mxc_mipi_dsi_samsung 30760000.mipi-dsi: i.MX MIPI DSI driver probed
  157. MIPI DSI driver module loaded
  158. 30730000.lcdif supply lcd not found, using dummy regulator
  159. mxc_mipi_dsi_samsung 30760000.mipi-dsi: MIPI DSI dispdrv inited!
  160. mxsfb 30730000.lcdif: registered mxc display driver mipi_dsi_samsung
  161. Console: switching to colour frame buffer device 40x40
  162. mxsfb 30730000.lcdif: initialized
  163. imx-sdma 30bd0000.sdma: no event needs to be remapped
  164. imx-sdma 30bd0000.sdma: loaded firmware 4.2
  165. imx-sdma 30bd0000.sdma: initialized
  166. pfuze100-regulator 0-0008: Full layer: 1, Metal layer: 1
  167. pfuze100-regulator 0-0008: FAB: 0, FIN: 0
  168. pfuze100-regulator 0-0008: pfuze3000 found.
  169. 30860000.serial: ttymxc0 at MMIO 0x30860000 (irq = 272, base_baud = 1500000) is a IMX
  170. console [ttymxc0] enabled
  171. 30880000.serial: ttymxc2 at MMIO 0x30880000 (irq = 273, base_baud = 5000000) is a IMX
  172. imx sema4 driver is registered.
  173. [drm] Initialized drm 1.1.0 20060810
  174. [drm] Initialized vivante 1.0.0 20120216 on minor 0
  175. brd: module loaded
  176. loop: module loaded
  177. input: fxos8700 as /devices/platform/soc/30800000.aips-bus/30a50000.i2c/i2c-3/3-001e/input/input0
  178. fxos8700 device driver probe successfully
  179. input: fxas2100x as /devices/platform/soc/30800000.aips-bus/30a50000.i2c/i2c-3/3-0020/input/input1
  180. fxas2100x 3-0020: fxas2100x device driver probe successfully
  181. CAN device driver interface
  182. ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
  183. ehci-mxc: Freescale On-Chip EHCI Host driver
  184. usbcore: registered new interface driver usb-storage
  185. usbcore: registered new interface driver usb_ehset_test
  186. 30b10200.usbmisc supply vbus-wakeup not found, using dummy regulator
  187. 30b20200.usbmisc supply vbus-wakeup not found, using dummy regulator
  188. 30b30200.usbmisc supply vbus-wakeup not found, using dummy regulator
  189. mousedev: PS/2 mouse device common for all mice
  190. input: 30370000.snvs:snvs-powerkey as /devices/platform/soc/30000000.aips-bus/30370000.snvs/30370000.snvs:snvs-powerkey/input/input2
  191. [HXTP] Himax 852xES touch panel driver init
  192. [HXTP] himax852xes_init_async:Enter
  193. [HXTP]  DT-himax_parse_dt:panel-coords = 0, 320, 0, 320
  194. [HXTP]  DT-himax_parse_dt:display-coords = (320, 320)
  195. read mpl3115 chip id 0xc4
  196. input: mpl3115 as /devices/virtual/input/input3
  197. [HXTP]  DT:gpio_rst value is not valid
  198. [HXTP]  DT:gpio_3v3_en value is not valid
  199. [HXTP]  DT:gpio_irq=1, gpio_rst=-2, gpio_3v3_en=-2[HXTP]  DT:protocol_type=1[HXTP]  DT-No vk info in DT
  200. mpl3115 device driver probe successfullysnvs_rtc 30370000.snvs:snvs-rtc-lp: rtc core: registered 30370000.snvs:snvs- as rtc0
  201. i2c /dev entries driver
  202. IR NEC protocol handler initialized
  203. IR RC5(x/sz) protocol handler initialized
  204. IR RC6 protocol handler initialized
  205. IR JVC protocol handler initialized
  206. IR Sony protocol handler initialized
  207. IR SANYO protocol handler initialized
  208. [HXTP][ERROR] i2c_himax_read:write reg error:reg=1
  209. IR Sharp protocol handler initialized
  210. IR MCE Keyboard/mouse protocol handler initialized
  211. IR XMP protocol handler initialized
  212. [HXTP][ERROR] Himax chip doesn NOT EXIST
  213. imx2-wdt 30280000.wdog: timeout 60 sec (nowayout=0)
  214. Bluetooth: HCI UART driver ver 2.3
  215. Bluetooth: HCI UART protocol H4 registered
  216. usbcore: registered new interface driver bcm203x
  217. sdhci: Secure Digital Host Controller Interface driver
  218. sdhci: Copyright(c) Pierre Ossman
  219. sdhci-pltfm: SDHCI platform and OF driver helper
  220. /soc/aips-bus@30800000/usdhc@30b40000: voltage-ranges unspecified
  221. sdhci-esdhc-imx 30b40000.usdhc: assigned as wifi host
  222. sdhci-esdhc-imx 30b40000.usdhc: No vmmc regulator found
  223. sdhci-esdhc-imx 30b40000.usdhc: No vqmmc regulator found
  224. mmc0: SDHCI controller on 30b40000.usdhc [30b40000.usdhc] using ADMA
  225. /soc/aips-bus@30800000/usdhc@30b60000: voltage-ranges unspecified
  226. sdhci-esdhc-imx 30b60000.usdhc: No vmmc regulator found
  227. sdhci-esdhc-imx 30b60000.usdhc: No vqmmc regulator found
  228. mmc2: SDHCI controller on 30b60000.usdhc [30b60000.usdhc] using ADMA
  229. caam 30900000.caam: Entropy delay = 3200
  230. caam 30900000.caam: Instantiated RNG4 SH0
  231. caam 30900000.caam: Instantiated RNG4 SH1
  232. caam 30900000.caam: device ID = 0x0a16030000000000 (Era -524)
  233. caam 30900000.caam: job rings = 3, qi = 0
  234. caam algorithms registered in /proc/crypto
  235. caam_jr 30901000.jr0: registering rng-caam
  236. platform caam_sm: blkkey_ex: 8 keystore units available
  237. platform caam_sm: 64-bit clear key:
  238. platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
  239. platform caam_sm: 64-bit black key:
  240. platform caam_sm: [0000] 48 04 83 4a eb f3 a5 5a
  241. platform caam_sm: [0008] 08 7f dc ee e4 b3 4a 80
  242. platform caam_sm: 128-bit clear key:
  243. platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
  244. platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
  245. platform caam_sm: 128-bit black key:
  246. mmc2: MAN_BKOPS_EN bit is not set
  247. platform caam_sm: [0000] f0 45 b7 66 60 d5 86 f9
  248. platform caam_sm: [0008] 19 26 cd 5c f2 a4 50 58
  249. platform caam_sm: 192-bit clear key:
  250. platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
  251. platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
  252. platform caam_sm: [0016] 10 11 12 13 14 15 16 17
  253. platform caam_sm: 192-bit black key:
  254. mmc2: mmc_select_hs200 failed, error -74
  255. platform caam_sm: [0000] ff fa 85 c1 da c9 9a 9b
  256. platform caam_sm: [0008] 41 8e b5 bf 87 91 fc 23
  257. platform caam_sm: [0016] 28 a2 36 71 f8 75 2a 69
  258. : switch to mmc2 failed
  259. mmc2: new MMC card at address 0001
  260. platform caam_sm: [0024] 35 e6 87 e3 df e2 92 87
  261. platform caam_sm: 256-bit clear key:
  262. platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
  263. mmcblk2: mmc2:0001 V10008 7.05 GiB
  264. mmcblk2boot0: mmc2:0001 V10008 partition 1 4.00 MiB
  265. mmcblk2boot1: mmc2:0001 V10008 partition 2 4.00 MiB
  266. platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
  267. mmcblk2rpmb: mmc2:0001 V10008 partition 3 4.00 MiB
  268. platform caam_sm: [0016] 10 11 12 13 14 15 16 17
  269. platform caam_sm: [0024] 18 19 1a 1b 1c 1d 1e 1f
  270. mmcblk2: p1 p2
  271. platform caam_sm: 256-bit black key:
  272. platform caam_sm: [0000] 19 c2 e8 5e 4c 10 70 6d
  273. platform caam_sm: [0008] da 39 53 fe c6 c4 e3 9e
  274. platform caam_sm: [0016] a9 76 bc db 38 61 c6 ab
  275. platform caam_sm: [0024] 84 53 b2 96 7e be f1 00
  276. platform caam_sm: 64-bit unwritten blob:
  277. platform caam_sm: [0000] 00 00 00 00 00 00 00 00
  278. platform caam_sm: [0008] 00 00 00 00 00 00 00 00
  279. platform caam_sm: [0016] 00 00 00 00 00 00 00 00
  280. platform caam_sm: [0024] 00 00 00 00 00 00 00 00
  281. platform caam_sm: [0032] 00 00 00 00 00 00 00 00
  282. platform caam_sm: [0040] 00 00 00 00 00 00 00 00
  283. platform caam_sm: [0048] 00 00 00 00 00 00 00 00
  284. platform caam_sm: [0056] 00 00 00 00 00 00 00 00
  285. platform caam_sm: [0064] 00 00 00 00 00 00 00 00
  286. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  287. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  288. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  289. platform caam_sm: 128-bit unwritten blob:
  290. platform caam_sm: [0000] 00 00 00 00 00 00 00 00
  291. platform caam_sm: [0008] 00 00 00 00 00 00 00 00
  292. platform caam_sm: [0016] 00 00 00 00 00 00 00 00
  293. platform caam_sm: [0024] 00 00 00 00 00 00 00 00
  294. platform caam_sm: [0032] 00 00 00 00 00 00 00 00
  295. platform caam_sm: [0040] 00 00 00 00 00 00 00 00
  296. platform caam_sm: [0048] 00 00 00 00 00 00 00 00
  297. platform caam_sm: [0056] 00 00 00 00 00 00 00 00
  298. platform caam_sm: [0064] 00 00 00 00 00 00 00 00
  299. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  300. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  301. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  302. platform caam_sm: 196-bit unwritten blob:
  303. platform caam_sm: [0000] 00 00 00 00 00 00 00 00
  304. platform caam_sm: [0008] 00 00 00 00 00 00 00 00
  305. platform caam_sm: [0016] 00 00 00 00 00 00 00 00
  306. platform caam_sm: [0024] 00 00 00 00 00 00 00 00
  307. platform caam_sm: [0032] 00 00 00 00 00 00 00 00
  308. platform caam_sm: [0040] 00 00 00 00 00 00 00 00
  309. platform caam_sm: [0048] 00 00 00 00 00 00 00 00
  310. platform caam_sm: [0056] 00 00 00 00 00 00 00 00
  311. platform caam_sm: [0064] 00 00 00 00 00 00 00 00
  312. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  313. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  314. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  315. platform caam_sm: 256-bit unwritten blob:
  316. platform caam_sm: [0000] 00 00 00 00 00 00 00 00
  317. platform caam_sm: [0008] 00 00 00 00 00 00 00 00
  318. platform caam_sm: [0016] 00 00 00 00 00 00 00 00
  319. platform caam_sm: [0024] 00 00 00 00 00 00 00 00
  320. platform caam_sm: [0032] 00 00 00 00 00 00 00 00
  321. platform caam_sm: [0040] 00 00 00 00 00 00 00 00
  322. platform caam_sm: [0048] 00 00 00 00 00 00 00 00
  323. platform caam_sm: [0056] 00 00 00 00 00 00 00 00
  324. platform caam_sm: [0064] 00 00 00 00 00 00 00 00
  325. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  326. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  327. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  328. platform caam_sm: 64-bit black key in blob:
  329. platform caam_sm: [0000] 66 b6 af 0d a2 d1 a5 39
  330. platform caam_sm: [0008] 05 6c d1 b7 01 3a da 64
  331. platform caam_sm: [0016] bf c2 7e 06 88 8e 75 84
  332. platform caam_sm: [0024] 71 40 ba f0 6e ad f9 78
  333. platform caam_sm: [0032] 46 f8 7b 35 29 38 9b c5
  334. platform caam_sm: [0040] 40 7b a4 04 21 aa 0b a2
  335. platform caam_sm: [0048] b2 1e c0 ae 39 6f 8a 23
  336. platform caam_sm: [0056] 00 00 00 00 00 00 00 00
  337. platform caam_sm: [0064] 00 00 00 00 00 00 00 00
  338. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  339. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  340. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  341. platform caam_sm: 128-bit black key in blob:
  342. platform caam_sm: [0000] d7 7d 11 0c 1f f9 00 97
  343. platform caam_sm: [0008] fd 61 9a 4f 5e 87 1e d7
  344. platform caam_sm: [0016] 35 20 b6 cb 41 4a 6a 13
  345. platform caam_sm: [0024] 36 31 89 44 9b 9e 04 1d
  346. platform caam_sm: [0032] 24 a1 9f f7 4d 35 7c c9
  347. platform caam_sm: [0040] 73 f8 9a 1b 66 e7 af 4e
  348. platform caam_sm: [0048] 12 6e 18 51 4c 8f d8 4b
  349. platform caam_sm: [0056] ab 5c 80 44 46 7f c6 93
  350. platform caam_sm: [0064] 00 00 00 00 00 00 00 00
  351. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  352. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  353. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  354. platform caam_sm: 192-bit black key in blob:
  355. platform caam_sm: [0000] 07 79 ae 4c ca 34 72 32
  356. platform caam_sm: [0008] e2 02 ac 59 87 56 1a 1c
  357. platform caam_sm: [0016] 98 25 24 aa 65 b0 68 5c
  358. platform caam_sm: [0024] 2b 6a 01 af 24 4a df d5
  359. platform caam_sm: [0032] bf 2d a5 e3 ae c9 47 cc
  360. platform caam_sm: [0040] 31 e4 4d c0 0e 44 f8 dc
  361. platform caam_sm: [0048] 91 1a ea 76 a5 cd c9 a3
  362. platform caam_sm: [0056] 31 a8 ab 79 2b 81 84 28
  363. platform caam_sm: [0064] 62 2e 1c 0c 65 56 3d 35
  364. platform caam_sm: [0072] 00 00 00 00 00 00 00 00
  365. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  366. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  367. platform caam_sm: 256-bit black key in blob:
  368. platform caam_sm: [0000] 99 03 df 54 5c 13 82 53
  369. platform caam_sm: [0008] f4 9e 1f dc 5b 50 4b 5c
  370. platform caam_sm: [0016] 08 39 d3 2f 37 2d f6 36
  371. platform caam_sm: [0024] d4 4a fe 19 4e 8f 4d 96
  372. platform caam_sm: [0032] fd f4 15 8f c0 12 e9 4c
  373. platform caam_sm: [0040] e0 8c 1a a2 97 2e 43 31
  374. platform caam_sm: [0048] 74 41 3c 6b 1d d2 1f 82
  375. platform caam_sm: [0056] cb 2b a2 c7 db 30 d3 ab
  376. platform caam_sm: [0064] fc 95 68 3b cf 4b 94 f1
  377. platform caam_sm: [0072] 1f 7b e8 aa f6 b6 06 79
  378. platform caam_sm: [0080] 00 00 00 00 00 00 00 00
  379. platform caam_sm: [0088] 00 00 00 00 00 00 00 00
  380. platform caam_sm: restored 64-bit black key:
  381. platform caam_sm: [0000] 4d 02 02 2d 5f da df df
  382. platform caam_sm: [0008] 05 ba 59 14 ad 11 24 4d
  383. platform caam_sm: restored 128-bit black key:
  384. platform caam_sm: [0000] f0 45 b7 66 60 d5 86 f9
  385. platform caam_sm: [0008] 19 26 cd 5c f2 a4 50 58
  386. platform caam_sm: restored 192-bit black key:
  387. platform caam_sm: [0000] ff fa 85 c1 da c9 9a 9b
  388. platform caam_sm: [0008] 41 8e b5 bf 87 91 fc 23
  389. platform caam_sm: [0016] ff e6 97 be 98 d0 5e 5d
  390. platform caam_sm: [0024] ce 5a 35 d1 5a 32 68 61
  391. platform caam_sm: restored 256-bit black key:
  392. platform caam_sm: [0000] 19 c2 e8 5e 4c 10 70 6d
  393. platform caam_sm: [0008] da 39 53 fe c6 c4 e3 9e
  394. platform caam_sm: [0016] a9 76 bc db 38 61 c6 ab
  395. platform caam_sm: [0024] 84 53 b2 96 7e be f1 00
  396. snvs-secvio 30370000.caam-snvs: can't get snvs clock
  397. snvs-secvio 30370000.caam-snvs: violation handlers armed - non-secure state
  398. usbcore: registered new interface driver usbhid
  399. usbhid: USB HID core driver
  400. NET: Registered protocol family 26
  401. NET: Registered protocol family 10
  402. sit: IPv6 over IPv4 tunneling driver
  403. NET: Registered protocol family 17
  404. can: controller area network core (rev 20120528 abi 9)
  405. NET: Registered protocol family 29
  406. can: raw protocol (rev 20120528)
  407. can: broadcast manager protocol (rev 20120528 t)
  408. can: netlink gateway (rev 20130117) max_hops=1
  409. Bluetooth: RFCOMM TTY layer initialized
  410. Bluetooth: RFCOMM socket layer initialized
  411. Bluetooth: RFCOMM ver 1.11
  412. Bluetooth: BNEP (Ethernet Emulation) ver 1.3
  413. Bluetooth: BNEP filters: protocol multicast
  414. Bluetooth: BNEP socket layer initialized
  415. Bluetooth: HIDP (Human Interface Emulation) ver 1.2
  416. Bluetooth: HIDP socket layer initialized
  417. 8021q: 802.1Q VLAN Support v1.8
  418. Key type dns_resolver registered
  419. cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
  420. backlight supply power not found, using dummy regulator
  421. sgtl5000 3-000a: sgtl5000 revision 0x11
  422. sgtl5000 3-000a: Using internal LDO instead of VDDD
  423. asoc-simple-card sound: sgtl5000 <-> 308a0000.sai mapping ok
  424. backlight supply power not found, using dummy regulator
  425. input: gpio-keys as /devices/platform/gpio-keys/input/input4
  426. snvs_rtc 30370000.snvs:snvs-rtc-lp: setting system clock to 2017-08-05 09:29:55 UTC (1501925395)
  427. backlight supply power not found, using dummy regulator
  428. wlreg_on: disabling
  429. ALSA device list:
  430.   #0: imx7s-sgtl5000
  431. EXT3-fs (mmcblk2p2): error: couldn't mount because of unsupported optional features (240)
  432. EXT2-fs (mmcblk2p2): error: couldn't mount because of unsupported optional features (244)
  433. EXT4-fs (mmcblk2p2): recovery complete
  434. EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)
  435. VFS: Mounted root (ext4 filesystem) on device 179:2.
  436. devtmpfs: mounted
  437. Freeing unused kernel memory: 424K (80a64000 - 80ace000)
  438. INIT: version 2.88 booting
  439. Starting udev
  440. udevd[174]: starting version 3.1.5
  441. random: udevd urandom read with 14 bits of entropy available
  442. EXT4-fs (mmcblk2p2): re-mounted. Opts: data=ordered
  443. bootlogd: cannot allocate pseudo tty: No such file or directory
  444. ALSA: Restoring mixer settings...
  445. INIT: Entering runlevel: 5
  446. Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
  447. Starting Xserver
  448. Starting system message bus: dbus.
  449. Starting Connection Manager
  450. Starting rpcbind daemon...done.
  451. Starting bluetooth
  452. bluetoothd
  453. Starting syslogd/klogd: done
  454. * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
  455.    ...done.
  456. Starting Telephony daemon
  457. Starting Linux NFC daemon
  458. Running local boot scripts (/etc/rc.local).

  459. Poky (Yocto Project Reference Distro) 2.1.3 imx7s-warp /dev/ttymxc0

  460. imx7s-warp login: root
  461. root@imx7s-warp:~# random: nonblocking pool is initialized

  462. root@imx7s-warp:~# vi wifi.sh

  463. #!/bin/sh
  464. #WaRP7 Wi-Fi Enablement Script
  465. FILE=/lib/modules/$(uname -r)/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko
  466. if [ -f $FILE ];
  467. then
  468.         modprobe bcmdhd
  469.         ifconfig wlan0 up
  470.         echo "Enter the network name (SSID)"
  471.         read SSID
  472.         echo "Type the passphrase for the network and hit enter"
  473.         read PSW
  474.         wpa_passphrase $SSID $PSW  > /etc/wpa_supplicant.conf
  475.         cat /etc/wpasupplicant.conf
  476.         wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211 &
  477.         wait
  478.         udhcpc -i wlan0
  479.         echo "You can now use the ping command to test your connection"
  480. else
  481.         echo "bcmdhd.ko module file not found"
  482. fi
  483. ~
  484. ~
  485. ~
  486. ~
  487. ~
  488. ~
  489. ~
  490. ~
  491. ~
  492. ~
  493. ~
  494. ~
  495. ~
  496. ~
  497. ~
  498. ~
  499. ~
  500. ~
  501. ~
  502. ~
  503. ~
  504. ~
  505. ~
  506. ~
  507. ~
  508. ~
  509. ~
  510. ~
  511. ~
  512. ~
  513. ~
  514. ~
  515. ~
  516. ~
  517. ~
  518. ~
  519. ~
  520. ~
  521. ~
  522. ~
  523. ~
  524. ~
  525. ~
  526. ~
  527. ~
  528. ~
  529. ~
  530. root@imx7s-warp:~# chmod +x wifi.sh
  531. root@imx7s-warp:~# ./wifi.sh
  532. dhd_module_init in
  533. Power-up adapter 'DHD generic adapter'
  534. wifi_platform_bus_enumerate device present 1
  535. mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
  536. mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
  537. mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
  538. mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
  539. mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
  540. mmc0: queuing unknown CIS tuple 0x80 (6 bytes)
  541. mmc0: new high speed SDIO card at address 0001
  542. backlight supply power not found, using dummy regulator
  543. backlight supply power not found, using dummy regulator
  544. backlight supply power not found, using dummy regulator
  545. F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x3
  546. DHD: dongle ram size is set to 524288(orig 524288) at 0x0
  547. wifi_platform_get_mac_addr
  548. CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211)
  549. wl_create_event_handler(): thread:wl_event_handler:1be started
  550. CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0x88da143c
  551. dhd_attach(): thread:dhd_watchdog_thread:1bf started
  552. dhd_attach(): thread:dhd_dpc:1c0 started
  553. dhd_deferred_work_init: work queue initialized

  554. Dongle Host Driver, version 1.141.88 (r)
  555. Compiled from
  556. Register interface [wlan0]  MAC: 00:90:4c:11:22:33

  557. CFG80211-ERROR) wl_event_handler : was terminated
  558. wl_destroy_event_handler(): thread:wl_event_handler:1be terminated OK
  559. dhd_prot_ioctl : bus is down. we have nothing to do
  560. backlight supply power not found, using dummy regulator
  561. backlight supply power not found, using dummy regulator


  562. Dongle Host Driver, version 1.141.88 (r)
  563. Compiled from
  564. wl_android_wifi_on in
  565. mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
  566. mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
  567. mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
  568. mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
  569. F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x3
  570. DHD: dongle ram size is set to 524288(orig 524288) at 0x0
  571. dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
  572. dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
  573. wifi_platform_get_mac_addr
  574. Firmware up: op_mode=0x0005, MAC=60:f1:89:45:5c:4d
  575. Firmware version = wl0: Dec 11 2014 04:20:45 version 7.10.323.34 (r520360) FWID 01-ea2beeba
  576. dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79
  577. dhd_wlfc_init: query wlfc_mode succeed, fw_caps=0x1c
  578. dhd_wlfc_init(): wlfc_mode=0x1c, ret=0
  579. CFG80211-ERROR) wl_update_wiphybands : error reading vhtmode (-23)
  580. wl_create_event_handler(): thread:wl_event_handler:1c4 started
  581. CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0x88da143c
  582. Enter the network name (SSID)
  583. CU_5CuJ   
  584. Type the passphrase for the network and hit enter
  585. ydhfcnfx
  586. cat: can't open '/etc/wpasupplicant.conf': No such file or directory
  587. Successfully initialized wpa_supplicant
  588. rfkill: Cannot open RFKILL control device
  589. udhcpc (v1.24.1) started
  590. Sending discover...
  591. CFG80211-ERROR) wl_notify_scan_status : scan is not ready
  592. CFG80211-ERROR) wl_cfg80211_connect : Connecting with68:8a:f0:4a:64:b8 channel (1) ssid "CU_5CuJ", len (7)

  593. wl_bss_connect_done succeeded with 68:8a:f0:4a:64:b8
  594. wl_bss_connect_done succeeded with 68:8a:f0:4a:64:b8
  595. Sending discover...
  596. Sending select for 192.168.1.6...
  597. Lease of 192.168.1.6 obtained, lease time 86400
  598. /etc/udhcpc.d/50default: Adding DNS 192.168.1.1
  599. You can now use the ping command to test your connection
  600. root@imx7s-warp:~# ifconfig
  601. lo        Link encap:Local Loopback  
  602.           inet addr:127.0.0.1  Mask:255.0.0.0
  603.           inet6 addr: ::1%1995769552/128 Scope:Host
  604.           UP LOOPBACK RUNNING  MTU:65536  Metric:1
  605.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  606.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  607.           collisions:0 txqueuelen:0
  608.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  609. wlan0     Link encap:Ethernet  HWaddr 60:F1:89:45:5C:4D  
  610.           inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
  611.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  612.           RX packets:5 errors:0 dropped:0 overruns:0 frame:0
  613.           TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
  614.           collisions:0 txqueuelen:1000
  615.           RX bytes:1474 (1.4 KiB)  TX bytes:7181 (7.0 KiB)

  616. root@imx7s-warp:~#

复制代码



在pc上ping此ip地址,可以正常通讯。尝试ssh连接失败。
  Xtrinsic MPL3115A2使用一MEMS压力传感器, 带有I2C接口, 可提供精准的电压/高度和温度数据. 这一传感器为数字化输出, 使用一个高分辨率的24位模数转换器. 内部处理省去了主控MCU系统的补偿任务. 另有多个可用户编程, 电源节约, 中断和自治数据采集模式, 包括已编程的采集周期计时器和只轮询模式. 典型电源电流为40μA每测量-秒, 用于稳定的10cm输出分辨率.具体一下特点:
内部完全补偿;可编程事件;自治数据采集;分辨率降至0.1m;32个采样FIFO;可使用FIFO记录多达12天的数据
1秒到9小时数据采集速率;I2C数字输出接口;
应用领域:消费电子产品, 传感与仪器, 系统监控, 机器人。
同样有可以测试的脚本

  1. #!/bin/sh

  2. if [ -d "/sys/devices/virtual/input/input3/" ]; then
  3.   Driver="input"
  4.   echo 1 > /sys/devices/virtual/input/input3/enable
  5.   printf '\n'
  6. else
  7.   Driver="iio"
  8. fi;

  9. while [ 1 -eq 1 ] ; do
  10.   printf 'Test for MPL3115A2 (Precision Altimeter and thermometer)\n'
  11.   printf '\nPlease check the device ID (Should be 0xC4)\n'
  12.   printf '   Device ID\n'
  13.   WHO_AM_I="$(i2cget -f -y 3 0x60 0x0C)"
  14.   echo "   WHO_AM_I: ${WHO_AM_I}"
  15.   printf '\nPlease lift the board up\n'
  16.   printf "\n"
  17.   if [ "$Driver" = "input" ]; then
  18.     printf "   Pressure\n"
  19.     OUT_P_MSB="$(i2cget -f -y 3 0x60 0x01)"
  20.     OUT_P_CSB="$(i2cget -f -y 3 0x60 0x02)"
  21.     OUT_P_LSB="$(i2cget -f -y 3 0x60 0x03)"
  22.     echo "   OUT_P_MSB: ${OUT_P_MSB}"
  23.     echo "   OUT_P_CSB: ${OUT_P_CSB}"
  24.     echo "   OUT_P_LSB: ${OUT_P_LSB}"
  25.     printf "\nPlease heat the board\n"
  26.     printf "   Temperature\n"
  27.     OUT_T_MSB="$(i2cget -f -y 3 0x60 0x04)"
  28.     OUT_T_LSB="$(i2cget -f -y 3 0x60 0x05)"
  29.     echo "   OUT_T_MSB: ${OUT_T_MSB}"
  30.     echo "   OUT_T_LSB: ${OUT_T_LSB}"
  31.     usleep 300000
  32.     printf "\033[17A\033[K"
  33.   else
  34.     printf "   Pressure\n"
  35.     in_pressure_scale="$(cat /sys/bus/iio/devices/iio:device0/in_pressure_raw)"
  36.     echo "   in_pressure_scale: ${in_pressure_scale}"
  37.     printf "\nPlease heat the board\n"
  38.     printf "   Temperature\n"
  39.     in_temp_raw="$(cat /sys/bus/iio/devices/iio:device0/in_temp_raw)"
  40.     echo "   in_temp_raw: ${in_temp_raw}"
  41.     usleep 300000
  42.     printf "\033[14A\033[K"
  43.   fi;
  44. done

复制代码

在开发板上的运行结果如下:

  1. root@imx7s-warp:~# vi pml311.sh

  2. #!/bin/sh

  3. if [ -d "/sys/devices/virtual/input/input3/" ]; then
  4.   Driver="input"
  5.   echo 1 > /sys/devices/virtual/input/input3/enable
  6.   printf '\n'
  7. else
  8.   Driver="iio"
  9. fi;

  10. while [ 1 -eq 1 ] ; do
  11.   printf 'Test for MPL3115A2 (Precision Altimeter and thermometer)\n'
  12.   printf '\nPlease check the device ID (Should be 0xC4)\n'
  13.   printf '   Device ID\n'
  14.   WHO_AM_I="$(i2cget -f -y 3 0x60 0x0C)"
  15.   echo "   WHO_AM_I: ${WHO_AM_I}"
  16.   printf '\nPlease lift the board up\n'
  17.   printf "\n"
  18.   if [ "$Driver" = "input" ]; then
  19.     printf "   Pressure\n"
  20.     OUT_P_MSB="$(i2cget -f -y 3 0x60 0x01)"
  21.     OUT_P_CSB="$(i2cget -f -y 3 0x60 0x02)"
  22.     OUT_P_LSB="$(i2cget -f -y 3 0x60 0x03)"
  23.     echo "   OUT_P_MSB: ${OUT_P_MSB}"
  24.     echo "   OUT_P_CSB: ${OUT_P_CSB}"
  25.     echo "   OUT_P_LSB: ${OUT_P_LSB}"
  26.     printf "\nPlease heat the board\n"
  27.     printf "   Temperature\n"
  28.     OUT_T_MSB="$(i2cget -f -y 3 0x60 0x04)"
  29.     OUT_T_LSB="$(i2cget -f -y 3 0x60 0x05)"
  30.     echo "   OUT_T_MSB: ${OUT_T_MSB}"
  31.     echo "   OUT_T_LSB: ${OUT_T_LSB}"
  32.     usleep 300000
  33.     printf "\033[17A\033[K"
  34.   else
  35.     printf "   Pressure\n"
  36.     in_pressure_scale="$(cat /sys/bus/iio/devices/iio:device0/in_pressure_raw)"
  37.     echo "   in_pressure_scale: ${in_pressure_scale}"
  38.     printf "\nPlease heat the board\n"
  39.     printf "   Temperature\n"
  40.     in_temp_raw="$(cat /sys/bus/iio/devices/iio:device0/in_temp_raw)"
  41.     echo "   in_temp_raw: ${in_temp_raw}"
  42.     usleep 300000
  43.     printf "\033[14A\033[K"
  44.   fi;
  45. done
  46. ~
  47. ~
  48. ~
  49. ~
  50. ~
  51. ~
  52. ~
  53. ~
  54. ~
  55. ~
  56. ~
  57. ~
  58. ~
  59. ~
  60. ~
  61. ~
  62. ~
  63. ~
  64. ~
  65. ~
  66. ~
  67. root@imx7s-warp:~# chmod +x mpl3115a2.sh
  68. root@imx7s-warp:~# ./mpl3115a2.sh
  69. mpl3115 set active

  70. Test for MPL3115A2 (Precision Altimeter and thermometer)

  71. Please check the device ID (Should be 0xC4)
  72.    Device ID
  73.    WHO_AM_I: 0xc4

  74. Please lift the board up

  75.    Pressure input
  76.    OUT_P_MSB: 0x60
  77.    OUT_P_CSB: 0x9f
  78.    OUT_P_LSB: 0xe0

  79. Please heat the board
  80.    Temperature
  81.    OUT_T_MSB: 0x29
  82.    OUT_T_LSB: 0xa0
  83. ^C
  84. root@imx7s-warp:~#

复制代码

因为驱动只暴露了最简单的sys接口,只要我们搞清楚0x60是这个模块在这个开发板的iic地址,0xc4是其设备ID。0x1,0x2,0x3,0x4,0x5分别代表什么意思即可。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top