[Nut-upsdev] [nut] blazer_soi: blazer driver, serial port over tcp/ip (#116)
clepple at gmail.com
Sat Apr 12 12:06:23 UTC 2014
On Apr 6, 2014, at 8:43 AM, alezz wrote:
> Hi Charles,
> Thanks for reply.
> I've took a look at the code you suggested me and tested it with my device.
> That patch implements tcp connection in serial.c, this is a more
> flexible approach, as it is applicable to all serial drivers. However
> the drivers then make ioctl calls to setup the tty port, and these fail.
> At least, this is what happens to me with blazer_ser. Maybe the patch
> has not been finished?
The patch is from several years ago, so it definitely hasn't been tested much. I don't know the original driver it was intended for.
> In my patch tcp is implemented only for blazer, but it works and it was
> simple for me to write it.
> About documentation, the man pages for blazer are sufficient, except for
> the few parameters (variables) documented with "blazer_soi -h".
Again, the blazer_* drivers will be replaced with nutdrv_qx at some point, so at the very least, it would be good to take a look at that code and talk to @zykh if you have any questions. I would prefer not to add a new driver based on code that is going away.
> If the community thinks that would be useful, and we find out the best
> implementing solution, I might think about improving this feature somehow.
I CC'd the nut-upsdev list to see if anyone has opinions on how we should integrate this with other drivers. I can see it being useful, but as you pointed out, we need to gracefully handle ioctls, and there are at least some drivers where the ioctls are crucial to set or clear serial control lines.
> On 04/04/2014 14:39, Charles Lepple wrote:
>> Thanks for submitting this - it seems useful. However, the blazer
>> driver will eventually be replaced by nutdrv_qx. Rather than add this
>> code to individual drivers, what if it went into the core driver code?
>> There was an old patch which got misplaced during our move to Git. It
>> allows the "port=" option in ups.conf to take a hostname:port pair to
>> specify a TCP connection. I haven't compared the details of the code,
>> but would this work with your device?
>> Either way, we would need to provide a bit more documentation for end
>> Reply to this email directly or view it on GitHub
> Reply to this email directly or view it on GitHub:
More information about the Nut-upsdev