Coder Social home page Coder Social logo

Comments (4)

thedeadliestcatch avatar thedeadliestcatch commented on August 17, 2024 2

This PR contains the necessary bits (except for the atbm603x specific support)

ab86bc4

       gpio clear 7
        devmem 0x100C0080 32 0x00000530

Older models (200 series) had an user reporting a different GPIO pin set:

#1460

After successful GPIO + memory register setup:

[  881.164725] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[  881.336303] [atbm_log]:Probe called -1 v1
[  881.336321] [atbm_log]:not CONFIG_USE_DMA_ADDR_BUFFER
[  881.336420] [atbm_log]:CONFIG_TX_NO_CONFIRM
[  881.336512] [atbm_log]:Allocated hw_priv @ c0b46ec0
[  881.345262] [atbm_log]:atbmwifi USB_USE_TASTLET_TXRX enable (c0b46ec0)
[  881.345271] [atbm_log]:atbmwifi USB_USE_TASTLET_TXRX enable (c0b46ec0)
[  881.345275] [atbm_log]:atbm_before_load_firmware++
[  881.345706] [atbm_log]:atbm_HwGetChipType, chipver=0x49, g_wifi_chip_type[10]

Power inputs in the module can be verified with a DMM.

from firmware.

thedeadliestcatch avatar thedeadliestcatch commented on August 17, 2024

@funkypozzy's backup contains the WiFI support:

        },
    "WlanParams": {
    "ResetGpio": [8, 3],
    "PowerGpio": [0, 7],
    "KeyCounts": 3
        }

undefined4 LibXmDvr_WlanGpioInit(int *param_1)

{
  undefined *product_params;
  undefined4 uVar1;
  
  product_params = XmDvr_JsonParser_getProductParams();
  if (param_1 == NULL) {
    uVar1 = 0xffffffff;
  }
  else {
    *param_1 = *(int *)(product_params + 0x288) + *(int *)(product_params + 0x284) * 0x10;
    param_1[1] = *(int *)(product_params + 0x290) + *(int *)(product_params + 0x28c) * 0x10;
    uVar1 = 0;
    param_1[2] = *(int *)(product_params + 0x294);
  }
  return uVar1;
}


undefined4 LibXmDvr_WlanPowerGpioLevelInit(undefined4 *param_1)

{
  undefined *puVar1;
  undefined4 uVar2;
  
  puVar1 = XmDvr_JsonParser_getProductParams();
  if (param_1 == NULL) {
    uVar2 = 0xffffffff;
  }
  else {
    uVar2 = 0;
    *param_1 = *(undefined4 *)(puVar1 + 0x298);
  }
  return uVar2;
}

The initialization is done by XmWlanDaemon:

LAB_000127d8:
        LibXmDvr_WlanGpioInit(&WlanGpio_0004328c);
        LibXmDvr_WlanPowerGpioLevelInit(&WlanPowerGpioLevel_00043298);
        printf("g_wifiState.keyShortTimes[%d], gpioPower[%#x], gpioPowerLevel[%d]\n",
               keySHortTimes_00043294,WifiGpioPower_00043290,WlanPowerGpioLevel_00043298);
        LibXmDvr_WlanTxPowerInit(&WlanTxPower_0004326c);
        if (DAT_00043670 == 0) {
          if (DAT_00043704 == '\0') {
            pthread_create(&local_308,NULL,FUN_00017534,NULL);
          }
          pthread_create(&local_300,NULL,AutoSwitchAPSTA,NULL);
          pthread_create(&local_304,NULL,CheckNetState,NULL);
          DAT_00043670 = 1;
        }
        FUN_00016048("rm /dev/random","eth2",0,1);
        FUN_00016048("ln -s /dev/urandom /dev/random","eth2",0,1);
        FUN_00016048("mkdir /var/run/hostapd -p","eth2",0,1);
        FUN_00016048("mkdir /var/run/wpa_supplicant -p","eth2",0,1);
        if (WifiType == 1) {
          system("echo \"set ps 1\" > /proc/lynx ");
        }
        bVar1 = false;
        bVar16 = false;
        local_338 = 0;
        local_330 = 0;
        iVar3 = -1;

from firmware.

funkypozzy avatar funkypozzy commented on August 17, 2024

@funkypozzy's backup contains the WiFI support:

        },
    "WlanParams": {
    "ResetGpio": [8, 3],
    "PowerGpio": [0, 7],
    "KeyCounts": 3
        }
undefined4 LibXmDvr_WlanGpioInit(int *param_1)

{
  undefined *product_params;
  undefined4 uVar1;
  
  product_params = XmDvr_JsonParser_getProductParams();
  if (param_1 == NULL) {
    uVar1 = 0xffffffff;
  }
  else {
    *param_1 = *(int *)(product_params + 0x288) + *(int *)(product_params + 0x284) * 0x10;
    param_1[1] = *(int *)(product_params + 0x290) + *(int *)(product_params + 0x28c) * 0x10;
    uVar1 = 0;
    param_1[2] = *(int *)(product_params + 0x294);
  }
  return uVar1;
}


undefined4 LibXmDvr_WlanPowerGpioLevelInit(undefined4 *param_1)

{
  undefined *puVar1;
  undefined4 uVar2;
  
  puVar1 = XmDvr_JsonParser_getProductParams();
  if (param_1 == NULL) {
    uVar2 = 0xffffffff;
  }
  else {
    uVar2 = 0;
    *param_1 = *(undefined4 *)(puVar1 + 0x298);
  }
  return uVar2;
}

The initialization is done by XmWlanDaemon:

LAB_000127d8:
        LibXmDvr_WlanGpioInit(&WlanGpio_0004328c);
        LibXmDvr_WlanPowerGpioLevelInit(&WlanPowerGpioLevel_00043298);
        printf("g_wifiState.keyShortTimes[%d], gpioPower[%#x], gpioPowerLevel[%d]\n",
               keySHortTimes_00043294,WifiGpioPower_00043290,WlanPowerGpioLevel_00043298);
        LibXmDvr_WlanTxPowerInit(&WlanTxPower_0004326c);
        if (DAT_00043670 == 0) {
          if (DAT_00043704 == '\0') {
            pthread_create(&local_308,NULL,FUN_00017534,NULL);
          }
          pthread_create(&local_300,NULL,AutoSwitchAPSTA,NULL);
          pthread_create(&local_304,NULL,CheckNetState,NULL);
          DAT_00043670 = 1;
        }
        FUN_00016048("rm /dev/random","eth2",0,1);
        FUN_00016048("ln -s /dev/urandom /dev/random","eth2",0,1);
        FUN_00016048("mkdir /var/run/hostapd -p","eth2",0,1);
        FUN_00016048("mkdir /var/run/wpa_supplicant -p","eth2",0,1);
        if (WifiType == 1) {
          system("echo \"set ps 1\" > /proc/lynx ");
        }
        bVar1 = false;
        bVar16 = false;
        local_338 = 0;
        local_330 = 0;
        iVar3 = -1;

@thedeadliestcatch Could you please make clear to me if the issue is now closed or witch further steps are needed to make this IF-SD-WIFI (ex. IPC_38x38-WIFI-if v1.02) board working? Thanks.

from firmware.

funkypozzy avatar funkypozzy commented on August 17, 2024

@Nuts-Underline @csvke @thedeadliestcatch

After the following modification to \etc\wireless\usb it works for me:
https://github.com/OpenIPC/firmware/pull/1497/files

Need also to

  1. build firmware with proper drivers for ATBM603x

  2. define the wlandev variable accordingly:
    fw_setenv wlandev IPC-38x38-WIFI-atbm603x-usb

  3. define SSID and Password
    fw_setenv wlanssid MySSID
    fw_setenv wlanpass MyPassword

In case of issue try also to run:
ifup -v wlan0
ifup -v eth0 (if you need ethernet)

from firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.