Advertisement
91tech

AirPower Prototype - Terminal Output

Aug 16th, 2022 (edited)
3,296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.34 KB | Source Code | 0 0
  1. // --------- AirPower Prototype Unit - Developer Output --------- //
  2.  
  3. // --------- Compiled by 91Tech --------- //
  4. // @91_tech - https://twitter.com/91_tech - https://www.instagram.com/91_tech/ - https://www.youtube.com/91tech //
  5.  
  6. The following is the output from a 2017 AirPower prototype using 'nanocom' on MacOS Catalina and a serial lightning to USB-A cable. This unit contains 22 coils and appears to be fully functional, though it hasn't been setup to charge any device.
  7.  
  8. For any inquiries, you can contact @91_tech or @appledemoyt.
  9. Video looking at the AirPower unit: https://youtu.be/2Mb_LXJyHFw
  10.  
  11. * For the privacy of the software engineer, their name has been adjusted to "John Doe". *
  12.  
  13.  
  14. // --------- Initial Output --------- //
  15. Jun 7 2017, 17:22:52
  16.  
  17. BUILDER: John Doe (jdoe)
  18. HOSTNAME: john-J45.local
  19. GIT BRANCH: 'P2T_Factory'
  20. GIT HASH: 0aa885b (0aa885bba26749b83522037d93c5bd5629a2c85b)
  21. COMPILER: 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)
  22.  
  23. [main] Board Rev ADC: 1258 mV
  24. [main] Board ID: P2
  25. ERROR: Free air calibration data is missing
  26. WARNING: Ferrite calibration data is missing
  27. WARNING: Aluminum calibration data is missing
  28. [FPGAFWU] Booting FPGA into mode 0
  29. [FPGAFWU] FPGA v14.00 up to date with v14, no update necessary
  30. [FPGAFWU] Booting FPGA into mode 0
  31. [secureCB] Secure Control Bits already initialized, nothing to do..
  32. [secureCB] Secure Control Bits initialized
  33. NCO communication succeeded @ 1250000 Mbps
  34. FPGA PRODUCT ID = 5, VERSION = 14
  35. LSI measured to be: 39232 Hz
  36. No startup commands to run.
  37. CCG2 already up to date
  38.  
  39.  
  40.  
  41. // --------- Available Commands --------- //
  42. B431-22-P2> help
  43. Available commands:
  44. cal
  45. cpld
  46. dev
  47. fault
  48. fpga
  49. diags
  50. od
  51. inband
  52. send_comm
  53. send_comm_off
  54. ask
  55. demod
  56. get
  57. hf_rfid
  58. coils
  59. lp
  60. hist
  61. hpi
  62. i2c
  63. log
  64. nco
  65. nvs
  66. set
  67. reset
  68. spi_flash
  69. usb
  70. help
  71.  
  72.  
  73.  
  74. // --------- Using Commands --------- //
  75. Commands are shown in order of appearance on the 'help' command. Note some commands were not tried due to risk of bricking or erasing the AirPower device. Anything deemed safe was attempted and is available here.
  76.  
  77. Note that some outputs link to external pastebins as they are too long (& mainly redundant) for this document.
  78.  
  79. If [command + 'help'] is not shown, it is because there is no given output. Generally this will give us the sub-prompts, but in some cases there are none.
  80.  
  81. Some commands also seemingly do nothing. These will still be shown with the output reading "[no output]".
  82.  
  83.  
  84.  
  85. // --------- CALIBRATION --------- //
  86. B431-22-P2> cal help
  87. Available commands:
  88. air
  89. ferrite
  90. aluminum
  91. erase
  92. help
  93.  
  94. -- CAL Commands - https://pastebin.com/yYF4G18n --
  95. Upon running calibration commands for 'air', 'ferrite' and aluminum', the errors seen upon boot & reset disappeared. Updated output can be found on the calibration document.
  96.  
  97. * Command 'erase' was not tried, though it can be assumed that it erases the calibration data. *
  98.  
  99.  
  100.  
  101. // --------- CPLD --------- //
  102. B431-22-P2> cpld help
  103. Available commands:
  104. read
  105. reset
  106. write
  107. invert
  108. help
  109.  
  110. B431-22-P2> cpld read
  111. [CPLDControl] Read @ 0x0000 (1):
  112. 00
  113. B431-22-P2> cpld read 1
  114. [CPLDControl] Read @ 0x0001 (1):
  115. 00
  116. B431-22-P2> cpld read 91
  117. [CPLDControl] Read @ 0x005b (1):
  118. F0
  119. B431-22-P2> cpld invert
  120. coil 0 ouput is inverted
  121. B431-22-P2> cpld invert
  122. coil 0 ouput is non-inverted
  123.  
  124. -- CPLD stands for 'Complex Programmable Logic Device' --
  125. https://en.wikipedia.org/wiki/Complex_programmable_logic_device
  126.  
  127. * Command 'reset' and 'write' were not tried. Using 'reset' likely would've reset the data read at the given parameter- note 'read 1', 'read 91' and so on- whereas 'write 1 00' likely would write '00' at 0x0000, judging by the formatting. *
  128.  
  129.  
  130.  
  131. // --------- DEV --------- //
  132. B431-22-P2> dev help
  133. Available commands:
  134. ping
  135. test
  136. help
  137. B431-22-P2> dev ping
  138. [No output]
  139. B431-22-P2> dev test
  140. [No output]
  141.  
  142. * We do not know what 'dev' actually does, as no output is given. It likely needs to be used in conjunction with another command, and is either short for 'developer/development' or 'device'. *
  143.  
  144.  
  145.  
  146. // --------- FAULT --------- //
  147. B431-22-P2> fault
  148.  
  149. *** BUS FAULT ***
  150.  
  151. CPU Registers:
  152. R0: 0xdeadbeef R1: 0x30000000 R2: 0x00000000
  153. R3: 0x0803e92d R12: 0x00000000 LR: 0x080319fb
  154. PC: 0x080319fa PSR: 0x21000000
  155. SCB Registers:
  156. SHCSR: 0x00070002
  157. CFSR: 0x00000400
  158. HFSR: 0x00000000
  159. DFSR: 0x00000000
  160. BFAR: 0xe000ed38
  161. AFSR: 0x00000000
  162.  
  163. -- 'fault' crashes the device, to the point it needs to be manually unplugged and plugged back in to work again. The initial output is unchanged. --
  164.  
  165. * 'fault help' gives the same result as 'fault', so any argument is ignored (or in other words, as soon as AirPower sees 'fault', it freezes up regardless of what comes next.) *
  166.  
  167.  
  168.  
  169. // --------- FPGA --------- //
  170. B431-22-P2> fpga help
  171. [FPGAFWU] Unsupported Command
  172.  
  173. -- A field-programmable gate array is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence the term field-programmable. --
  174. https://en.wikipedia.org/wiki/Field-programmable_gate_array
  175.  
  176. * It is unknown what this command does. FPGA is referenced in the initial output and 'log', and is a sub-prompt under 'inband'. *
  177.  
  178.  
  179.  
  180. // --------- DIAGS --------- //
  181. B431-22-P2> diags help
  182. Available commands:
  183. auth
  184. scb
  185. tristar
  186. get
  187. set
  188. od
  189. lpd
  190. rfid
  191. toggle
  192. brick
  193. nvm
  194. protection
  195. rx_dev_cal
  196. help
  197.  
  198. --- DIAGS AUTH ---
  199. B431-22-P2> diags auth help
  200. Available commands:
  201. ver
  202. status
  203. cert
  204. help
  205.  
  206. B431-22-P2> diags auth ver
  207. ERROR: unable to read version register
  208. B431-22-P2> diags auth status
  209. ERROR: auth self test failed
  210. B431-22-P2> diags auth cert
  211. Failed to read Certificate size
  212.  
  213. --- DIAGS GET ---
  214. B431-22-P2> diags get help
  215. Available commands:
  216. fgsn
  217. mlbsn
  218. ccasn
  219. tmp103
  220. crit
  221. help
  222.  
  223. B431-22-P2> diags get fgsn
  224. <not set>
  225. B431-22-P2> diags get mlbsn
  226. FYW724600A0HXDDDP
  227. B431-22-P2> diags get ccasn
  228. FYX724302KUJ31X1D
  229.  
  230. B431-22-P2> diags get tmp103
  231. [i2c] [0xe0] 23 C
  232. [i2c] [0xe1] 23 C
  233. [i2c] [0xe2] 24 C
  234. [i2c] [0xe3] 24 C
  235. [i2c] [0xe4] 23 C
  236.  
  237. B431-22-P2> diags get crit
  238. Current Timestamp: 787791
  239. Error Flags:
  240. OTP: false [0]
  241. OCP: false [0] [ 0 0 0 0 0 0 0 0 ]
  242. OVP: false [0]
  243. UVP: false [0]
  244.  
  245. --- DIAGS OD ---
  246. B431-22-P2> diags od help
  247. coil=0, freq=161326.5152, inductance=2.4331, impedance=0.2058, q_factor=11.9817, isLinear=TRUE
  248.  
  249. B431-22-P2> diags od 0
  250. coil=0, freq=104350.3488, inductance=5.8155, impedance=0.6216, q_factor=6.1339, isLinear=FALSE
  251. B431-22-P2> diags od 1
  252. coil=1, freq=52362.8864, inductance=18.1785, impedance=0.3792, q_factor=15.7689, isLinear=FALSE
  253. B431-22-P2> diags od 2
  254. coil=2, freq=100610.7136, inductance=5.3907, impedance=0.8734, q_factor=3.9014, isLinear=FALSE
  255.  
  256. --- DIAGS NVM ---
  257. B431-22-P2> diags nvm dump
  258. 0x08004000: ffffffff ffffffff ffffffff ffffffff
  259. -- Full output: https://pastebin.com/A2hu4XxN --
  260.  
  261. -- REST OF DIAGS --
  262. B431-22-P2> diags set help
  263. Available commands:
  264. fgsn
  265. mlbsn
  266. ccasn
  267. help
  268.  
  269. * Did not attempt 'set' commands *
  270.  
  271. B431-22-P2> diags lpd help
  272. Available commands:
  273. clock
  274. sleep
  275. run
  276. transient
  277. start
  278. sample
  279. scan
  280. PWM_on
  281. PWM_off
  282. baseline
  283. get_baselines
  284. threshold
  285. fatp
  286. help
  287.  
  288. B431-22-P2> diags rfid help
  289. Available commands:
  290. baseline
  291. get_baselines
  292. ramp
  293. scan
  294. fct
  295. set_frequency
  296. help
  297.  
  298. * 'lpd' and 'rfid' return the same outputs as their commands without 'diags' *
  299.  
  300. // --------- OD --------- //
  301. B431-22-P2> od
  302. [no output]
  303.  
  304. -- 'od' is a command on various operating systems for displaying ("dumping") data in various human-readable output formats. The name is an acronym for "octal dump" since it defaults to printing in the octal data format. --
  305. https://en.wikipedia.org/wiki/Od_(Unix)
  306.  
  307. * no output is ever given, regardless of 'help' or any attempted argument. 'diags od' however (as seen above) returns actual output. *
  308.  
  309.  
  310.  
  311. // --------- INBAND --------- //
  312. B431-22-P2> inband help
  313. Available commands:
  314. ping_pong
  315. read_rx
  316. ping_response
  317. fpga_ping_pong
  318. send_fsk
  319. stop_fsk
  320. fsk_dma_debug
  321. fpga_init
  322. fpga_enable
  323. fpga_disable
  324. fpga_go
  325. fpga_reset
  326. fpga_gain_control
  327. fpga_read_reset
  328. fpga_read
  329. fpga_delay
  330. help
  331.  
  332.  
  333.  
  334. // --------- SEND_COMM --------- //
  335. B431-22-P2> send_comm help
  336. invalid parameter
  337. send_comm [coil 1] [coil 2] [fsk_data] [power duty cycle] [duty cycle adjustment for comm] [power frequency] [fsk frequency] [delay in between packets] [repeat count] [bit rate]
  338.  
  339.  
  340.  
  341. // --------- SEND_COMM_OFF --------- //
  342. B431-22-P2> send_comm_off help
  343. Invalid coil 0, or associated timer has been turned off
  344.  
  345.  
  346.  
  347. // --------- ASK --------- //
  348. B431-22-P2> ask help
  349. demod = 1
  350. B431-22-P2> ask 0
  351. demod = 1
  352. B431-22-P2> ask 91
  353. 00:16:33.798 ### [ASSERT] inband_comm.c:1718 "enableASKComm", "coil != NULL"
  354. invalid parameter
  355. Usage: ask [coil number] [on/off] [demod number] [timeout]
  356.  
  357. * AFTER USING 'demod on 1 0' AS SEEN BELOW: *
  358. B431-22-P2> ask 0 on 1 0
  359. demod = 1
  360. CPLD channels all used up, use ask off to free up channels
  361. B431-22-P2> ask off
  362. demod = 1
  363. CPLD channels all used up, use ask off to free up channels
  364. B431-22-P2> ask 0 off 1 0
  365. demod = 1
  366.  
  367.  
  368.  
  369. // --------- DEMOD --------- //
  370. B431-22-P2> demod help
  371. usage: demod [on/off] [demod #] [mux #]
  372. B431-22-P2> demod
  373. usage: demod [on/off] [demod #] [mux #]
  374. B431-22-P2> demod on 1 0
  375. 00:17:36.789 ### [ASSERT] MuxDriver.c:441 "EnableDemodMuxWithIndex", "(muxNumber >= 1) && (muxNumber <= kNumberOfMuxesPerGroup)"
  376.  
  377. * Note interactions with the 'ask' command as seen above. *
  378.  
  379. B431-22-P2> demod on 1 1
  380. [no output]
  381. B431-22-P2> demod off 1 1
  382. [no output]
  383.  
  384.  
  385.  
  386. // --------- GET --------- //
  387. B431-22-P2> get help
  388. Available commands:
  389. versions
  390. cs
  391. dev
  392. mcu_fw
  393. timer
  394. timers
  395. coil
  396. coils
  397. gpios
  398. sensors
  399. stats
  400. udid
  401. otp
  402. ver
  403. startup_cmds
  404. deadtime_phase_shift
  405. deadtime_force
  406. notch_filter
  407. help
  408.  
  409. -- GET Commands - https://pastebin.com/Swq3aQf9 --
  410.  
  411.  
  412.  
  413. // --------- HF_RFID --------- //
  414. B431-22-P2> hf_rfid help
  415. Available commands:
  416. baseline
  417. get_baselines
  418. ramp
  419. scan
  420. fct
  421. set_frequency
  422. help
  423.  
  424. -- HF_RFID Commands - https://pastebin.com/vETSYvbi --
  425.  
  426. * Command 'set_frequency' was not attempted. *
  427.  
  428.  
  429.  
  430. // --------- COILS --------- //
  431. B431-22-P2> coils help
  432. Available commands:
  433. select
  434. help
  435.  
  436. B431-22-P2> coils select
  437. select should have 1 parameter!
  438. B431-22-P2> coils select 0
  439. coil 0 selected.
  440. B431-22-P2> coils select 1
  441. coil 1 selected.
  442. B431-22-P2> coils select 21
  443. coil 21 selected.
  444. B431-22-P2> coils select 22
  445. coil 22 is out of range.
  446. B431-22-P2> coils select 91
  447. coil 91 is out of range.
  448.  
  449. -- Individual coils can be selected, but it is unknown if there is a command that works in conjunction with this. However, it does allow us to see there are definitely 22 coils, going from [0-21]. Anything else is 'out of range'. --
  450.  
  451.  
  452.  
  453. // --------- LP --------- //
  454. B431-22-P2> lp help
  455. Available commands:
  456. clock
  457. sleep
  458. run
  459. transient
  460. start
  461. sample
  462. scan
  463. PWM_on
  464. PWM_off
  465. baseline
  466. get_baselines
  467. threshold
  468. fatp
  469. help
  470.  
  471. -- LP Commands - https://pastebin.com/MNyNNEyY --
  472.  
  473.  
  474.  
  475. // --------- HIST --------- //
  476. B431-22-P2> hist
  477. [1]: help
  478. [2]: get ver
  479. [3]: hist
  480.  
  481. -- 'hist', standing for "history", simply returns the commands used in the current session since the last reset --
  482.  
  483.  
  484.  
  485. // --------- HPI --------- //
  486. B431-22-P2> hpi help
  487. Available commands:
  488. fw_read
  489. fw_write
  490. get
  491. pd_status
  492. select_pdo
  493. reset_state_machine
  494. ver
  495. help
  496.  
  497. -- HPI Commands - https://pastebin.com/KmQmsuCg --
  498.  
  499.  
  500.  
  501. // --------- I2C --------- //
  502. B431-22-P2> i2c help
  503. invalid command 'help'
  504.  
  505.  
  506.  
  507. // --------- LOG --------- //
  508. B431-22-P2> log help
  509. [no output]
  510. B431-22-P2> log
  511. 00:00:51.814 === LogUtils ===
  512. brick L=info O1=console O1L= O2= O2L=
  513. device L=verbose O1=console O1L= O2= O2L=
  514. FPGAFWU L=info O1=console O1L= O2= O2L=
  515. hpi L=info O1=console O1L= O2= O2L=
  516. i2c L=info O1=console O1L= O2= O2L=
  517. main L=info O1=console O1L= O2= O2L=
  518. mux L=error O1=console O1L= O2= O2L=
  519. nco L=info O1=console O1L= O2= O2L=
  520. od L=error O1=console O1L= O2= O2L=
  521. secureCB L=info O1=console O1L= O2= O2L=
  522. tristar L=info O1=console O1L= O2= O2L=
  523. usb L=info O1=console O1L= O2= O2L=
  524.  
  525. * it is unknown if 'log' works in conjunction with any other command *
  526.  
  527.  
  528.  
  529. // --------- NCO --------- //
  530. B431-22-P2> nco help
  531. Available commands:
  532. init
  533. ver
  534. cmd
  535. fwup
  536. fwdn
  537.  
  538. B431-22-P2> nco init
  539. NCO USART (re)initialized @ 0 baud.
  540. B431-22-P2> nco ver
  541. NCO version: 01.03.0002
  542. B431-22-P2> nco cmd
  543. nco_wait_for_response timed out!
  544. B431-22-P2> nco fwup
  545. [no output]
  546. B431-22-P2> nco fwdn
  547. [no output]
  548. B431-22-P2> nco ver
  549. nco_wait_for_response timed out!
  550. NCO version: 231.14.0016
  551.  
  552. -- A numerically-controlled oscillator (NCO) is a digital signal generator which creates a synchronous (i.e. clocked), discrete-time, discrete-valued representation of a waveform, usually sinusoidal. --
  553. https://en.wikipedia.org/wiki/Numerically-controlled_oscillator.
  554.  
  555. * Note the 'nco ver' gave different outputs between trying commands. *
  556.  
  557.  
  558.  
  559. // --------- NVS --------- //
  560. B431-22-P2> nvs help
  561. Available commands:
  562. read { type }
  563. write { type } { ... }
  564. dump { length }
  565. erase
  566.  
  567. B431-22-P2> nvs dump
  568. [nvs] [0x000f0000] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
  569. -- Output was large but all looks the same: https://pastebin.com/Bd9Fjn5j --
  570.  
  571.  
  572.  
  573. // --------- SET --------- //
  574. B431-22-P2> set help
  575. Available commands:
  576. timer
  577. deadtime_phase_shift
  578. coil
  579. ramp
  580. show_adc
  581. dev
  582. otp
  583. startup_cmds
  584. gpio
  585. notch_filter
  586. help
  587.  
  588. * Didn't try 'set' commands to stay on the safe side. *
  589.  
  590.  
  591.  
  592. // --------- RESET --------- //
  593. B431-22-P2> reset
  594. resetting the board ...
  595.  
  596.  
  597. B431-22-P2 firmware version = 01090014
  598. Jun 7 2017, 17:22:52
  599.  
  600. BUILDER: John Doe (jdoe)
  601. HOSTNAME: john-J45.local
  602. GIT BRANCH: 'P2T_Factory'
  603. GIT HASH: 0aa885b (0aa885bba26749b83522037d93c5bd5629a2c85b)
  604. COMPILER: 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)
  605.  
  606. [main] Board Rev ADC: 1257 mV
  607. [main] Board ID: P2
  608. ERROR: Free air calibration data is missing
  609. WARNING: Ferrite calibration data is missing
  610. WARNING: Aluminum calibration data is missing
  611. [FPGAFWU] Booting FPGA into mode 0
  612. [FPGAFWU] FPGA v14.00 up to date with v14, no update necessary
  613. [FPGAFWU] Booting FPGA into mode 0
  614. [secureCB] Secure Control Bits already initialized, nothing to do..
  615. [secureCB] Secure Control Bits initialized
  616. NCO communication succeeded @ 1250000 Mbps
  617. FPGA PRODUCT ID = 5, VERSION = 14
  618. LSI measured to be: 39320 Hz
  619. No startup commands to run.
  620. CCG2 already up to date
  621.  
  622. -- 'reset' reboots the device, and the initial output is given again. --
  623.  
  624.  
  625.  
  626. // --------- SPI_FLASH --------- //
  627. B431-22-P2> spi_flash help
  628. Available commands:
  629. device_id
  630. jedec_id
  631. status
  632. chip_erase
  633. read
  634. write_byte
  635.  
  636. B431-22-P2> spi_flash device_id
  637. manufacturer: 0xef
  638. device id: 0x13
  639.  
  640. B431-22-P2> spi_flash jedec_id
  641. manufacturer: 0xef
  642. memory type: 0x40
  643. capacity: 0x14
  644.  
  645. B431-22-P2> spi_flash status
  646. status: 0
  647.  
  648. B431-22-P2> spi_flash read
  649. *** BUS FAULT ***
  650.  
  651. CPU Registers:
  652. R0: 0x00000000 R1: 0x00000000 R2: 0x00000000
  653. R3: 0x10000e8c R12: 0x01000000 LR: 0x00000001
  654. PC: 0x08047000 PSR: 0x61000200
  655. SCB Registers:
  656. SHCSR: 0x00070002
  657. CFSR: 0x00008200
  658. HFSR: 0x00000000
  659. DFSR: 0x00000000
  660. BFAR: 0x01000000
  661. AFSR: 0x00000000
  662.  
  663. * 'spi_flash read' caused the unit to crash, likely due to the lack of parameter. It had to be unplugged/plugged in manually to be reset. *
  664.  
  665. B431-22-P2> spi_flash read 0
  666. 0 < length <= 1048576
  667. B431-22-P2> spi_flash read 1
  668. 0 < length <= 1048576
  669. B431-22-P2> spi_flash read 1048576
  670. 0 < length <= 1048576
  671. * 'spi_flash read' didn't seem to care about the parameter input, it wouldn't return anything. *
  672.  
  673. -- Due to concerns about overwriting data, no other commands were attempted. --
  674.  
  675.  
  676.  
  677. // --------- USB --------- //
  678. B431-22-P2> usb help
  679. Available commands:
  680. dfu
  681. test
  682. help
  683.  
  684. B431-22-P2> usb dfu
  685. entered USB DFU mode
  686.  
  687. B431-22-P2> usb test
  688. .........................B431-22-P2>
  689.  
  690. -- Upon trying 'usb test', each '.' popped up one at a time slowly until it was finished. It was likely testing the USB connection though there was no output. --
  691.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement