Everything posted by SilverNodashi
-
Looking for Linux dev to write me some code
Ok, so neither "\n" or "\r\n" worked pi@raspberrypi:~ $ vim plonkster.py ; python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a90a [] pi@raspberrypi:~ $ grep resul plonkster.py result = cmd + pack(">H", checksum) + '\n' print result.encode('hex') port.write(result) pi@raspberrypi:~ $ vim plonkster.py ; python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a90d0a ['(', 'N', 'A', 'K', 's', 's', '\r'] pi@raspberrypi:~ $ grep resul plonkster.py result = cmd + pack(">H", checksum) + '\r\n' print result.encode('hex') port.write(result) So I ran the command with strace, and noticed this: fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76fe1000 write(1, "5150494753b7a90a\n", 175150494753b7a90a ) = 17 open("/dev/ttyUSB0", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B2400 -opost -isig -icanon -echo ...}) = 0 write(3, "QPIGS\267\251\n", 8) = 8 select(4, [3], [], [], {10, 0}) = 0 (Timeout) write(1, "[]\n", 3[] ) = 3 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x76d8d180}, {0x1275a8, [], SA_RESTORER, 0x76d8d180}, 8) = 0 close(3) = 0 exit_group(0) = ? +++ exited with 0 +++ And now I'm going to bang my head against a wall somewhere for not having taken computer classes in school. Or in college... "Should have learned to program!" "Should have learned to read HEX!" "Should not have wasted time building mobile disco shit!"
-
Looking for Linux dev to write me some code
Yea, "pi" is part of the "dialouts" group. Just tried sudo to see if there were other permissions somewhere that might not get elevated properly.
-
Looking for Linux dev to write me some code
Ok, so neither "\n" or "\r\n" worked pi@raspberrypi:~ $ vim plonkster.py ; python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a90a [] pi@raspberrypi:~ $ grep resul plonkster.py result = cmd + pack(">H", checksum) + '\n' print result.encode('hex') port.write(result) pi@raspberrypi:~ $ vim plonkster.py ; python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a90d0a ['(', 'N', 'A', 'K', 's', 's', '\r'] pi@raspberrypi:~ $ grep resul plonkster.py result = cmd + pack(">H", checksum) + '\r\n' print result.encode('hex') port.write(result) So I ran the command with strace, and noticed this: fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76fe1000 write(1, "5150494753b7a90a\n", 175150494753b7a90a ) = 17 open("/dev/ttyUSB0", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B2400 -opost -isig -icanon -echo ...}) = 0 write(3, "QPIGS\267\251\n", 8) = 8 select(4, [3], [], [], {10, 0}) = 0 (Timeout) write(1, "[]\n", 3[] ) = 3 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x76d8d180}, {0x1275a8, [], SA_RESTORER, 0x76d8d180}, 8) = 0 close(3) = 0 exit_group(0) = ? +++ exited with 0 +++ And now I'm going to bang my head against a wall somewhere for not having taken computer classes in school. Or in college... "Should have learned to program!" "Should have learned to read HEX!" "Should not have wasted time building mobile disco shit!"
-
Looking for Linux dev to write me some code
Ok, so neither "\n" or "\r\n" worked pi@raspberrypi:~ $ vim plonkster.py ; python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a90a [] pi@raspberrypi:~ $ grep resul plonkster.py result = cmd + pack(">H", checksum) + '\n' print result.encode('hex') port.write(result) pi@raspberrypi:~ $ vim plonkster.py ; python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a90d0a ['(', 'N', 'A', 'K', 's', 's', '\r'] pi@raspberrypi:~ $ grep resul plonkster.py result = cmd + pack(">H", checksum) + '\r\n' print result.encode('hex') port.write(result) So I ran the command with strace, and noticed this: fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76fe1000 write(1, "5150494753b7a90a\n", 175150494753b7a90a ) = 17 open("/dev/ttyUSB0", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B2400 -opost -isig -icanon -echo ...}) = 0 write(3, "QPIGS\267\251\n", 8) = 8 select(4, [3], [], [], {10, 0}) = 0 (Timeout) write(1, "[]\n", 3[] ) = 3 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x76d8d180}, {0x1275a8, [], SA_RESTORER, 0x76d8d180}, 8) = 0 close(3) = 0 exit_group(0) = ? +++ exited with 0 +++ And now I'm going to bang my head against a wall somewhere for not having taken computer classes in school. Or in college... "Should have learned to program!" "Should have learned to read HEX!" "Should not have wasted time building mobile disco shit!"
-
Looking for Linux dev to write me some code
Ok, so I re-read this, in the morning when my mind is still fresh and used a HEX to ASCII table to get the corresponding ACII keys for the CRC, entered them, and still get the NAKss error: picocom v1.7 port is : /dev/ttyUSB0 flowcontrol : none baudrate is : 2400 parity is : none databits are : 8 escape is : C-a local echo is : yes noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv imap is : omap is : emap is : crcrlf,delbs, Terminal ready QPIGS·© (NAKss The keystrokes I entered was: "QPIGS"+"ALT+183"+"ALT+169"+"ALT+13" -> which I really do think is / was "QPIGS"+"0xB7"+"0xA9"+"0D". I also tried it without the "0D" at the end, and just pressed enter, same "NAKss" comes up. BUT when I type in "ALT+13" (i.e. hex "0D" to Ascii) I get "AKss": AKss So, is the CRC is correct? OR does it get changed somewhere on the wire? I mean, literally, on the wire between Putty -> Pi -> USB-to-serial -> Axpert Serial cable.
-
Looking for Linux dev to write me some code
I did actually say, in my first post that I am more than willing to pay. Not sure why this is brought up?
-
Looking for Linux dev to write me some code
I did actually say, in my first post that I am more than willing to pay. Not sure why this is brought up?
-
Looking for Linux dev to write me some code
Yes, you are right. I am an idiot. I ran a 30m CAT5 cable from the inverter to my workshop but didn't realize at that time that pin 6 in the cable is swapped around. Once I setup everything in the garage again, comms was fine. so I just need to cut that RJ45 jack off and put a new one on. When I get to a shop to buy one, on day.
-
Looking for Linux dev to write me some code
Yes, I figured that much as well, but can't figure out why sending commands, from RPI doesn't return any values. Here's the full picture, as it stands: - On a Windows XP PC, Wathtower works fine. This is either through the PC's serial port, using the Axpert serial cable, to the inverter's serial port, or though a USB to serial cable, connected to the Axper serial cable. (http://www.takealot.com/trendnet-usb-to-serial-converter/PLID29271821) - On my Windows 7 laptop, Watchtower and AICC works fine. My laptop doesn't have serial, so I used the serial to USB cable (http://www.takealot.com/trendnet-usb-to-serial-converter/PLID29271821) - When using the Raspberry Pi, with plonkster's code, I get the following: pi@raspberrypi:~ $ python plonkster.py /dev/ttyUSB0 QPI 515049beac [] pi@raspberrypi:~ $ python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a9 [] pi@raspberrypi:~ $ ll /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 lrwxrwxrwx 1 root root 13 Sep 7 01:17 /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 -> ../../ttyUSB0 pi@raspberrypi:~ $ sudo python plonkster.py /dev/ttyUSB0 QPIGS 5150494753b7a9 [] Feeding the commands to the inverter, using picocom, trying any method I could think of (i.e. ACII, HEX, combination of the two) didn't yield more than the "NAKss" response. This last bit tells me the inverter gets the commands, and send a response, albeit not any values I wanted to see. SO, now I'm stuck with not knowing if the USB drivers in Linux modifies the commands in a way, or whether the terminal modifies it. I'm access the Pi through SSH, so not sure if Putty messes up my key strokes or not. At this stage the only other options I have is to try a Linux PC, with a serial port and see what I get from it. Or hookup a keyboard and monitor to the Pi, in the garage and see if that helps at all.
-
Looking for Linux dev to write me some code
Tested the laptop, on the exact same cable and WatchPower works fine. So the cables and the inverter comms port is fine. So this is either a Linux issue, or a USB -> Serial issue. Will see if I can get a Linux PC going as an alternative test, or use the Raspberry Pi serial pins directly. Tomorrow, or the next day
-
Axpert MKS 5KVA Inverter - 48V
So, what exactly did you get through the diagnosis?
-
Looking for Linux dev to write me some code
Thanx I did try this, but still got no response back from the inverter. Ugh! I am beginning to think there's something wrong with the USB to serial adapter I'm using. I'll make connect a cable directly to the serial pins tomorrow and see if that works.The Axpert remove interface works fine, so the serial port in the inverter works fine as well.
-
Using a blender on solar
@The Terrible Triplett will LOVE you!
-
Ubiquity long range wireless Access Point
That would be with a different model. Ubiquity has some great products.
-
Ubiquity long range wireless Access Point
Yes the POE is included. See my post above for the figures. You can also set the TX power to a lower setting if you want to.
-
Ubiquity long range wireless Access Point
On the radio? Or consumption? According to the manual, it consumes 6W. It uses a 24V POE "brick", so the 24V guys could probably hook it up directly to a battery bank. on the wifi side, it looks like 28dBm (630nW) max.
-
Ubiquity long range wireless Access Point
Cobus, yes, you connect it to any wired router, or even a 3G router (as long as it has a LAN port) to create, or extend a wireless network.
-
Looking for Linux dev to write me some code
Yes, that is the problem I'm facing. That and the fact that I don't have a spare Windows 7 PC to plug into the inverter, in the garage. And I don't have a long piece of CAT5 lying around to make a very long cable to my office, and use my Windows 10 laptop. So I can't test all the nice Windows goodies found all over the interwebs.
-
Potential fuel crisis?
Without the grid, most cellphone sub towers, ATMS's and garages will last 2/3 days. Larger data centers, banks, malls, clinics, etc a couple of days until their gensets run empty. Those with solar plants will still operate but many external operations will come to a halt as well. So, yes, we need to worry about this.
-
Ubiquity long range wireless Access Point
Ubiquity Long Range AP is the make and model OR, perhaps UAP-LR. Look here: https://www.ubnt.com/unifi/unifi-ap/ At a 13 story building where we have a couple of these, they broadcast through 7 floors. I wanted to use this one at home, just didn't get around to installing it and see now that I don't need it anymore
-
200watt solar panels
Sorry, I can't help you with 200W panels with those specs
-
Looking for Linux dev to write me some code
And that's where I'm stuck For now, trying it with a terminal program from Linux.
-
Using a blender on solar
Yup. Our blender is only 1Kw but doesn't cause any interference on the inverter.
-
Potential fuel crisis?
People adapt. Always have, always will. I am not sure about your parts of the world, but around here many of the "have not's" already know how to get what they want, and what they need. Many folk in the townships already plant some food for themselves. They have basic lighting (no need for expensive solar systems) and basic heating sorted out. Many years ago already. In fact, I personally think it's the "have's" that will suffer most once the oil resources are no longer available. You and I, the people who rely on the internet, who rely on cellphone towers, who rely on food and clothing companies that transport a lot of nice stuff all over the country will suffer most. TinkerBoy already has a nice water reservoir setup. Mine is a bit smaller. I'm sure Chris Hobbs also has something like that already. Planting food aint that difficult either. We've been planing stuff for a couple years now, purely cause some stuff in the shops are way too expensive for my liking. The bigger problem comes with keeping a sheep / cow / pig in the yard, in the city. And then slaughtering it would be another problem. But, somehow we'll adapt there as well. Communications is a whole new problem! Why do I bring up communications? Well, if the oil resources are gone (for whatever reason), the current economy we know will suffer badly. People will loose their jobs and infrastructure will collapse. It's a ripple effect. Solar / wind energy alone won't entirely fix it. Not until someone with deep pockets have build ships, cargo planes and 60Ton truck that can reliable run / sail / fly on solar + batteries alone.
-
Linux For Blue
Doesn't the OS interface between the CPU (MCU?) and the code you would write for such a purpose? I.e. if you write in C++ / PERL / Python / etc, it shouldn't matter too much, or at all since you're not accessing direct hardware features? The compiler being used should take care of the underlying hardware, is that not so?