digidotcom / xbee_ansic_library

A collection of portable ANSI C code for communicating with Digi International's XBee wireless radio modules in API mode.
204 stars 116 forks source link

In Xbee_Device.c Source file POSIX Unable to do changes #40

Closed aylashiv closed 5 months ago

aylashiv commented 5 months ago

Hi,

As I have mentioned, in my previous post, I'm using the xbee_Device.c file for some application related programming, I'm unable to perform any changes in the file, like Printing some custom prints etc, Could you help me solve the issue.

Thanks, Shiva.A

tomlogic commented 5 months ago

Can you fork the repository and push your changes to a branch so I can see what you've tried to do? Seeing your modifications to xbee_device.c will help me understand what you want to do.

Typically, you would take one or more of the existing samples and use it as a starting point for your application. You shouldn't need to modify the core components when building a typical application.

tomlogic commented 5 months ago

I want to write the Xbee Mac address of the Xbee device attached locally to the machine to a file in my Machine

If you copy xbee_dev_dump_settings() from xbee_device.c to your modified version of remote_at.c, you can use that as a starting point to a function that opens a file and writes the 8 bytes of xbee->wpan_dev.address.ieee to a file. Or use addr64_format() to format it as a human-readable string.

aylashiv commented 5 months ago

To enable some other custom prints, in other functions still that remains unsolved.

tomlogic commented 5 months ago

I'm sorry, but you'll need to figure that out on your own. You're asking for something specific to your application, and not reporting a bug or making a feature request. Maybe ask on Stack Overflow, but be prepared to provide concrete examples (perhaps with excerpts from this code) of what you're trying to do.