Connecting a Growatt Inverter to ShineNet

[Previously, on randomnoun]. This post is a followup from my earlier entry on the trials and tribulations of getting solar panels hooked up to my house in Red Hill.

So I thought it would be interesting to graph my solar energy using ShineNet, a defunct software package created by Growatt, the manufacturers of the inverter that sits on the side of the house, connecting the panels to my newly-upgraded switchboard.

There’s not much in the way of instructions on how to do this on the internet, so here’s how to set it up. What you’ll need in order to do this is:

things + things + things = graphs
things + things + things = graphs

In the images to the left, the

icon-db9-male icon indicates a Male DB9 connector,

icon-db9-female indicate Female DB9,

icon-null-modem indicates a null modem or cross-over connection, and

icon-straight-through indicate extension or straight-through connections,

icon-usb represents USB, and

icon-bluetooth represents Bluetooth.


Drivers

If you’re anything like me, your Windows XP laptop (and it has to be Windows XP), is in that sweet spot between being too old to have bluetooth, and too young to have actual physical COM ports, in which case you’ll need to grab a couple of usb adapters to provide those things. Get the cheapest ones you can find from ebay [1], and then be amazed when they’re not recognised automatically when you plug them in.

I got these devices:

Neither of these so-called XP-compatible devices come with drivers, so what I did eventually was to install an old trial version of the BlueSoleil bluetooth stack (limited to 5MB data transfer), and the driver for the HL-340 chipset serial adapter from some random website (after finding some instructions on this forum post).

You may find the usbview utility from FTDI helpful when scouring websites looking for anything vaguely useful. (usbview gives you the Vendor:Product IDs of all USB devices attached to your system; the devices above for me were listed as 1A86:7523 and 0A12:0001) .

Once you do that, go into Device Manager and take note of the COM port assigned to the Bluetooth and DB9 USB adapters. On my laptop, the wired DB9 adapter is attached to COM24, and the wireless BT adapter takes up COM ports 11 to 23.

You might want to pair up a bluetooth device that you know works, just to prove that the device driver is functioning correctly. I used some headphones.

Bluetooth USB device in usbview

DB9 USB device in usb view

BlueSoleil after detecting a bluetooth device

Device manager showing BlueSoleil COM ports and DB9 USB COM ports

From top left, Bluetooth USB device in usbview; DB9 USB device in usbview; BlueSoleil after detecting a bluetooth device; Device Manager showing BlueSoleil COM ports and DB9 USB COM ports. Click to zoom.

ShineNet

ShineNet is the truly awful software package created by Growatt to track solar energy collection from the array of PV cells on your roof. So awful, in fact, that they’re no longer providing it via their website, and any requests to their eight different contact email addresses will fail to get a response from them. What you might want to try doing is sending pleading emails every week or so to people who mention that they’ve installed ShineNet on the solar software section of the whirlpool forum, and hope that someone responds.

(Four Weeks Later…)

There are two types of ShineNet in the world, v1 and v2. This link will give you v1.2, which for the purposes of this entry is actually v1.

Here’s a comparison table, bearing in mind that I haven’t actually tried v2 yet:

Version ShineNet v1 ShineNet v2
RS232 Protocol Proprietary modbus
Operating System Windows XP Windows XP
Software Quality Crap [2] Probably crap
Persistence ? HyperSQL (HSQL) (info)
Inverter COM port
setting
Anything other than ‘MOVE
(e.g. ‘COM1‘)
MOVE

Yes, there are other software packages that profess to comprehend modbus (used by v2) and the proprietary protocol that v1 uses, but I thought it would be slightly less time consuming to use the software made by the manufacturer of the inverter first, before hooking up something with more bells and whistles (controlled by DMX, I’d imagine).

Configuration 1

Inverter -> DB9 extension cable -> USB to DB9 adapter -> laptop -> ShineNet
Configuration 1: Inverter -> DB9 extension cable -> USB to DB9 adapter -> laptop -> ShineNet

This was the ‘simplest possible thing that could work’ configuration I thought I’d try first.

Unscrew the coverplate on the bottom of the inverter, plug in a cable, and throw that through the closest window. Whilst your outside, knock on your inverter a few times to set the COM port to anything other than the default “MOVE” setting (e.g. “COM1“).

On my inverter, they were too cheap to put two actual buttons on the thing, so you navigate the LCD menu by knocking once to change menu items and knocking twice to select things. I suppose I shouldn’t knock it, it works. Luckily I come from the school of hard knocks. It’s not as if this thing is on Fort Knox. That’s the last knock-knock joke. Etc.

Go back inside and attach the cable to the USB->COM DB9 adapter connected to your laptop.

Fire up ShineNet, from the main menu select SoftSystem -> System Set, set the COM port to the value shown in Device Manager for your USB->COM DB9 adapter and click Set.

ShineNet SystemSet dialog box set to COM24
ShineNet SystemSet dialog box set to COM24

From the main menu again, select Inverter -> Connect/Disconnect, and with any luck you’ll eventually get this:

The aesthetically-challenged ShineNet application, and a close-up of the garish chart showing energy production this morning.
The aesthetically-challenged ShineNet application, and a close-up of the garish chart showing energy production this morning.

It will probably help if you do this during the day, otherwise your inverter will probably be in shutdown mode due to the lack of photons in the air.

In an ideal world, you wouldn’t have a cable permanently hanging outside of your house, so let’s try running this over bluetooth.

Configuration 2

This configuration is just to verify that the Bluetooth to DB9 adapter works. For this configuration, the adapter is being powered by an external power source (using the mini-USB port on the side of the adapter)

Bluetooth to DB9  adapter -> USB to DB9 adapter -> laptop -> HyperTerminal (COM24); Bluetooth to USB adapter -> laptop -> BlueSoleil (COM11) -> HyperTerminal (COM11)
Configuration 2: Bluetooth to DB9 adapter -> USB to DB9 adapter -> laptop -> HyperTerminal (COM24)
Second row: Bluetooth to USB adapter -> laptop -> BlueSoleil (COM11) -> HyperTerminal (COM11)

What I’m attempting to do here is to transfer data over the air between the two bluetooth devices which are now plugged into the same laptop (if your laptop was made in the last 5 years, you probably have bluetooth built in, and don’t need the second adapter above). It may be easier to use a separate laptop to connect to, if you’ve got access to one.

On the DB9 to Bluetooth adapter check the settings on the casing to ensure that they’re in this position:

The DB9 to Bluetooth adapter
The DB9 to Bluetooth adapter
  • DCE(F) / DTE toggle switch is in DCE(F) mode
  • the S / M dip switch is pointing to M
  • the N/G / G dip switch is pointing to G
  • the USB/Battery / DB9-Pin9(5V) toggle switch is pointing to USB/Battery (and you’ve got the adapter powered by a mini-USB cable). If it’s powered up, there should be some red and blue lights flashing on the thing.


Bring up two HyperTerminal windows (you’re on XP, so you still have HyperTerminal… it’s probably under Start -> Programs -> Accessories -> Communications -> HyperTerminal. Alternatively, you could also use PuTTY in ‘Serial’ mode). Set one window to point to the COM port that the Bluetooth DB9 adapter is plugged into, and type this into it:

AT

and press Enter, at which point, you’ll get either this:

OK

which is good, or this

ERROR

which seems to go away if you type ‘AT’ again, or this

(incomprehensible garbage)

which probably means the adapter is a bit loose or you’re set to the wrong line speed / flow control / stop bits / parity bits, (it seems to default to 19200 bps / None / 0 / 1 out of the box), or this

(nothing at all)

which probably means the adapter isn’t plugged in, or something else is loose, or it’s not powered on, or you’ve selected the wrong COM port, or you’re looking at the wrong laptop, or your keyboard doesn’t work, or the serial port driver doesn’t work, or the serial port driver isn’t configured correctly, or the operating system has crashed, or something else entirely, or some combination of those things. Try shaking it and trying again.

Now that you’re talking to the Bluetooth adapter in old-school Hayes-speak [3], have the following conversation with it:

AT
OK
DEVICE=?
0000 00 000000
OK
NAME=?
Serial Adaptor
OK
NAME=Growatt Inverter
OK
NAME=?
Growatt Inverter
OK
PIN=?
1234
OK
PIN=RaRaRaSomething
OK
PIN=?
RaRaRaSomething
OK
ROLE=?
Slave Mode
OK
STATUS=?
Celsius         : 41
VERSION         : VER : 4.6.3
ADDRESS         : 0018 DB 010000
ROLE            : SLAVE MODE
FLOW            : DISABLE
ECHO            : ENABLE
PROMPT          : ENABLE
DISCOVER        : ENABLE
RECONNECT       : DISABLE
AUTO            : DISABLE
DIP             : DISABLE
<<<             : ENABLE
>>>             : ENABLE
DETECT          : DISABLE
SERIAL_PROTOCOL : 19200,N,1
NAME            : Growatt Inverter
PIN             : RaRaRaSomething
DEVICE          : 0000 00 000000
CONNECT         : 0000 00 000000
OK

Now in BlueSoleil (or the native Windows Bluetooth device stack, if you can manage to get that working), search for your BlueTooth/DB9 adapter using the other bluetooth adapter (it should appear with the NAME you assigned above). You might want to try this from a completely different machine if you like, since this is testing BT<->BT connectivity. Pair with the adapter (using the PIN you entered above), and then allocate it a COM port. On my machine, BlueSoleil assigns the port COM11 to this device.

BlueSoleil before and after connecting to the Serial Port Service to the DB9 to Bluetooth adapter (called "Growatt Inverter" above) bluesoleil-connect-2

BlueSoleil before and after connecting to the Serial Port Service to the DB9 to Bluetooth adapter (called “Growatt Inverter” above). Click to zoom.

You should now be able to talk to yourself even more than usual by opening up another HyperTerminal window connected to the BlueSoleil COM port and tapping keys into it, which should appear on the HyperTerminal connected to the DB9 adapter COM port, and vice versa.

Now back on the DB9 adapter COM port, and this will save you mountains of time later on, type this:

AT
ERROR
AT
OK
BAUD=?
19200 bps
OK
BAUD=9600
OK
àøæ

That àøæ at the end is HyperTerminal/PuTTY not being able to deal with changing linespeeds. Try reconnecting using 9600bps and everything should be right as rain a bright, electricity producing day.

If you don’t do that, be prepared to spend a couple of entertaining hours with portmon and on websites containing pages titled ‘Adventures In Bluetooth‘ trying to discover why the next bit doesn’t work.

Configuration 3

Now we want to test connecting the inverter by Bluetooth. You’ll notice the Bluetooth to DB9 adapter is still connected to the Inverter via a cable and the null modem adapter, and is powered through an external 5V USB.

Bluetooth to DB9 adapter -> DB9 M/M null modem adapter -> DB9 extension cable -> Inverter; Bluetooth to USB adapter -> laptop -> Shinenet
Configuration 3: Bluetooth to DB9 adapter -> DB9 M/M null modem adapter -> DB9 extension cable -> Inverter
Second row: Bluetooth to USB adapter -> laptop -> Shinenet

This is the part that probably won’t work, so why not fire up portmon (from SysInternals) anyway and watch the bits fly over the air.

You’ll find that portmon doesn’t work for some reason, so try it in client/remote mode by going to Start -> Run and typing “c:\util\portmon /c“, then Start -> Run and typing “c:\util\portmon“, typing Ctrl-R, then “localhost“, selecting the bluetooth adapter COM port, sit back, and enjoy watching things like this appear:

portmon in client and remote modes
portmon in client and remote modes

Or, in a slightly more readable form:

0 0.01816823 ShineNET.exe IRP_MJ_CREATE Serial2 SUCCESS Options: Open
1 0.00000335 ShineNET.exe IOCTL_SERIAL_GET_PROPERTIES Serial2 SUCCESS
2 0.00683802 ShineNET.exe IOCTL_SERIAL_GET_MODEMSTATUS Serial2 SUCCESS
3 0.00001145 ShineNET.exe IOCTL_SERIAL_GET_BAUD_RATE Serial2 SUCCESS
4 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial2 SUCCESS
5 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_CHARS Serial2 SUCCESS
6 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_HANDFLOW Serial2 SUCCESS
7 0.00000223 ShineNET.exe IOCTL_SERIAL_GET_BAUD_RATE Serial2 SUCCESS
8 0.00000251 ShineNET.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial2 SUCCESS
9 0.00000168 ShineNET.exe IOCTL_SERIAL_GET_CHARS Serial2 SUCCESS
10 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_HANDFLOW Serial2 SUCCESS
11 0.00583650 ShineNET.exe IOCTL_SERIAL_SET_BAUD_RATE Serial2 SUCCESS Rate: 9600
12 0.00000279 ShineNET.exe IOCTL_SERIAL_SET_RTS Serial2 SUCCESS
13 0.00295345 ShineNET.exe IOCTL_SERIAL_CLR_DTR Serial2 SUCCESS
14 0.00297021 ShineNET.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial2 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
15 0.00000251 ShineNET.exe IOCTL_SERIAL_SET_CHAR Serial2 SUCCESS EOF:1a ERR:0 BRK:0 EVT:1a XON:11 XOFF:13
16 0.00697212 ShineNET.exe IOCTL_SERIAL_SET_HANDFLOW Serial2 SUCCESS Shake:0 Replace:40 XonLimit:17248 XoffLimit:17248
17 0.00000279 ShineNET.exe IOCTL_SERIAL_GET_BAUD_RATE Serial2 SUCCESS
18 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial2 SUCCESS
19 0.00000168 ShineNET.exe IOCTL_SERIAL_GET_CHARS Serial2 SUCCESS
20 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_HANDFLOW Serial2 SUCCESS
21 0.00000223 ShineNET.exe IOCTL_SERIAL_SET_BAUD_RATE Serial2 SUCCESS Rate: 9600
22 0.00000196 ShineNET.exe IOCTL_SERIAL_SET_RTS Serial2 SUCCESS
23 0.00000196 ShineNET.exe IOCTL_SERIAL_CLR_DTR Serial2 SUCCESS
24 0.00000223 ShineNET.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial2 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
25 0.00000196 ShineNET.exe IOCTL_SERIAL_SET_CHAR Serial2 SUCCESS EOF:1a ERR:0 BRK:0 EVT:1a XON:11 XOFF:13
26 0.00685366 ShineNET.exe IOCTL_SERIAL_SET_HANDFLOW Serial2 SUCCESS Shake:0 Replace:40 XonLimit:17248 XoffLimit:17248
27 0.00000251 ShineNET.exe IOCTL_SERIAL_CLR_DTR Serial2 SUCCESS
28 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_BAUD_RATE Serial2 SUCCESS
29 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial2 SUCCESS
30 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_CHARS Serial2 SUCCESS
31 0.00000196 ShineNET.exe IOCTL_SERIAL_GET_HANDFLOW Serial2 SUCCESS
32 0.00000223 ShineNET.exe IOCTL_SERIAL_SET_BAUD_RATE Serial2 SUCCESS Rate: 9600
33 0.00286349 ShineNET.exe IOCTL_SERIAL_CLR_RTS Serial2 SUCCESS
34 0.00000196 ShineNET.exe IOCTL_SERIAL_CLR_DTR Serial2 SUCCESS
35 0.00000196 ShineNET.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial2 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
36 0.00000196 ShineNET.exe IOCTL_SERIAL_SET_CHAR Serial2 SUCCESS EOF:1a ERR:0 BRK:0 EVT:1a XON:11 XOFF:13
37 0.00695703 ShineNET.exe IOCTL_SERIAL_SET_HANDFLOW Serial2 SUCCESS Shake:0 Replace:0 XonLimit:17248 XoffLimit:17248
38 0.00000279 ShineNET.exe IOCTL_SERIAL_CLR_RTS Serial2 SUCCESS
39 0.00000196 ShineNET.exe IOCTL_SERIAL_SET_TIMEOUTS Serial2 SUCCESS RI:-1 RM:-1 RC:-2 WM:0 WC:0
40 0.00000475 ShineNET.exe IOCTL_SERIAL_SET_WAIT_MASK Serial2 SUCCESS Mask: RXCHAR RXFLAG CTS DSR RLSD BRK ERR RING
41 0.00000335 ShineNET.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial2 SUCCESS InSize: 4096 OutSize: 2048
42 2.24699592 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
43 0.00000363 ShineNET.exe IOCTL_SERIAL_PURGE Serial2 SUCCESS Purge: TXABORT TXCLEAR
44 0.00000475 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
45 0.00021679 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#~1D..T
46 0.00000531 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
47 0.00123060 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
48 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
49 0.00958809 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
50 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
51 0.00285958 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
52 0.00000307 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
53 3.08693367 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
54 0.00000559 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
55 0.00000391 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 18: #?.1A.LW03511224.\
56 0.00071294 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 19: ?#.1B.LW03511224..r
57 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
58 2.92590567 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
59 0.00000475 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
60 0.00000335 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 9: #?.1B.O.)
61 0.00068472 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.2D…
62 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
63 0.01190570 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
64 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
65 0.00388290 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
66 0.00000251 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
67 3.01195040 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
68 0.00000531 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
69 0.00000391 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 27: #?.2D………..F…..3….
70 0.00118814 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.2C…
71 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
72 0.01190906 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
73 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
74 0.01288851 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
75 0.00000335 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
76 0.00890951 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
77 0.00000279 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
78 2.97897331 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
79 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
80 0.00000335 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 39: #?.2C.1..oT.B.3G.1.8Growatt Inverter…
81 0.00078055 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.2B…
82 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
83 0.01189090 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
84 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
85 0.00789877 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
86 0.00000307 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
87 2.99196322 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
88 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
89 0.00000335 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 29: #?.2B…………@…9….3..
90 0.00032546 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.2A…
91 0.00000447 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
92 0.01288404 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
93 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
94 0.01091116 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
95 0.00000363 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
96 0.01291253 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
97 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
98 0.00390664 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
99 0.00000391 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
100 27.37493927 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
101 0.00000475 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
102 0.00000335 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 43: #?.2A#..V………..)……………..q…f
103 0.00066992 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
104 0.00000615 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
105 0.00037966 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
106 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
107 0.00109595 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
108 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
109 0.00120015 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
110 0.00000559 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
111 0.00028300 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
112 0.00000531 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
113 0.00035675 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
114 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
115 0.00043497 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.2A…
116 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
117 0.02389326 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
118 0.00000447 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
119 0.00989539 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
120 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
121 26.05390769 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
122 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
123 0.00000335 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 43: #?.2A#..J………………………..q….
124 0.00037994 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
125 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
126 0.00047576 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
127 0.00000615 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
128 0.00052130 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
129 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
130 0.00060678 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
131 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
132 0.00066126 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
133 0.00000475 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
134 0.00073277 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
135 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
136 0.00079340 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.2A…
137 0.00000447 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
138 0.01190850 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
139 0.00000419 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
140 0.01191353 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
141 0.00000363 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
142 0.01090111 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
143 0.00000447 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 SUCCESS
144 33.64178799 ShineNET.exe IOCTL_SERIAL_WAIT_ON_MASK Serial2 CANCELLED
145 0.00000503 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
146 0.00000363 ShineNET.exe IRP_MJ_READ Serial2 SUCCESS Length 43: #?.2A#……P…………………….q….
147 0.00082552 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
148 0.00000587 ShineNET.exe IOCTL_SERIAL_GET_COMMSTATUS Serial2 SUCCESS
149 0.00102248 ShineNET.exe IRP_MJ_WRITE Serial2 SUCCESS Length 8: ?#.1A…
150 0.00000643 ShineNET.exe IRP_MJ_CLEANUP Serial2 SUCCESS
151 0.00679947 ShineNET.exe IRP_MJ_CLOSE Serial2 SUCCESS

portmon has the ability to save logs of your COM port communications, so when things go pear-shaped, try grabbing a trace of a successful connection (over the wired serial cable) and the unsuccessful connection (over bluetooth), and compare and contrast in your favourite text editor or comparison tool.

The trace above shows what portmon gives me for a successful connection to my inverter, if that’s of any use whatsoever.

So for this test, fire up ShineNet again, give it the COM port address assigned to your (now remote) Bluetooth/RS232 adapter in BlueSoleil and, with any luck, you’ll get some more stats flowing over the air.

Configuration 4

Configuration 4a gets us a bit closer to how this thing should typically run.

Bluetooth to DB9 adapter (poewred by DB9 ping 9) -> DB9 M/M null modem adapter -> DB9 extension cable -> Inverter; Bluetooth to USB adapter -> laptop -> Shinenet
Configuration 4a: Bluetooth to DB9 adapter (powered by DB9 pin 9) -> DB9 M/M null modem adapter -> DB9 extension cable -> Inverter
Second row: Bluetooth to USB adapter -> laptop -> Shinenet

Righteo, now it’d be nice if I didn’t have a 5v power adapter plugged into the side of the DB9 to Bluetooth adapter, since the whole purpose of using bluetooth was to get this working wirelessly, which kind of defeats the purpose if I’ve got an extension cable connected to the adapter outside the house.

I have it on good authority that it’s possible to power this adapter directly from the inverter, using current on pin 9 of the DB9 connector. Try flicking the switch on the side of the adapter from ‘USB/Battery‘ to ‘DB9 Pin 9(5V)‘ and then be amazed when the lights go out and it ceases to work.

This is because the cheap-arse null modem you purchased doesn’t actually have a pin 9. Go on, check it. Check it twice. Isn’t that fascinating ? Yes. Yes it is.

One of these things is not like the other.  One of these things is missing pin 9.
One of these things is not like the other.
One of these things is missing pin 9.

So as a workaround, use that DB9 M/F null modem you definitely purchased weeks in advance instead, and a DB9 M/M gender changer so that everything’s boy/girl/boy/girl from the bluetoothy adapter to the inverter.

Bluetooth to DB9 adapter (powered by DB9 pin 9) -> DB9 M/M gender changer -> DB9 F/M null modem adapter -> DB9 extension cable -> Inverter; Bluetooth to USB adapter -> laptop -> Shinenet
Configuration 4b: Bluetooth to DB9 adapter (powered by DB9 pin 9) -> DB9 M/M gender changer -> DB9 F/M null modem adapter -> DB9 extension cable -> Inverter
Second row: Bluetooth to USB adapter -> laptop -> Shinenet

This is where I’m up to at the moment, so this probably be revised in two weeks or so when the new null modem turns up.

That presumably works first time, so rip out the cable, put the bluetoothy adapter in a plastic bag so it won’t break the first time it rains, replace ShineNet with something that doesn’t look like as if it was written by the solar panel guy’s son over the course of a weekend, and there you go. Have you learnt nothing ? Of course it’s not going to work.

(One Month Later…)

You’ll probably find that the ebay seller just skirts a day short of their paypal-guarantee window and you receive the DB9 F/M null modem adapter exactly 30 days after you order it. Because life is meant to be spent waiting for other things to happen. Close the paypal dispute when the package arrives.

Break the adapter out of it’s bubble-wrap, attach it, turn everything on, and be amazed when it still appears to work. Flick the switch to get power from the DB9 line, and lo and behold, the power does flow, but the ones and zeroes that comprise the solar panel data don’t appear to make it to the bluetooth receiver on the laptop. So that’s annoying.

So it’s about this time that I receive a comment on this post through the absolute shart load of spam that I receive asking whether I should have the bluetooth thing in slave or master mode which gets me flicking through the specs sheet for this thing again. And what do you know, that DTE/DCE switch thing on the left hand side actually swaps the transmit/receive lines for you, meaning I didn’t need to get a separate null modem adaptery thing at all.

So there you go.

Log in to the adapter through HyperTerminal/PuTTY again, and enable the dip switch settings by entering this into it:

AT
OK
DIP=?
Disable DIP Switch
OK
DIP=Y
OK
DIP=?
Enable DIP Switch
OK

Now that the device is noticing what it’s dip switches are set to, flick the Master/Slave ( M / S ) dip switch to ‘ S ‘, and (this is the exciting part) the DCE(F) / DTE toggle on the side to DTE .

You can now remove the (possibly not working at all) DB9 F/M null modem adapter that took four weeks to arrive from the chain of doodads, and still get something that could be described as vaguely functional.

So now everything seems to be working hunkydory in Configuration 5a:

Bluetooth to DB9 adapter (powered by DB9 pin 9, modified settings) -> DB9 M/M gender changer -> DB9 extension cable -> Inverter; Bluetooth to USB adapter -> laptop -> Shinenet
Configuration 5a: Bluetooth to DB9 adapter (powered by DB9 pin 9, modified settings) -> DB9 M/M gender changer -> DB9 extension cable -> Inverter
Second row: Bluetooth to USB adapter -> laptop -> Shinenet

meaning (and this is the last time I’ll be firing up Paintshop Pro for this blog post hopefully), it now appears to work in Configuration 5b:

Bluetooth to DB9 adapter (powered by DB9 pin 9, modified settings) -> DB9 M/M gender changer -> Inverter; Bluetooth to USB adapter -> laptop -> Shinenet
Configuration 5b: Bluetooth to DB9 adapter (powered by DB9 pin 9, modified settings) -> DB9 M/M gender changer -> Inverter
Second row: Bluetooth to USB adapter -> laptop -> Shinenet

I shall leave replacing the laptop with a raspi, and replacing the ShineNet software with something else completely for another thrilling installment. Stay tuned, Solar Warriors.

[1] Attention retail giants: I am prepared to say anything here for the right kind of incentive. And by incentive, I mean cash.
[2] Enjoy the menu items that don’t do anything, the fullscreen images of real-estate clipart and/or layout bugs when you attempt to resize it, and expect it to hang every second time you attempt to close it down
[3] and if you’re old enough to be putting solar panels on your house, you’re old enough to remember Hayes commands. Take a few moments to reminisce about the thousands of different modem command variants that used to exist. Ahh. Isn’t it wonderful that you’ll never need to know any of that again.
Although to be fair, these inverters are starting to have wifi built-in now, so all of this will probably be obsolete in a month or two. Enjoy !
17 Comments

Add a Comment

Your email address will not be published. Required fields are marked *