Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Battery Charger UP120AC Duo USB "PC Link"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 424

PostPosted: Sun Jul 03, 2016 6:04 pm    Post subject: Battery Charger UP120AC Duo USB "PC Link" Reply with quote

Hi all,
I have a Ultra Power UP120AC Duo, a battery charger for RC lipo batteries etc. It has a "PC Link" usb port on the side which is meant for data logging. I can't find any software which reads this and am trying to figure out how I may do this homebrew style.

dmesg provides the following:

[ 1782.892269] usb 1-1.6: new full-speed USB device number 7 using ehci-pci
[ 1782.980161] input: SILICON LABORATORIES C8051F3xx Development Board as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/0003:0000:0001.0002/input/input26
[ 1782.980240] hid-generic 0003:0000:0001.0002: input: USB HID v1.01 Device [SILICON LABORATORIES C8051F3xx Development Board] on usb-0000:00:1d.0-1.6/input0

I'm not very knowledgable about the USB interface but assumed this might have worked to get some raw data (it didn't):
$ cat /dev/ttyS0
cat: /dev/ttyS0: Input/output error

Any ideas?
Thanks,
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43012
Location: 56N 3W

PostPosted: Sun Jul 03, 2016 7:48 pm    Post subject: Reply with quote

gustafson,

It should have a USB identity in lsusb. Please post that.

It may well be a serial over USB device too. If so it will need some kernel modules and you will get something like /dev/ttyUSB0 you can read from.
Making sense of what you get is another matter.

/dev/ttyS0 is a real RS232 serial port, most PCs don't have them any more.

The C8051F3 is a general purpose Silicon Labs microcontroller. We need to know now to talk to it and haw it talks to us.
It should have a unique Vendor and Device ID programmed into it with the application code its running now. Thats what lsusb will tell us.

If you want a wild guess, I would try a Uninterruptible Power Supply monitoring program. That battery charger has a lot it common with a UPS.
I guess that the vendor would not reinvent an interface for which there are already a few standards.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 424

PostPosted: Mon Jul 04, 2016 3:19 am    Post subject: Reply with quote

NeddySeagoon, you've been at this a long time. Thanks for all your help over the years.

lsusb yields:
Code:

Bus 001 Device 005: ID 04ca:7022 Lite-On Technology Corp.
Bus 001 Device 052: ID 0000:0001
Bus 001 Device 004: ID 138a:003f Validity Sensors, Inc. VFS495 Fingerprint Reader
Bus 001 Device 003: ID 0a5c:21f1 Broadcom Corp. HP Portable Bumble Bee
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


I think it is device 052 based on a plug/unplug cycle... and am guessing that the 0000:0001 is not a useful USB id?

I looked around at kernel modules that would make sense and it seems it may be usbserial? I fairly certain I've seen /dev/ttyUSB0 before, but it is not present now. (the usbserial module is enabled, but no submenu modules seemed obviously right. I'm trying a few and will report.). I'm also upgrading from an older kernel to make sure I have a recent set of sources. Will let you know.

I've installed sys-power/nut but the path forward there isn't yet obvious... will await another tip based on the above info.

Thanks again!
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5724

PostPosted: Mon Jul 04, 2016 1:22 pm    Post subject: Reply with quote

Well the USB ID's all but useless... the kernel does see it as a HID device though, maybe you can get something useful out of the hiddev/hidraw device node?
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7693
Location: Pelotas, BR

PostPosted: Mon Jul 04, 2016 2:47 pm    Post subject: Reply with quote

C8051Fxxx means it is an 8-bit 8051 microcontroller, but you are connecting to it through a USB to PC-Link adapter, right?

Maybe this has some pointers: How to install the PC-Link reader on Linux (for debian/ubuntu, but packages must not be so different).
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum