Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to Change this project for WisNode-Lora? #5

Open
verofin opened this issue Jul 17, 2018 · 10 comments
Open

Possible to Change this project for WisNode-Lora? #5

verofin opened this issue Jul 17, 2018 · 10 comments

Comments

@verofin
Copy link

verofin commented Jul 17, 2018

Hi Ebiroll
Thanks for your great effort on this project. I would like to know if it is possible and how I could go about changing this project for RAK WisNode-Lora. Its using the same RAK811 and STM32 chip set. It's just the board layout that's different.
Thanks for your response

@Ebiroll
Copy link
Owner

Ebiroll commented Jul 17, 2018

Hello @verofin .
I have used it on the WisNode-Lora.
Just remove the init() calls to the GpsInit() and LIS3DH_Init( ); in the function BoardInitPeriph() located in
src/RAK811BreakBoard/board.c
Then you will have to find something else to send in PrepareTxFrame() in src/main.c
GL

@Ebiroll
Copy link
Owner

Ebiroll commented Jul 17, 2018

@verofin
Copy link
Author

verofin commented Jul 17, 2018

Thanks I will try it. I recompiled the app using pio run and found allot of warnings. When I program my Tracker Board I don't seem to get a response. Is there a blinky app to make sure I didn't kill the board?

@Ebiroll
Copy link
Owner

Ebiroll commented Jul 18, 2018

In the end of src/main.c you have a blinky app. Just rename the other main(). Unless you overwrote the bootloader I dont think you ruined your board. And if you did you can probably flash a new bootloader by using the SWD pins. https://github.com/Ebiroll/esp32_blackmagic. Maybe you just forgot to move the strap after flashing. P1. Boot Switch Pin,

@verofin
Copy link
Author

verofin commented Jul 18, 2018

Is there a better form in which to have these discussions?

I stripped out the whole program in an attempt to get the LED's to blink. I don't think the bootloaded was overridden. It seems to write the bin from 0x08000000. Do you know what the entrypoint for the application is?
The output from running stm32flash from my ununtu pc is:
stm32flash /dev/ttyUSB0 -e 0 -w .pioenvs/rak811/firmware.bin
stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version : 0x31

Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0429 (STM32L1xxx6(8/B)A)

  • RAM : 32KiB (4096b reserved by bootloader)
  • Flash : 128KiB (size first sector: 16x256)
  • Option RAM : 32b
  • System RAM : 4KiB
    Write to memory
    Wrote address 0x08005ce4 (100.00%) Done.

@Ebiroll
Copy link
Owner

Ebiroll commented Jul 18, 2018

Are you using the Trackerboard or the WisNode-Lora? The blinky app only works on the Breakboard/tracker board.

On the wisnode I did some change in src/peripherals/lis3dh.c
In the init function I did this.
//return 0;

I use screen to check serial output. Press reset after starting screen.
screen /dev/ttyUSB0 115200
Also check pio --version
more ~/.platformio/platforms/ststm32/platform.json

I used the flash application located in the stm32flash directory
[olof@atrash RAK811_BreakBoard]$ ./stm32flash -w .pioenvs/rak811/firmware.bin /dev/ttyUSB0
stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0429 (STM32L1xxx6(8/B)A)

  • RAM : 32KiB (4096b reserved by bootloader)
  • Flash : 128KiB (size first sector: 16x256)
  • Option RAM : 32b
  • System RAM : 4KiB
    Write to memory
    Data size: 60880 bytes
    Erasing memory
    Wrote address 0x0800edd0 (100.00%) Done.

Latest versions of everything.. Here is serial output on Wisnode-Lora without any changes in the code.

LIS3DH no ack
LIS3DH no ack
LIS3DH no ack
+++++++++++++++++++++++++++++++
RAK811 BreakBoard soft version: 1.0.2

Selected LoraWAN 1.0.2 Region: EU868

ABP:
Dev_EUI: 60 XX XX XX
DevAddr: 26011FDA
NwkSKey: 79 XX XX XX XX
AppSKey: DD XX XX XX XX XX XX
GpsGetLatestGpsPositionDouble ret = 0

@verofin
Copy link
Author

verofin commented Jul 18, 2018

I use Ubuntu so I installed st32flash using apt-get. My PlatformIO, version 3.6.0a7

I'm using the tracker board v2.0 I also have a WisNode, but that's another story

I managed to compile the code a couple of days ago and had the tracker running, connected to ttn. Then I wanted to get the WisNode to work. When that did not succeed I thought I would see if I could at least recompile the Tracker software in an attempt to get back to some point where things worked. I managed to now have a tracker board with both led's on and nothing happening on the serial port. Is there a .bin I could burn to just make sure by board is still fine? How do I get back to a controllable state?

@sabas1080
Copy link

sabas1080 commented Jul 18, 2018

STM32 you must have this patch Formlabs/stm32flash@8c4aa65

@mapl
Copy link

mapl commented Jun 26, 2019

I also have the RAK WisNode. Would be nice having a separate project folder without the hassle to adopt code.

@zdila
Copy link

zdila commented Aug 14, 2019

I can run it on my WisNode just by applying #5 (comment). I use Debian Bullseye.

Flashing:

stm32flash -b 115200 -e 255 -w ~/RAK811_BreakBoard/.pio/build/rak811/firmware.bin -v /dev/ttyUSB0

Reading logs:

picocom --baud 115200 --omap crcrlf --echo /dev/ttyUSB0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants