[RESOLVED]What is the correct make command to build bluz-gw?


#1

Hey

Here is what I did …

$ cd modules/
modules$ git checkout gateway_devlop
modules$ unset APP
modules$ export PLATFORM=bluz-gw
modules$ make clean all
modules$ cd ../build/target/
target$ adalink nrf51822 -p jlink -h system-part1/platform-269-m/system-part1.hex -h user-part/platform-269-m/user-part.hex

… which seems to have produced a working gateway, in as much as both the Photon and the Bluz-GW show up in my dashboard – and the Photon log output is happily showing handshakes and so on. …

...
24990:DEBUG: Asking for id
24990:DEBUG: Starting to send data
25040:DEBUG: Completed Sending
26446:DEBUG: In SPI Receive
26446:DEBUG: Handshake complete
26448:DEBUG: Receiving SPI data of size 23
26448:DEBUG: Reading chunk of size 23
26451:DEBUG: Processing message of size 20 with clientID 3 and service ID 1
26451:DEBUG: 3->Cloud  - 18
26451:DEBUG: Read length = 18
26664:DEBUG: Starting to send data
26714:DEBUG: Completed Sending
26714:DEBUG: 3->BLE    - 23
...

HOWEVER my BluzDK just sits there flashing green-slow and never connects.

That is, only clientID 3 and service ID 1 ever shows up in the debug output, whereas I would expect a clientID 0 and service ID 1 at some point. Hmmm.


#2

What is user-part.hex?

Normally when we build we specify an app to target, usually we use tinker so you would specify APP=tinker in the make line.

That shouldn’t break the gateway, though I am not sure what the user code is doing so you could try.

Is the debug log from the Photon complete? (I assume a Photon, if not, what are you using on the GW Shield?) If it’s not complete, can you post the whole log?


#3

Thanks @eric. At least now I know for sure.

Anyway, seems I’ve solved the problem by flashing the bootloader as well – which I suppose I should have done in the first place! …

adalink nrf51822 -p jlink -h bootloader/platform-269-lto/bootloader.hex -h system-part1/platform-269-m/system-part1.hex -h user-part/platform-269-m/tinker.hex`

EDIT: I think it had dk_bootloader-0.1.3.hex installed previously. No wonder!

I also tried user-part1.hex (user/src/blank.src). Works just the same.