Flashing Max cube with CUL

Begonnen von malc_b, 27 Dezember 2016, 11:02:24

Vorheriges Thema - Nächstes Thema

malc_b

Hi,

I'm trying to follow https://forum.fhem.de/index.php/topic,38404.0.html but not getting very far.  Has anyone done this and can tell me where I'm going wrong.

My cube has on it BC-LGW-O-TW TRX868-TI which I read means it has the right parts.  I've downloaded the atmel package and expanded that to a folder but there doesn't seem to be an install for that.  I think all I probably need is the driver of the that package.  I've tried shorting J1, plugging in usb lead, waiting for flashing to stop then disconnecting usb and J1 and plugging the usb back in again.  That doesn't seem to work.  In win 7 device manager there are no new items, and scan for hardware changes doesn't find any so I can't install the atmel drivers.  What am I doing wrong?

Also, my Cube has security screws or maybe torx.  I don't have a screwdriver that small.  Does anyone know the type and size I need to fit them?

malc_b

I've ordered a set of torx screwdrivers so one of those should be right (I think it is T7).  I've plugged the cube back in and it is still working so J1 is not unlocking it.

malc_b

So I've tracked down the problem, my flat bit of metal wasn't making good contact on J1 pads.  I used a pair of long nose pliers in the J1 holes and then it seemed to work.  The other issue was downloading sm-ba v3 when what I need is 2.16.  V2.16 comes with an install so that when in on win7 ok.  I did have a problem with win7 assigning bossa driver to the new com port which I had to remove , deleting driver, before I could follow the 2.16 instructions to get a AT91 com port.  I've used sam-ba to install bootloader and then teraterm to send over aculfw which seemed to work.

I'm now trying to get cul_max working on fhem and linking to my radiator stat.  I'm not sure if cul_max is working or how to test that it is, maybe it hasn't flashed correct.

malc_b

So the key is I needed to look at the fhem docs CUL entry and not CUL_MAX.  With that info I plug the cube back into usb and used teraterm to talk to it.  That gave me mac address and then with IP scanner I could find where it was being put as IP.  Or alternately I could have given it a fixed IP and disabled DCHP.

DerFrickler

I think it's better to move your question to FHEM Forum » CUL » Hard- und Firmware. Otherwise it may happen that your question will not be read by relevant experts... and I expect that most of them are able to read and write english language.

malc_b

Thanks for the suggestion.  I'll bear that in mind in future as I've got it sorted now.

alangward

Hi Malc_B,

You say that you have connected to your CUBE over IP.
I am struggling to connect mine.
The V command is working OK over USB/Tera Term.
But it gives no reply when I enter 'Ec' to get the network information.
The 'Internet' light is on and the light on my switch shows that it is connected.

Any ideas?

Thanks,
Alan

alangward

Hi Malc_B
Ignore my question.
Found the problem. I plugged the Ethernet cable in after I had booted the Cube. Once I power-cycled it I was able to connect.
It's still not responding to Ec commands however.

Thanks
Alan

malc_b

Ec doesn't work for me either.  I think the code for a-culfw sends E to rwe_func in rf_rwe.c where r = init, s = send.  As far as I can see main.c doesn't have a eth_func call  so I think this is bug. Maybe E should be b as that's the only one in the description which has r and s and only them as 2nd chars.

I use the Rxx and Wxx commands to read from the eeprom although if you are using DHCP that doesn't tell you the IP address but I have a program called advanced IP scanner that will tell me all the IP addresses on my local network which I can then match with the MAC from the eeprom.

alangward

Hi,
Thanks for that.
I have an IP scanner on my iPhone, which allowed me to discover the new IP address that had appeared with a strange manufacturer's name.
I tried that and it worked.
I have now locked it down using the DHCP table in my router.

I am now about to embark on removing the credit limit.

Alan

malc_b

I've finally got building a-culfw to work so for anyone else struggling here is what I did.  I first tried in windows but that had so many issues that I switched to my raspberry pi instead.  First step is to install gcc compilier with

apt-get install gcc-arm-none-eabi

This is version 4.8.  I couldn't find a later version (and don't make the mistake I did I've trying to get the linux version off launchpad which doesn't run as I think it is x86 only although it doesn't say so).

Get the latest a-culfw source and put that on the Pi at a suitable location.  In the sub directory Devices/CUBe create a Makefile.local by copying the Makefile.local.template.  This should contain this


###############################################################

ARMBASE = /usr

INCLUDEPATH = $(ARMBASE)/lib/arm-none-eabi/include
LIBPATH = $(ARMBASE)/lib/arm-none-eabi/lib
ARMPATH = $(ARMBASE)/bin
TOOLPREFIX = /arm-none-eabi-

OPTFLAGS = -Os

######################## EOF ##################################


The optflags override is to remove -fno-isolate-erroneous-paths-dereference which is a 4.9+ switch so 4.8 doesn't have it.

Change to the Devices/CUBe directory and enter the command make (in a Pi terminal window of course) and that should make the binary.  If you want to do a fresh make then you need to delete the CUBE_BL files and all the *.o files to force a complete rebuild.


medolino2009


malc_b