virtual driver

is possible to make a virtual driver ? 

Parents
  • You are ok.

    Sorry for the double ticket.  

    We have a driver that is used  for subgiga comunication . (this driver is very similar ti a zephyr ieee8702154 driver)

    Our team using zephyr have made 2 driver one for efr32fg23 and the other for stm32wl55  ( Sub giga device  ).

    We have our protocol that use a TSCH schema with and AFH like solution in wich  wi select the best subset of frequency to work. (we have at 868MHz 64 different channel. 

    We have an application layer  with the test for those devices.

    The main Idea is to try to extend the "sistem" to  2.4GHz using a bluetooth NUS. (ofcourse i have to add the AFH on ble and so on.)

    But for the moment i'm trying to make  bleDriver.c  that will have the same ieee802154_api of the  subgiga device. For the moment we don't want  to use the ieee802154 driver for 2.4G ( that will be for me the best option)

     

    from peripheral_nus


    int per_nus(void)
    {
    int err;
    //
    // printk("Sample - Bluetooth Peripheral NUS\n");
    //
    // err = bt_nus_cb_register(&nus_listener, NULL);
    // if (err) {
    // printk("Failed to register NUS callback: %d\n", err);
    // return err;
    // }
    //
    err = bt_enable(NULL);
    if (err) {
    printk("Failed to enable bluetooth: %d\n", err);
    return err;
    }
    }

    int per_nus2(void)
    {
    int err;
    err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_1, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
    if (err) {
    printk("Failed to start advertising: %d\n", err);
    return err;
    }

    printk("Initialization complete\n");

    DEVICE_DT_INST_DEFINE(0, autec_radio_init, NULL, &_autec_radio_data, &_autec_radio_config, POST_KERNEL, CONFIG_AUTEC_RADIO_INIT_PRIORITY, &autec_driver_api_radio);

      

    /**
     * @brief Function to initialize the radio driver.
     *
     * @param[in]  dev    Pointer to the device structure for the driver instance.
     *
     * @retval 0 if initialization successful
     * @retval negative error code if initialization failed
     */
     extern int per_nus(void);
    int autec_radio_efr32bg24_init(const struct device *dev)
    {
        // Map the variables
        _radio_device = (struct device *)dev;
        per_nus();
        return 0;
    }

      What i see is that the sisyem will stop here. 

  • Hi Giampiero,

    I can see that you have verified your reply. Please let us know if you have any specific questions. If you are looking to have a softperipheral as in a virtual peripheral or driver running in software, I would recommend you to take a look at the following documentation: 
    Soft peripherals — nrfxlib 3.1.0 documentation

    Best Regards,

    Samruddhi

Reply Children
No Data
Related