atlas0fd00m / rfcat

RfCat - swiss-army knife of ISM band radio
Other
554 stars 116 forks source link

Support for all Chronos dongle variants? #129

Closed oliv3r closed 8 months ago

oliv3r commented 2 years ago

The chronos dongle comes in a few flavors, one single chip based on CC1111 MCU, and the MSP430F5509 G4 + CC1101 variant. Supposedly they are 'identical', though obviously the CC11x1 connection is not over SPI, as it is with the case with the MSP430 variant.

Is this even possible/feasible?

atlas0fd00m commented 2 years ago

the only chonos dongles i know to work with RfCat are the CC1111 chips. i would gladly support the MSP430/CC1101 chip if someone wanted to spear-head the project. but no, it would not be able to use the existing code exactly as-is. i'm not sure what 'identical' means, but they couldn't be. that doesn't mean it wouldn't be very easy to port it to that combo. would you like to try? i'm happy to support, i just can't drive the effort.

oliv3r commented 2 years ago

I don't mind to spear-head; but I'd surely need some support as I have no experience with MSP in general.

As for the identicalness, afaik is that the CC1111 chip is just a MSP430 with a CC1101 in the register set, instead of an SPI bus.

If only we had the code to both dongles so we could see what TI did to support both; They probably have a 'shared codebase'. I'll try to see if open chronos has/does anything in that regard (they probably don't touch the dongle though ...)

atlas0fd00m commented 2 years ago

understood.

the first thing to figure out is if SDCC supports that chip or if we'd need a new build chain. next thing would be to figure out how that USB and CC1101 peripherals differ from the CC1111's built-in peripherals. if they're the same, they may be memory-mapped at a different base address.

i don't know if it's mandatory, but in other systems i've seen the CC1101 and CC1111 used different clock rates, the CC1111 using 24mhz (to support 48mhz, having to do with the USB) and the CC1101 using 26mhz. this plays into configuration items for RF settings. RfCat python code should handle the conversions, but it's something you have to figure out about the chip in question.

once you compare the build chains (or figure out SDCC supports them both), and compare memory maps, you'll know more about what the project would entail. let's talk again then? or let me know if you run into trouble and would like some support

oliv3r commented 2 years ago

Well for one, afaik; the MSP430 is MSP430, so 16 bit using mcp430-gcc, not sure how 'SDCC compatible' that is; C being C< might not be a huge issue though? I'll do some hello-world fun and some investigation however!

atlas0fd00m commented 2 years ago

makes sense. we can account for that in the Makefile. given that, what does the access look like for the key peripherals? same accesses, different memory mapping (or same)? or something completely different? is there any special board init required for that chronos? we can do that in an #ifdef.

oliv3r commented 2 years ago

For these questions, I'd have to dive in :) But, I do know, that the difference between a CC1101 and a CC1111 is just the addition of a mirco controller., the radio is the same.

atlas0fd00m commented 1 year ago

correct, the radio is the same... but the oscillator frequency is different, due to supporting the USB controller. still interested?

oliv3r commented 1 year ago

Still interested, but lack of time ... :p

atlas0fd00m commented 8 months ago

@oliv3r please let me know if that ever changes. i likewise have a lack of time. :(

in case you are ever interested, the math that's used is all calculated in Python using whichever clock the dongle uses. this allows the 24/26MHz switch to be easy.