plusvic / simplebus2-intercom

General description of the Simplebus2 protocol used by some Comelit's intercoms. Hardware for retransmitting Simplebus2 messages over UART.
Creative Commons Zero v1.0 Universal
65 stars 6 forks source link

Need some explanation #4

Closed Elektroarzt closed 2 years ago

Elektroarzt commented 2 years ago

Hi plusvic,

I like to use your fabulous work in a similar project (S2 bus > ESP8266 > Node Red > Apple HomeKit). Now I have some questions, that you maybe can answer:

Best regards and thanks in advance, Thomas

plusvic commented 2 years ago

Hi Thomas,

The only difference between the PIC 12F508 and the 509 is that the latter has more memory, so you can use it without changes in the code.

The UART speaks out the same 18-bits messages transmitted over the bus, including message id, destination address and checksum. Each message is encoded in 3 bytes when transmitted over UART. The transmissions is done at 4800 bauds, so you must configure the ESP8266 to receive at that speed.

You can see how each part of the message is decoded from the 3 bytes received over UART in https://github.com/plusvic/simplebus2-intercom/blob/main/remote_unit/src/main.cpp#L362

You will need an equivalent code for your ESP8266.

Elektroarzt commented 2 years ago

Many thanks for your fast response! Then I will go a slightly different way: S2 bus > your schematic > ESP8266 UART > Node Red > Apple HomeKit

Could you maybe provide a hex file for the PIC or something I can directly feed in a programmer? The rest should be clear to me.

plusvic commented 2 years ago

Unfortunately I don't have the hex file around. I had my setup on a Virtual Machine that I lost.

Elektroarzt commented 2 years ago

Would it be possible for you to generate a hex file? I installed the microchip IDE but I'm experiencing lots of problems in compiling the asm file. This would be very helpful, as I am more the hardware guy. I made a PCBA out of your schematic if you or someone else is interested.

Many thanks in advance!

plusvic commented 2 years ago

I lost the Virtual Machine where I had all the setup for building the code and generating the hex file, it would be very time-consuming for me and don't have too much time to spend on this project anymore.