当前位置: 首页 > news >正文

rk3588s 定制版 USB adb , USB2.0与USB3.0 区别,adb 由typeC 转换到USB3.0(第二部分)

硬件资源: rk3588s 核心板+定制的地板

软件资源: 网盘上的 android12 源码

1 硬件上

客户只想使用 type c 接口中的 usb2.0 OTG 。在硬件上,甚至连 CC芯片都没有连接。

关于一些前置的知识。

1 USB2.0 与 USB3.0 的区别。

usb3.0 兼容2.0  不就是相当于 无脑 include 吗。

2 adb 如何转换到 USB3.0 的接口。

这个资源网上已经有人发了,是3399 的,但是我们有验证过,不知道真的假的,假设是正确的。

我就完全 粘贴过来,方便以后参考。

这里 他的 typec0 与 typec1 使用的都是 2lane 的usb3.0 ,不知道,座子是typec的还是USB3.0 的。

互换了 otg 与 host.

然后就 涉及到了, 修改源码,这些我就看不懂了。

直接粘贴过来。

------------------------------------------------------------------------------------------------------------------------

 diff --git a/kernel/include/linux/phy/phy.h b/kernel/include/linux/phy/phy.h
 index a3965c3..c0daa66 100644
 --- a/kernel/include/linux/phy/phy.h
 +++ b/kernel/include/linux/phy/phy.h
 @@ -36,6 +36,7 @@ enum phy_mode {
   * @power_on: powering on the phy
   * @power_off: powering off the phy
   * @set_mode: set the mode of the phy
 + * @set_vbusdet: usb disconnect of the phy
   * @reset: resetting the phy
   * @cp_test: prepare for the phy compliance test
   * @owner: the module owner containing the ops
 @@ -46,6 +47,7 @@ struct phy_ops {
         int     (*power_on)(struct phy *phy);
         int     (*power_off)(struct phy *phy);
         int     (*set_mode)(struct phy *phy, enum phy_mode mode);
 +    int (*set_vbusdet)(struct phy *phy, bool level);
         int     (*reset)(struct phy *phy);
         int     (*cp_test)(struct phy *phy);
         struct module *owner;
 @@ -133,6 +135,7 @@ int phy_exit(struct phy *phy);
  int phy_power_on(struct phy *phy);
  int phy_power_off(struct phy *phy);
  int phy_set_mode(struct phy *phy, enum phy_mode mode);
 +int phy_set_vbusdet(struct phy *phy, bool level);
  int phy_reset(struct phy *phy);
  int phy_cp_test(struct phy *phy);
  static inline int phy_get_bus_width(struct phy *phy)
 @@ -247,6 +250,13 @@ static inline int phy_set_mode(struct phy *phy, enum phy_mode mode)
         return -ENOSYS;
  }

 +static inline int phy_set_vbusdet(struct phy *phy, bool level)
 +{
 +    if (!phy)
 +        return 0;
 +    return -ENOSYS;
 +}
 +
  static inline int phy_reset(struct phy *phy)
  {
         if (!phy)

---------------------------------------------------------------------------------------------------------------------------------

 diff --git a/kernel/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/kernel/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
 index 66fb407..1f11ae1 100644
 --- a/kernel/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
 +++ b/kernel/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
 @@ -37,6 +37,8 @@
  #include <linux/usb/of.h>
  #include <linux/usb/otg.h>
  #include <linux/wakelock.h>
 +#include <linux/gpio.h>
 +#include <linux/of_gpio.h>
 
  #define BIT_WRITEABLE_SHIFT    16
  #define SCHEDULE_DELAY        (60 * HZ)
 @@ -250,6 +252,7 @@ struct rockchip_usb2phy_port {
      struct        delayed_work chg_work;
      struct        delayed_work otg_sm_work;
      struct        delayed_work sm_work;
 +    struct      delayed_work peripheral_work;
      struct        regulator *vbus;
      const struct    rockchip_usb2phy_port_cfg *port_cfg;
      struct notifier_block    event_nb;
 @@ -816,12 +819,37 @@ static int rockchip_usb2phy_set_mode(struct phy *phy, enum phy_mode mode)
      return ret;
  }
 
 +static int rockchip_usb2phy_set_vbusdet(struct phy *phy, bool level)
 +{
 +    struct rockchip_usb2phy_port *rport = phy_get_drvdata(phy);
 +    struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent);
 +    int ret = 0;
 +
 +    if (rport->port_id != USB2PHY_PORT_OTG)
 +        return ret;
 +
 +    if (rphy->phy_cfg->reg == 0xe460) {
 +        if (level)
 +        {
 +                ret = regmap_write(rphy->grf, 0x4518, GENMASK(20, 20) | 0x10);
 +        }
 +        else
 +        {
 +                ret = regmap_write(rphy->grf, 0x4518, GENMASK(20, 20) | 0x00);
 +        }
 +    }
 +
 +    return ret;
 +}
 +
 +
  static const struct phy_ops rockchip_usb2phy_ops = {
      .init        = rockchip_usb2phy_init,
      .exit        = rockchip_usb2phy_exit,
      .power_on    = rockchip_usb2phy_power_on,
      .power_off    = rockchip_usb2phy_power_off,
      .set_mode    = rockchip_usb2phy_set_mode,
 +    .set_vbusdet = rockchip_usb2phy_set_vbusdet,
      .owner        = THIS_MODULE,
  };
 
 @@ -1530,13 +1558,24 @@ static int rockchip_otg_event(struct notifier_block *nb,
      return NOTIFY_DONE;
  }
 
 +static void rockchip_usb2phy_peripheral_work(struct work_struct *work)
 +{
 +       struct rockchip_usb2phy_port *rport =
 +               container_of(work, struct rockchip_usb2phy_port, peripheral_work.work);
 +       struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
 +       extcon_set_state(rphy->edev, EXTCON_USB, true);
 +       extcon_sync(rphy->edev, EXTCON_USB);
 +       schedule_delayed_work(&rport->peripheral_work, 3 * HZ);
 +
 +}
 +
  static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
                        struct rockchip_usb2phy_port *rport,
                        struct device_node *child_np)
  {
      int ret;
      int iddig;
 -
 +    int gpio_vbus_5v;
      rport->port_id = USB2PHY_PORT_OTG;
      rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_OTG];
      rport->state = OTG_STATE_UNDEFINED;
 @@ -1584,6 +1623,32 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
          rport->vbus = NULL;
      }
 
 +
 +
 +    rport->vbus_always_on =
 +        of_property_read_bool(child_np, "rockchip,vbus-always-on");
 +    if (rport->vbus_always_on)
 +    {
 +        ret = of_get_named_gpio_flags(child_np, "vbus-5v-gpios", 0, NULL);
 +        if (ret < 0) {
 +            printk("%s() Can not read property vbus-5v-gpio\n", __FUNCTION__);
 +        } else {
 +            gpio_vbus_5v = ret;
 +            ret = devm_gpio_request(rphy->dev, gpio_vbus_5v, "vbus-gpio");
 +            if(ret < 0)
 +                printk("%s() devm_gpio_request vbus-gpio request ERROR\n", __FUNCTION__);
 +            ret = gpio_direction_output(gpio_vbus_5v,1);
 +            if(ret < 0)
 +            printk("%s() gpio_direction_output vbus-gpio set ERROR\n", __FUNCTION__);
 +        }
 +
 +        INIT_DELAYED_WORK(&rport->peripheral_work, rockchip_usb2phy_peripheral_work);
 +        schedule_delayed_work(&rport->peripheral_work, 3 * HZ);
 +
 +        goto out;
 +    }
 +
 +
      rport->mode = of_usb_get_dr_mode_by_phy(child_np, -1);
      if (rport->mode == USB_DR_MODE_HOST ||
          rport->mode == USB_DR_MODE_UNKNOWN) {
 @@ -1600,9 +1665,6 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
          goto out;
      }
 
 -    if (rport->vbus_always_on)
 -        goto out;
 -
      wake_lock_init(&rport->wakelock, WAKE_LOCK_SUSPEND, "rockchip_otg");
      INIT_DELAYED_WORK(&rport->bypass_uart_work,
                rockchip_usb_bypass_uart_work);

------------------------------------------------------------------------------------------------------------------------

 diff --git a/kernel/drivers/phy/phy-core.c b/kernel/drivers/phy/phy-core.c
 index 0587933..8dd548b 100644
 --- a/kernel/drivers/phy/phy-core.c
 +++ b/kernel/drivers/phy/phy-core.c
 @@ -387,6 +387,21 @@ int phy_cp_test(struct phy *phy)
  }
  EXPORT_SYMBOL_GPL(phy_cp_test);
 
 +int phy_set_vbusdet(struct phy *phy, bool level)
 +{
 +    int ret;
 +
 +    if (!phy || !phy->ops->set_vbusdet)
 +        return 0;
 +
 +    mutex_lock(&phy->mutex);
 +    ret = phy->ops->set_vbusdet(phy, level);
 +    mutex_unlock(&phy->mutex);
 +
 +    return ret;
 +}
 +EXPORT_SYMBOL_GPL(phy_set_vbusdet);
 +
  /**
   * _of_phy_get() - lookup and obtain a reference to a phy by phandle
   * @np: device_node for which to get the phy

------------------------------------------------------------------------------------------------------------------------------

 diff --git a/kernel/drivers/usb/dwc3/dwc3-rockchip.c b/kernel/drivers/usb/dwc3/dwc3-rockchip.c
 index 539b89a..7cf9675 100644
 --- a/kernel/drivers/usb/dwc3/dwc3-rockchip.c
 +++ b/kernel/drivers/usb/dwc3/dwc3-rockchip.c
 @@ -24,6 +24,7 @@
  #include <linux/dma-mapping.h>
  #include <linux/clk.h>
  #include <linux/clk-provider.h>
 +#include <linux/debugfs.h>
  #include <linux/of.h>
  #include <linux/of_platform.h>
  #include <linux/pm_runtime.h>
 @@ -31,6 +32,7 @@
  #include <linux/freezer.h>
  #include <linux/iopoll.h>
  #include <linux/reset.h>
 +#include <linux/uaccess.h>
  #include <linux/usb.h>
  #include <linux/usb/hcd.h>
  #include <linux/usb/ch9.h>
 @@ -47,6 +49,7 @@
  struct dwc3_rockchip {
      int            num_clocks;
      bool            connected;
 +    bool            disconnect;
      bool            skip_suspend;
      bool            suspended;
      bool            force_mode;
 @@ -56,6 +59,7 @@ struct dwc3_rockchip {
      struct device        *dev;
      struct clk        **clks;
      struct dwc3        *dwc;
 +    struct dentry        *root;
      struct reset_control    *otg_rst;
      struct extcon_dev    *edev;
      struct usb_hcd        *hcd;
 @@ -96,6 +100,7 @@ static ssize_t dwc3_mode_store(struct device *device,
      struct dwc3_rockchip    *rockchip = dev_get_drvdata(device);
      struct dwc3        *dwc = rockchip->dwc;
      enum usb_dr_mode    new_dr_mode;
 +    //char            buf[32];
 
      if (!rockchip->original_dr_mode)
          rockchip->original_dr_mode = dwc->dr_mode;
 @@ -107,15 +112,21 @@ static ssize_t dwc3_mode_store(struct device *device,
 
      if (!strncmp(buf, "0", 1) || !strncmp(buf, "otg", 3)) {
          new_dr_mode = USB_DR_MODE_OTG;
 +        phy_set_vbusdet(dwc->usb2_generic_phy, 0);
      } else if (!strncmp(buf, "1", 1) || !strncmp(buf, "host", 4)) {
          new_dr_mode = USB_DR_MODE_HOST;
 +        phy_set_vbusdet(dwc->usb2_generic_phy, 0);
      } else if (!strncmp(buf, "2", 1) || !strncmp(buf, "peripheral", 10)) {
          new_dr_mode = USB_DR_MODE_PERIPHERAL;
 +        phy_set_vbusdet(dwc->usb2_generic_phy, 1);
      } else {
          dev_info(rockchip->dev, "illegal dr_mode\n");
 +        phy_set_vbusdet(dwc->usb2_generic_phy, 0);
          return count;
      }
 
 +    msleep(200);
 +
      if (dwc->dr_mode == new_dr_mode) {
          dev_info(rockchip->dev, "Same with current dr_mode\n");
          return count;
 @@ -378,6 +389,17 @@ static void dwc3_rockchip_otg_extcon_evt_work(struct work_struct *work)
 
      mutex_lock(&rockchip->lock);
 
 +    if (extcon_get_cable_state_(edev, EXTCON_USB)) {
 +        if ((dwc->link_state == DWC3_LINK_STATE_U3) && !rockchip->disconnect) {
 +            phy_set_vbusdet(dwc->usb2_generic_phy, 0);
 +            msleep(3000);
 +            phy_set_vbusdet(dwc->usb2_generic_phy, 1);
 +            rockchip->disconnect = true;
 +        } else if(dwc->link_state == DWC3_LINK_STATE_U0) {
 +            rockchip->disconnect = false;
 +        }
 +    }
 +
      if (rockchip->force_mode ? dwc->dr_mode == USB_DR_MODE_PERIPHERAL :
          extcon_get_cable_state_(edev, EXTCON_USB)) {
          if (rockchip->connected)
 @@ -624,6 +646,7 @@ out:
 
  static int dwc3_rockchip_get_extcon_dev(struct dwc3_rockchip *rockchip)
  {
 +    //int            ret;
      struct device        *dev = rockchip->dev;
      struct extcon_dev    *edev;
 
 @@ -743,6 +766,7 @@ static int dwc3_rockchip_probe(struct platform_device *pdev)
      struct device        *dev = &pdev->dev;
      struct device_node    *np = dev->of_node, *child;
      struct platform_device    *child_pdev;
 +    //struct usb_hcd        *hcd = NULL;
 
      unsigned int        count;
      int            ret;

----------------------------------------------------------------------------------------------------------------------------

那么是不是说,我自己在3588s上, 我改过了 typec0 之后 还需要在 android 系统启动之后,再做些设置呢。

感觉很像,我改过 typec 0 之后, android得打印信息可能与这个有关。

3 adb 的时候,是主设备还是从设备。

是做为从设备。

4 adb 使用的是 usb3.0 还是usb2.0

这是不是说,在adb 的时候,既可以使用 3.0 , 也可以使用 2.0 ,是自动适应的。

2 软件上的修改。

我参考的是 3588的 地板的设计, 在3588上 USB3.0 有这种设计。

3588底板原理图如下:

3588 核心板的原理图如下。

我参考一下typeC0 的引脚。

然后来看一下 TYPEC 1 的引脚。


所以 我觉得 3588 在软件上应该也是 有相应的设置的。

题外话,这里看一个 关于 typec 与 dp的关系的配置。

3588 核心板上的这几个图说的很明白了。

我去参考一下。

对于 typec1 的配置,就有这些,因为在硬件上 把它作为一个 USB3.0+USB2.0 使用了。只是 HOSt。

但是 type c 0 的配置就有很多。

所以 在软件上 我只要 在3588S的设备数中 ,去掉 typec0 的CC芯片的配置+dwc3_0 中,配置成 HOSt模式,应该在客户的底板上也是可以接上 USB的。

接下来就是我对 3588s的设备数的配置。

编译 + 烧写,之后测试。

发现 接上 USB+鼠标都是正常的。

但是有一些不必要的打印信息:

这些个报错的原因难道说还要 在android 文件系统上做些适配吗?

当然这些报错是不影响使用的。

但是看着不好看。

目前还是可以进一步去调试的,目前 typeC 的usb2.0 作为主设备是没有问题了,但是能不能 作为一个OTG设备呢?

3 我自己的实际的测试。

-------------------------------------------------------------------------------------------------------------------------

问题: 我现在 发现 在 3588S的设备数中有一个  gpio 我控制不了。

最原始的状态。

但是实际测试 这个GPIO 是可以 用的。

总结: 也最是, 他们只配置了 gpio 子系统,没有配置 pinctrl 子系统,但是是可以用的。

我自己的问题:

如果我把  GPIO4_A5 ,换成 GPIO4_A7 的话,然后在设备数中 改了 gpio+pinctrl 的话,烧写+编译测量发现, 这个脚是没有点评的。

然后又把设备数改回去,发现一个现象。

就是,板卡只有 在插上 typec 的时候,这个脚才会有 到电平,如果不插 type c 的话, 这个脚 , 是没有高电平的。

这就是说, 这个脚 只有在检测到 插拔之后,才会由驱动 去配置 高低电平。

我知道 3588  usb3.0 是通过 typec 转换过来的, 我去对比一下 两者的设备树的区别。

电源节点是这样的。

typec 的节点是这样的。

cc芯片引用了, typec 的电源节点。

电源节点是这样的。

总结一下:  在3588 中, usb3.0 与typec 的电源节点是两个节点。并且是单独引用的。

再来看看 我的 3588S的设备数的逻辑。

可以看到也是 在CC芯片中 引用了这个电源节点,所以我之前一直配置的 gpio的配置会失效。

那么我需要在 phy 的配置中重新引入这个节点。

我的疑问: usb 适配器的驱动是如何控制 电源驱动的呢,按理说,调用了驱动就应该自动把gpio拉高的。,先不管这个问题。

资源 : 在瑞芯微的文档里 , 是有关于这个问题的说明的。

接下来我 继续去修改设备树。

首先就是去掉 关于 CC芯片的内容。

        

然后是 添加相关的内容。

首先是 GPIO的添加。

这里我先不改。

然后是 phy 节点的更改。

然后是关于 dwc节点的更改。

相关文章:

rk3588s 定制版 USB adb , USB2.0与USB3.0 区别,adb 由typeC 转换到USB3.0(第二部分)

硬件资源&#xff1a; rk3588s 核心板定制的地板 软件资源&#xff1a; 网盘上的 android12 源码 1 硬件上 客户只想使用 type c 接口中的 usb2.0 OTG 。在硬件上&#xff0c;甚至连 CC芯片都没有连接。 关于一些前置的知识。 1 USB2.0 与 USB3.0 的区别。 usb3.0 兼容2.0 …...

Cookie与Session 实现登录操作

Cookie Cookie 是网络编程中使用最广泛的一项技术&#xff0c;主要用于辨识用户身份。 客户端&#xff08;浏览器&#xff09;与网站服务端通讯的过程如下图所示&#xff1a; 从图中看&#xff0c;服务端既要返回 Cookie 给客户端&#xff0c;也要读取客户端提交的 Cookie。所…...

通过IEC104转MQTT网关轻松接入阿里云平台

随着智能电网和物联网技术的飞速发展&#xff0c;电力系统中的传统IEC 104协议设备正面临向现代化、智能化转型的迫切需求。阿里云作为全球领先的云计算服务提供商&#xff0c;其强大的物联网平台为IEC 104设备的接入与数据处理提供了强大的支持。本文将深入探讨钡铼网关在MQTT…...

lua 游戏架构 之 游戏 AI (五)ai_autofight_find_way

这段Lua脚本定义了一个名为 ai_autofight_find_way 的类&#xff0c;继承自 ai_base 类。 lua 游戏架构 之 游戏 AI &#xff08;一&#xff09;ai_base-CSDN博客文章浏览阅读238次。定义了一套接口和属性&#xff0c;可以基于这个基础类派生出具有特定行为的AI组件。例如&…...

vue3+openLayers点击标记事件

<template><!--地图--><div class"distributeMap" id"distributeMap"></div> </template> <script lang"ts" setup> import { onMounted, reactive } from "vue"; import { Feature, Map, View }…...

深入分析 Android ContentProvider (三)

文章目录 深入分析 Android ContentProvider (三)ContentProvider 的高级使用和性能优化1. 高级使用场景1.1. 数据分页加载示例&#xff1a;分页加载 1.2. 使用 Loader 实现异步加载示例&#xff1a;使用 CursorLoader 加载数据 1.3. ContentProvider 与权限管理示例&#xff1…...

养宠浮毛异味双困扰?性价比高的宠物空气净化器推荐

家里养了两只银渐层&#xff0c;谁懂啊&#xff01;一下班打开家门就看到家里飘满了猫浮毛雪&#xff0c;空气中还传来隐隐约约的异味。每天不是在吸毛的路上&#xff0c;就是在洗猫砂盆的路上&#xff0c;而且空气中的浮毛还很难清理干净&#xff0c;这是最让人头疼的问题。 …...

maven项目容器化运行之3-优雅的利用Jenkins和maven使用docker插件调用远程docker构建服务并在1Panel中运行

一.背景 在《maven项目容器化运行之1》中&#xff0c;我们开启了1Panel环境中docker构建服务给到了局域网。在《maven项目容器化运行之2》中&#xff0c;我们基本实现了maven工程创建、远程调用docker构建镜像、在1Panel选择镜像运行容器三大步骤。 但是&#xff0c;存在一个问…...

docker 打包orbbec

docker pull humble容器 sudo docker run -it osrf/ros:humble-desktop docker 启动容器 sudo docker run -u root --device/dev/bus/usb:/dev/bus/usb -it -v /home/wl:/share --name wl4 osrf/ros:humble-desktop /bin/bash新开一个终端 查看本地存在的容器&#xff1a;…...

无涯·问知财报解读,辅助更加明智的决策

财报解读就像是给公司做一次全面的体检&#xff0c;是理解公司内部运作机制和市场表现的一把钥匙&#xff0c;能够有效帮助投资者、分析师、管理层以及所有市场参与者判断一家公司的健康程度和发展潜力。 星环科技无涯问知的财经库内置了企业年报及财经类信息&#xff0c;并对…...

【Apache Doris】数据副本问题排查指南

【Apache Doris】数据副本问题排查指南 一、问题现象二、问题定位三、问题处理 本文主要分享Doris中数据副本异常的问题现象、问题定位以及如何处理此类问题。 一、问题现象 问题日志 查询报错 Failed to initialize storage reader, tablet{tablet_id}.xxx.xxx问题说明 查…...

【HarmonyOS】关于鸿蒙消息推送的心得体会(二)

【HarmonyOS】关于鸿蒙消息推送的心得体会&#xff08;二&#xff09; 前言 推送功能的开发与传统功能开发还是有很大区别。首先最大的区别点就在于需要多部门之间的协同&#xff0c;作为鸿蒙客户端开发&#xff0c;你需要和产品&#xff0c;运营&#xff0c;以及后台开发一起…...

零基础入门:创建一个简单的Python爬虫管理系统

摘要&#xff1a; 本文将手把手教你&#xff0c;从零开始构建一个简易的Python爬虫管理系统&#xff0c;无需编程基础&#xff0c;轻松掌握数据抓取技巧。通过实战演练&#xff0c;你将学会设置项目、编写基本爬虫代码、管理爬取任务与数据&#xff0c;为个人研究或企业需求奠…...

【Node.js基础04】node.js模块化

一&#xff1a;什么是模块化 在Node.js中&#xff0c;每个文件都可视为一个独立的模块。模块化提高了代码的复用性&#xff0c;按需加载&#xff0c;具有独立的作用域 二&#xff1a;如何实现多个文件间导入和导出 1 CommonJS标准&#xff08;默认&#xff09;-导入和导出 …...

数据库——单表查询

一、建立数据库mydb8_worker mysql> use mydb8_worker; 二、建立表 1.创建表 mysql> create table t_worker(department_id int(11) not null comment 部门号,-> worder_id int(11) primary key not null comment 职工号,-> worker_date date not null comment…...

dsa加训

refs: OI Wiki - OI Wiki (oi-wiki.org) 1. 枚举 POJ 2811 熄灯问题 refs : OpenJudge - 2811:熄灯问题 如果要枚举每个灯开或者不开的情况&#xff0c;总计2^30种情况&#xff0c;显然T。 不过我们可以发现&#xff1a;若第i行的某个灯亮了&#xff0c;那么有且仅有第i行和第…...

SpringBoot源码(1)ApplicationContext和BeanFactory

1、调用getBean方法 SpringBootApplication public class SpringBootDemoApplication {public static void main(String[] args) {ConfigurableApplicationContext applicationContext SpringApplication.run(SpringBootDemoApplication.class, args);applicationContext.get…...

CANoe编程实例--TCP/IP通信

1、简介 本实例将使用目前常用的开发工具C#来开发服务器端&#xff0c;以CANoe端作为客户端。服务器端和客户端&#xff0c;通过TCP/IP连接&#xff0c;实现数据交换。 首先在服务器端建立一个监听Socket&#xff0c;自动创建一个监听线程&#xff0c;随时监听是否有客户端的连…...

Neuron协议网关的北向应用插件开发

目录 概述 指令处理层开发​ 应用层开发​ .open​ .close​ .init​ .uninit​ .start​ .stop​ .setting​ .request​ 插件设置文件​ 适配华为的思路 概述 最近研究了一段时间的Neuron协议网关&#xff0c;前面的博文也提到它虽然能够把数据发到华为的IoT平台上…...

【BUG】已解决:You are using pip version 10.0.1, however version 21.3.1 is available.

You are using pip version 10.0.1, however version 21.3.1 is available. 目录 You are using pip version 10.0.1, however version 21.3.1 is available. 【常见模块错误】 【解决方案】 欢迎来到英杰社区https://bbs.csdn.net/topics/617804998 欢迎来到我的主页&#…...

electron-builder打包vue2项目不显示element-ui图标

1、使用版本 vue ^2.6.14element-ui ^2.15.14vue-cli-plugin-electron-builder 2.1.1 2、解决办法 1&#xff09; 如果是简单的图标可以使用图片代替&#xff08;这种对于elementui组件的图标还是不会显示&#xff09; 2&#xff09;在vue.config.js配置 const { defineCon…...

controller层-请求格式为json-请求方法为get

前置条件 get请求映射&#xff0c;内容和PostMapping一致&#xff0c;需要请求参数更换为get数据 请求过程&#xff1a;用户请求--初始化DispatcherServlet及对接和分发用户请求--controller--service 用户请求&#xff1a;http://ip:port/user/getinfo 请求方法&#xff1a;ge…...

【Linux】网络通信基础:应用层协议、HTTP、序列化与会话管理

文章目录 前言1. 应用层自定义协议与序列化1.1 什么是应用层&#xff1f;1.2 再谈 "协议"1.3 序列化 和 反序列化 2. HTTP 协议3. 认识 URL(统一资源定位符)4. urlencode和urldecode5. HTTP 协议请求与响应格式5.1 HTTP 请求5.2 HTTP 响应 6. HTTP 的方法6.1 GET 方法…...

@NotNull、@NotEmpty 和 @NotBlank 区别

NotNull、NotEmpty 和 NotBlank 是 Java Bean Validation (JSR 380) 规范中定义的注解&#xff0c;通常用于验证对象的属性是否满足特定的条件。这些注解常用于后端验证&#xff0c;确保接收到的数据符合预期。 NotNull 用途&#xff1a;验证一个对象是否不为null。 注意&#…...

大模型应用—大模型赋能网络爬虫

大模型赋能网络爬虫 简单来说,网页抓取就是从网站抓取数据和内容,然后将这些数据保存为XML、Excel或SQL格式。除了用于生成潜在客户、监控竞争对手和市场研究外,网页抓取工具还可以用于自动化你的数据收集过程。 借助AI网页抓取工具,可以解决手动或纯基于代码的抓取工具的…...

在 Qt 中获取 MouseMove 事件

在编写 Qt 程序时&#xff0c;我希望在鼠标移动时&#xff08;即使鼠标在另一个窗口上&#xff09;能够调用 mouseMoveEvent(QMouseEvent* event) 方法。目前&#xff0c;在我的 mainwindow.cpp 文件中&#xff0c;我有如下代码&#xff1a; void MainWindow::mouseMoveEvent(…...

自动驾驶系列—智能巡航辅助功能中的路口通行功能介绍

自动驾驶系列—智能巡航辅助功能中的车道中央保持功能介绍 自动驾驶系列—智能巡航辅助功能中的车道变换功能介绍 自动驾驶系列—智能巡航辅助功能中的横向避让功能介绍 自动驾驶系列—智能巡航辅助功能中的路口通行功能介绍 文章目录 2. 功能定义3. 功能原理4. 传感器架构5. 实…...

如何为WordPress网站设置多语言站点

随着全球化的发展&#xff0c;拥有一个支持多语言的站点已成为提升用户体验、扩大受众范围的重要手段。本文将详细介绍如何为WordPress网站设置多语言站点&#xff0c;提供两种最佳方案详解&#xff0c;帮助您轻松实现多语言站点的搭建与管理。无论您是选择在同一站点内发布多语…...

【RHCE】综合真机实验(shell完成)

目录 题目&#xff1a; 需求描述 实操 一、服务端&#xff08;servera&#xff09; 1.ip配置 2.更改主机名 3.创建本地仓库 4.DNS服务 1.下载软件包和防火墙允许 2.配置主配置文件 3.配置区域文件 1.named.exam 2.named.fangxiang 4.重启服务 5.验证结果&#x…...

【Python】成功解决conda创建虚拟环境时出现的CondaHTTPError: HTTP 000 CONNECTION FAILED错误

【Python】成功解决conda创建虚拟环境时出现的CondaHTTPError: HTTP 000 CONNECTION FAILED错误 &#x1f308; 欢迎莅临我的个人主页&#x1f448;这里是我深耕Python编程、机器学习和自然语言处理&#xff08;NLP&#xff09;领域&#xff0c;并乐于分享知识与经验的小天地&a…...