Post Go back to editing

PackRF-AD9361 Try to Run restart_modem_gui.sh

Category: Software

I tried to run restart_modem_gui.sh from the PackRF, but got the following results. I already followed the instructions in https://ez.analog.com/linux-software-drivers/f/q-a/163416/packrf-ad9361-help-to-run-the-test, but it still failed to create the devices uio0, uio1 and uio2. 

How can I generate devices uio0, uio1 and uio2?

Thank you very much.

root@analog:~/PackRF_NVGUI/tun_tap# ./restart_modem_gui.sh
192.168.23.1
255.255.255.0
10000
20000000
20000000
20000000
20000000
85.25 dB
cf-ad9361-dds-core-lpc reg 0x040 : 0x0
cf-ad9361-dds-core-lpc reg 0x040 : 0x2
cf-ad9361-dds-core-lpc reg 0x040 : 0x3
cf-ad9361-dds-core-lpc reg 0x04c : 0x3
cf-ad9361-dds-core-lpc reg 0x044 : 0x0
cf-ad9361-dds-core-lpc reg 0x048 : 0x0
cf-ad9361-dds-core-lpc reg 0x458  : 0x0
cf-ad9361-dds-core-lpc reg 0x458  : 0x0
cf-ad9361-dds-core-lpc reg 0x458  : 0x0
cf-ad9361-dds-core-lpc reg 0x458  : 0x0
cf-ad9361-dds-core-lpc reg 0x044 : 0x0
cf-ad9361-dds-core-lpc reg 0x040 : 0x0
cf-ad9361-dds-core-lpc reg 0x040 : 0x2
cf-ad9361-dds-core-lpc reg 0x040 : 0x3
cf-ad9361-dds-core-lpc reg 0x04c : 0x3
cf-ad9361-dds-core-lpc reg 0x044 : 0x0
cf-ad9361-dds-core-lpc reg 0x048 : 0x0
cf-ad9361-dds-core-lpc reg 0x458  : 0x2
cf-ad9361-dds-core-lpc reg 0x458  : 0x2
cf-ad9361-dds-core-lpc reg 0x458  : 0x2
cf-ad9361-dds-core-lpc reg 0x458  : 0x2
cf-ad9361-dds-core-lpc reg 0x044 : 0x0
0
loading filter file
1
Running TAP daemon...
   *IP address: 192.168.23.1
   *Netmask: 255.255.255.0
   *Max data rate: 156 kBps
MODEM: tx_setup: Can't open tx_dma_uio device
MODEM: Failed to setup TxTUN/TAP: Failed to setup modem: No such file or directory
Successfully initialized wpa_supplicant
ioctl[SIOCGIFFLAGS]: No such device
setsockopt: No such device
ioctl[SIOC{ADD/DEL}MULTI]: No such device
ioctl[SIOCGIFFLAGS]: No such device
driver_wired_init_common: Could not get interface flags
adi_radio: Failed to initialize driver interface
Setting the defaults
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_write: Can't open Rx modem_uio device
modem_read: Can't open Rx modem_uio device
payloadLen: 67260
All Done

  • Maybe have a look here: 

    https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/matlab_bsp_modem#hdl_capable_demos

    There is a example devicetree (DTB)

    #dtc -I dtb -O dts devicetree.dtb 

    rx_dma@7c440000 {
    compatible = "dmem-uio";
    reg = <0x7c440000 0x10000>;
    uio,number-of-dynamic-regions = <0x01>;
    uio,dynamic-regions-sizes = <0x40000>;
    };

    tx_dma@7c460000 {
    compatible = "dmem-uio";
    reg = <0x7c460000 0x10000>;
    uio,number-of-dynamic-regions = <0x01>;
    uio,dynamic-regions-sizes = <0x40000>;
    };

    -Michael

  • Hi Michael,

    Thank you for your response.

    I notice that in the devicetree file provided by 

    https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/matlab_bsp_modem#hdl_capable_demos

    the mwipcore is defined as

    mwipcore@43C00000 {
    			compatible = "dmem-uio";
    			reg = < 0x43c00000 0xffff >;
    			interrupts = < 0x00 0x37 0x00 >;
    		};

    However, in the devicetree file in Linux Image 2019_R2, the mwipcore is defined as

    mwipcore@43c00000 {
    			compatible = "mathworks,mwipcore-axi4lite-v1.00";
    			reg = < 0x43c00000 0xffff >;
    		};

    Can these two coexist in the same devicetree file?

  • I just found that if I let both mwipcore (dem-uio) and mwipcore (mathworks,mwipcore-axi4li) coexist, uio2 can not be generated. I have to keep mwipcore (dem-uio) only.

    After that and reboot, I can see uio2

    root@analog:/dev# ls -l uio*
    crw------- 1 root root 247, 0 Oct  5 10:12 uio0
    crw------- 1 root root 247, 1 Oct  5 10:12 uio1
    crw------- 1 root root 247, 2 Oct  5 10:12 uio2

    After running restart_modem_gui.sh, here are the results:

    root@analog:~/PackRF_NVGUI/tun_tap# ./restart_modem_gui.sh
    192.168.23.1
    255.255.255.0
    10000
    20000000
    20000000
    20000000
    20000000
    85.25 dB
    cf-ad9361-dds-core-lpc reg 0x040 : 0x0
    cf-ad9361-dds-core-lpc reg 0x040 : 0x2
    cf-ad9361-dds-core-lpc reg 0x040 : 0x3
    cf-ad9361-dds-core-lpc reg 0x04c : 0x3
    cf-ad9361-dds-core-lpc reg 0x044 : 0x0
    cf-ad9361-dds-core-lpc reg 0x048 : 0x0
    cf-ad9361-dds-core-lpc reg 0x458  : 0x0
    cf-ad9361-dds-core-lpc reg 0x458  : 0x0
    cf-ad9361-dds-core-lpc reg 0x458  : 0x0
    cf-ad9361-dds-core-lpc reg 0x458  : 0x0
    cf-ad9361-dds-core-lpc reg 0x044 : 0x0
    cf-ad9361-dds-core-lpc reg 0x040 : 0x0
    cf-ad9361-dds-core-lpc reg 0x040 : 0x2
    cf-ad9361-dds-core-lpc reg 0x040 : 0x3
    cf-ad9361-dds-core-lpc reg 0x04c : 0x3
    cf-ad9361-dds-core-lpc reg 0x044 : 0x0
    cf-ad9361-dds-core-lpc reg 0x048 : 0x0
    cf-ad9361-dds-core-lpc reg 0x458  : 0x2
    cf-ad9361-dds-core-lpc reg 0x458  : 0x2
    cf-ad9361-dds-core-lpc reg 0x458  : 0x2
    cf-ad9361-dds-core-lpc reg 0x458  : 0x2
    cf-ad9361-dds-core-lpc reg 0x044 : 0x0
    0
    loading filter file
    1
    Running TAP daemon...
       *IP address: 192.168.23.1
       *Netmask: 255.255.255.0
       *Max data rate: 156 kBps
    Successfully initialized wpa_supplicant
    ioctl[SIOCGIFFLAGS]: No such device
    setsockopt: No such device
    ioctl[SIOC{ADD/DEL}MULTI]: No such device
    ioctl[SIOCGIFFLAGS]: No such device
    driver_wired_init_common: Could not get interface flags
    adi_radio: Failed to initialize driver interface
    Setting the defaults
    payloadLen: 0
    All Done