Jump to content

percu

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by percu

  1. Armbianmonitor:

    Hello,  I have problem that wireless interface only reachable when ethernet cable plugged to my orange pi zero.

    I use nmtui, to setup my WiFi connection.  All connects fine and works. But when I disconnect ethernet cable, I lost also WiFi connection.

    I see this post: https://forum.armbian.com/topic/4098-orange-pi-zero-wifi-issues-when-disconnect-ethernet-cable/

    But even after rebooting without ethernet cable, WiFi connnection doesn't work.

    Then in a new clean image, I try to run nmtui without connecting ethernet cable. WiFi connects without any errors, but doesn't work.

     

    Please, help!

    Spoiler

     This is my ifconfig -a, when ethernet cable connected:

    
    
    eth0      Link encap:Ethernet  HWaddr 76:77:5e:bc:0b:a9
              inet addr:192.168.1.66  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::7477:5eff:febc:ba9/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:6384 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4665 errors:1 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:457870 (447.1 KiB)  TX bytes:2845538 (2.7 MiB)
              Interrupt:114
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)
    
    wlan3     Link encap:Ethernet  HWaddr dc:44:6d:c9:21:66
              inet addr:192.168.1.39  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::de44:6dff:fec9:2166/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3 errors:0 dropped:0 overruns:0 frame:0
              TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:624 (624.0 B)  TX bytes:1214 (1.1 KiB)

     

    ifconfig -a without connecting eth cable you can see on photo

    photo.jpg

     

  2. Armbianmonitor:

    Hi all!

     

    I have Orange Pi One with Armbian Debian 5.8.9-sunxi on board.

    The problem is that when I catch 2 kHz square wave with OPi gpio, I have very big delta between signals.

    If I use "interrupt both endges" parameter for gpio, time between signals must be 250 microsecs. But now it floats between 200 - 290 microsecs.

    And I have achive this result after some suggestions from other forum topics: using isolcpu=3, run c program on this cpu, use max priority, disable powersaving for CPU.

    I try to read with wiringOP lib, and directly from sysfs, but still have jittering about 90 us.

    Also I think, that I have not very bad results for cyclictest:

    # cyclictest -a -t -n -p80 
    # /dev/cpu_dma_latency set to 0us
    policy: fifo: loadavg: 0.00 0.00 0.00 1/127 2335
    
    T: 0 ( 2332) P:80 I:1000 C:  32762 Min:      8 Act:   11 Avg:   12 Max:      98
    T: 1 ( 2333) P:80 I:1500 C:  21841 Min:      8 Act:   19 Avg:   11 Max:      48
    T: 2 ( 2334) P:80 I:2000 C:  16381 Min:      8 Act:    9 Avg:   12 Max:     113
    T: 3 ( 2335) P:80 I:2500 C:  13104 Min:     10 Act:   10 Avg:   10 Max:      16

    The main quieston is - does direct programming /dev/mem gpio registers helps me to decrease floating between receiving signals?

    May be other suggestions? Please, help!

    Thank you!
     

  3. Hi all!

    I try to run ./demo file, that must make diode blinks on 4 pin. But nothing happens...

    It finds correct board name (Running on a Orange Pi One), but blinking doesn't works.

    I also try simple c++ program:

     

    Spoiler
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <stdint.h>
    #include <string.h>
    #include <unistd.h>
    #include <time.h>
    
    extern "C" {
      #include <armbianio.h>
    }
    
    int main(int argc, char **argv)
    {
    int i, rc;
    const char *szBoardName;
    
    	// Initialize the library
    	rc = AIOInit();
    	if (rc == 0)
    	{
    		printf("Problem initializing ArmbianIO library\n");
    		return 0;
    	}
    	szBoardName = AIOGetBoardName();
    	printf("Running on a %s\n", szBoardName);
    	if (AIOHasButton())
      
        printf("Attempting to blink an LED on pin 4\n");
    		AIOAddGPIO(4, GPIO_OUT);
    		for (i=0; i<10; i++)
    		{
    			AIOWriteGPIO(4, 1);
    			usleep(500000);
    			AIOWriteGPIO(4, 0);
    			usleep(500000);
    		}
    
    return 0;
    }

     

    Builded without any errors,  but blinking doesn't work.

    It is very strange, because MAX7219 lib, that I also use in my c++ program works fine. But MAX7219 lib uses ArmbianIO lib!

    What's wrong? Any ideas?

     

    This is my output "gpio readall":

    Spoiler
    
    
     +------+-----+----------+------+---+OrangePiH3+---+------+----------+-----+------+
     | GPIO | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | GPIO |
     +------+-----+----------+------+---+----++----+---+------+----------+-----+------+
     |      |     |     3.3V |      |   |  1 || 2  |   |      | 5V       |     |      |
     |   12 |   0 |    SDA.0 | ALT2 | 0 |  3 || 4  |   |      | 5V       |     |      |
     |   11 |   1 |    SCL.0 | ALT2 | 0 |  5 || 6  |   |      | GND      |     |      |
     |    6 |   2 |      PA6 |  OFF | 0 |  7 || 8  | 0 | OFF  | TXD.3    | 3   | 13   |
     |      |     |      GND |      |   |  9 || 10 | 0 | OFF  | RXD.3    | 4   | 14   |
     |    1 |   5 |    RXD.2 |  OFF | 0 | 11 || 12 | 0 | OFF  | PD14     | 6   | 110  |
     |    0 |   7 |    TXD.2 |  OFF | 0 | 13 || 14 |   |      | GND      |     |      |
     |    3 |   8 |    CTS.2 |  OFF | 0 | 15 || 16 | 0 | OFF  | PC04     | 9   | 68   |
     |      |     |     3.3V |      |   | 17 || 18 | 0 | OFF  | PC07     | 10  | 71   |
     |   64 |  11 |   MOSI.0 | ALT3 | 0 | 19 || 20 |   |      | GND      |     |      |
     |   65 |  12 |   MISO.0 | ALT3 | 0 | 21 || 22 | 0 | OFF  | RTS.2    | 13  | 2    |
     |   66 |  14 |   SCLK.0 | ALT3 | 0 | 23 || 24 | 0 | ALT3 | CE.0     | 15  | 67   |
     |      |     |      GND |      |   | 25 || 26 | 0 | OFF  | PA21     | 16  | 21   |
     |   19 |  17 |    SDA.1 |  OFF | 0 | 27 || 28 | 0 | OFF  | SCL.1    | 18  | 18   |
     |    7 |  19 |     PA07 |  OFF | 0 | 29 || 30 |   |      | GND      |     |      |
     |    8 |  20 |     PA08 |  OFF | 0 | 31 || 32 | 0 | OFF  | RTS.1    | 21  | 200  |
     |    9 |  22 |     PA09 |  OFF | 0 | 33 || 34 |   |      | GND      |     |      |
     |   10 |  23 |     PA10 |  OFF | 0 | 35 || 36 | 0 | OFF  | CTS.1    | 24  | 201  |
     |   20 |  25 |     PA20 |  OFF | 0 | 37 || 38 | 0 | OFF  | TXD.1    | 26  | 198  |
     |      |     |      GND |      |   | 39 || 40 | 0 | OFF  | RXD.1    | 27  | 199  |
     +------+-----+----------+------+---+----++----+---+------+----------+-----+------+
     | GPIO | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | GPIO |
     +------+-----+----------+------+---+OrangePiH3+---+------+----------+-----+------+

     

     

    Does it means that number 4 in AIOWriteGPIO(4, 1) associates with 10 hardware pin number? Honestly I had try different pins, but AIOWriteGPIO still doesn't work.

     

  4. Sooo, it works now! Big thanks to Igor and usual user!

    What I do:

    1) Reconfigure kernel, turn on midi gadget support(https://linux-sunxi.org/USB_Gadget/MIDI) and compile it. (https://docs.armbian.com/Developer-Guide_Build-Preparation/)

    2) Turn on usbhost0 in System -> Hardware section using armbian-config.

    3) Install new kernel on my Pi ( sudo dpkg -i linux-image-current-sunxi_20.08.0-trunk_armhf.deb)

    4) sudo modeprobe g_midi

    Profit!

     

    Now I can see my midi device in device manager in Win10. It appears with name "MIDI function". 

    So one more question: how I can change this name? Or do I need to do somthing before compiling kernel?

  5. Thank you for replying!

     

    In the armbian-config -> hardware I turned on usbhost0. After rebooting, and command "modprobe g_ether", now I can see my OPi as usb COM device in windows. 

    But when I try:

    sudo modprobe g_midi

    I get error:

    modprobe: FATAL: Module g_midi not found in directory /lib/modules/4.19.57-sunxi

    Where I can get this module?

    Here I had read, that I need to reconfigure kernel.  Think that I need to use make menuconfig command in the kernel build directory. Right? But I don't have source code in /usr/src. May be it is in the other dir?

     

    4 hours ago, usual user said:

    First you need a proper devicetree setup

    I can't find any info about midi device tree configurations. May be devicetree setup have some rules to configure it?

    4 hours ago, usual user said:

    Second the USB gadget framework configuration (your prefered editor and your usual file system tools).

    Does USB gadget framework included in the Armbian? Or where I can find it?

     

    Sorry for my questions, I'm really stupid in linux.

     

  6. Hello!

    I try to turn on usb gadget mode on my OPi. For example g_ethernet, or g_midi. Read many posts, but still don't understand what I should do. Is it possible to turn on gadget mode without compiling my own armbian? Also, I had found on this forum info that legacy roms already have OTG support from the box. Is it true?

    May be somebody knows tutorials of how to turn on usb gadget mode?

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines