jefffhaynes / XBee

A .NET library for XBee wireless controllers
MIT License
40 stars 17 forks source link

GetModuleVidAsync - NullReferenceException #67

Open tmayrink opened 2 years ago

tmayrink commented 2 years ago

Hello there.

First of all, thank you all for this amazing code.

My issue here is: Why when i am trying to get the AT Command ID (GetModuleVidAsync), the code always returns NullReferenceException.

BTW, The function SetModuleVidAsync() is working fine.

Could you help me. the code is very simple and is shown below:

        XBeeController controller = new XBeeController();
        await controller.OpenAsync("COM3", 9600);
        var localNode = (XBeePro900HP) await controller.GetNodeAsync();
        var serialNumber = await  localNode.GetSerialNumberAsync();
        await localNode.SetModuleVidAsync(162);
        await localNode.WriteChangesAsync();
        ushort pan_id = await localNode.GetModuleVidAsync();