Changes between Version 53 and Version 54 of expansion/gw16146
- Timestamp:
- 05/30/2024 09:57:03 PM (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
expansion/gw16146
v53 v54 401 401 [=#examples] 402 402 === Configuration and Usage examples 403 1. Loading drivers: 404 a. lsusb shows GW16046 on bus with VID:0x2beb and PID=0x0146 403 404 ==== Standard Configuration 405 Steps 1 through 4 below are required for operation: 406 407 1. Set the country code (required for newer versions of the driver) (MANDATORY every boot) 408 {{{#!bash 409 iw reg set US 410 }}} 411 2. Confirm the device exists on the USB bus: 412 lsusb shows GW16046 on bus with VID:0x2beb and PID=0x0146 405 413 {{{#!bash 406 414 lsusb -d 0x2beb:0x0146 407 415 # Bus 001 Device 003: ID 2beb:0146 408 416 }}} 409 b. Load the NRC7292 driver providing the fw_name bd_name and spi_polling_interval parameters: 410 {{{#!bash 411 modprobe nrc fw_name=nrc7292_cspi.bin bd_name=nrc7292_bd.dat spi_polling_interval=5 412 }}} 413 - After several seconds you should see a new wlan device under /sys/class/net 414 c. Find the correct wlan interface that is bound to the NRC7292 driver by looking for a devices in /sys/class/net with a SPI based device-driver: 417 3. Find the correct wlan interface that is bound to the NRC7292 driver by looking for a devices in /sys/class/net with a SPI based device-driver: 415 418 {{{#!bash 416 419 WLAN="$(for i in $(ls -d /sys/class/net/wlan* 2>/dev/null); do if [ -d $i/device/driver/spi* ]; then basename $i; fi; done)" … … 418 421 # wlan0 419 422 }}} 423 4. Bring up the interface (required for configuration below) 424 {{{#!bash 425 ifconfig $WLAN up 426 }}} 427 5. Now configure wlan0 as an access point or client (station) given different examples below. 428 429 430 ==== Manual Configuration 431 432 Optional More Manual Config When Not Using Gateworks Ubuntu BSP: 433 434 1. Confirm the device exists on the USB bus: 435 lsusb shows GW16046 on bus with VID:0x2beb and PID=0x0146 436 {{{#!bash 437 lsusb -d 0x2beb:0x0146 438 # Bus 001 Device 003: ID 2beb:0146 439 }}} 440 a. Device Drivers: (this is done automatically when using the latest Gateworks Ubuntu BSP) 441 b. Load the NRC7292 driver providing the fw_name bd_name and spi_polling_interval parameters: 442 {{{#!bash 443 modprobe nrc fw_name=nrc7292_cspi.bin bd_name=nrc7292_bd.dat spi_polling_interval=5 444 }}} 445 - After several seconds you should see a new wlan device under /sys/class/net 446 c. Find the correct wlan interface that is bound to the NRC7292 driver by looking for a devices in /sys/class/net with a SPI based device-driver: 447 {{{#!bash 448 WLAN="$(for i in $(ls -d /sys/class/net/wlan* 2>/dev/null); do if [ -d $i/device/driver/spi* ]; then basename $i; fi; done)" 449 echo $WLAN 450 # wlan0 451 }}} 420 452 d. Set the country code (required for newer versions of the driver) (MANDATORY every boot) 421 453 {{{#!bash … … 427 459 }}} 428 460 429 2. Configure miscellaneous parameters via cli_app Netlink tool 430 * enable transmission power controL (TPC) 461 ==== Popular CLI_APP Configuration 462 (Optional) Configure miscellaneous parameters via cli_app Netlink tool 463 * Enable transmission power controL (TPC) 431 464 {{{#!bash 432 465 # cli_app set bdf_use on # enable transmission power control (TPC) … … 434 467 OK 435 468 }}} 436 * configure frame aggregation469 * Configure frame aggregation 437 470 {{{#!bash 438 471 # cli_app set maxagg 1 8 # configure frame aggregation … … 464 497 OK 465 498 }}} 466 * configure power calibration499 * Configure power calibration 467 500 {{{#!bash 468 501 # cli_app set cal_use on # enable power calibration … … 470 503 OK 471 504 }}} 472 - for the Command Line App usage details see [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-007-Commnad%20line%20application.pdf UG-7292-007-Command Line Application.pdf] 473 474 3. Configure AP (access point) or STA (station / client) mode: 505 - For the Command Line App usage details see [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-007-Commnad%20line%20application.pdf UG-7292-007-Command Line Application.pdf] 506 507 ==== Access Point / Client Station Examples 508 1. Configure AP (access point) or STA (station / client) mode: 475 509 * Define your channel and SSID via env variables (used in scripts below) 476 510 {{{#!bash … … 699 733 lrwxrwxrwx 1 root root 0 Aug 31 20:13 spi3 -> ../../devices/platform/soc@0/soc@0:bus@32c00000/32e50000.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.0/spi-ft232h.0/spi_master/spi3 700 734 }}} 735 1. Ensure the there is a wireless interface in /sys/class/net: 736 {{{#!bash 737 # ls /sys/class/net 738 eth0 eth1 lo wlan0 739 }}} 701 740 1. Possible regulatory domain issue: 702 741 {{{ 703 742 Because there is not country set in the target, the target asserts. As was shown below and given here again: 704 705 743 [177933905] ASSERT(0) at CheckNUpdateCHTableByVif() in umac/umac_s1g_channel.c, 1033 744 or 745 [Error] CC is 00 or 99. Skip loading BD and setting CC 746 }}} 747 It is mandatory to set the regulatory domain every boot: (example shows for USA) 748 {{{#!bash 749 iw reg set US 750 }}} 751 6. Verify the cli_app can talk to the GW16146 module: 752 {{{#!bash 753 # cli_app show version 754 Newracom Firmware Version : 01.05.00 755 gerrit/master : 69f978e 756 OK 757 758 }}} 759 7. Device sleeping 760 {{{#!bash 761 [Error] the target device cannot respond while deep sleep. 762 }}} 763 Be sure the regulatory domain is set as describe above and the interface is brought up afterwards with the following command: 764 {{{#!bash 765 ifconfig wlan0 up #assuming wlan0 is your GW16146 706 766 }}} 707 767 … … 725 785 || 4 || UART_RX || 726 786 || 5 || Ground || 727 [[Image(j1gw16146.png, 500px)]]728 729 787 [[Image(j1gw16146.png,200px)]] 788 789