Open jedahan opened 6 years ago
sure thing! Such info would fit nicely in the book, even if we don't have any code for it. I'll be on the look out for them
Okay I ordered one, should be here in a few days, will see what the differences are
I also ordered one last Saturday from China. Although it was on backorder very much to my surprise it already arrived today in Germany...
Got mine in too, what commands would be helpful? lspci? lsusb? opening it up and taking pictures?
Exciting! The latter, close up pictures of the chips so we can see if they're the same.
The included images were posted in the Discord by Flashquark, the chip seems to be a HT32F52342 Higher quality images of the PCB would be much appreciated though!
HT32F52342-52_Datasheetv120.pdf
hmm these aren't as good as the ones you already have
It does look like there is something like DFU mode if you hold esc while plugging in the usb c. Not sure if we can inspect that, maybe with a facedancer or something.
@MvEerd Sure thing, anything in particular you'd like to see?
Got a pic of the bluetooth chip? It's under the little metal shield on the left of the board.
Hm, not sure I want to remove the can... There's so much plastic on the board and I'm not not I can protect that...
Lol, the can is only hold in place by tabs, it's a CC2541. Need a photo? I'd have to fire up the microscope then, it's barely imageable using a camera.
Cool, that's all I wanted to know :)
CC2541 is the same chip as on the previous Anne.
Here you go: It's as high-res as I can do right now and best quality GH would allow me to upload. ;)
@ah- Is the BT chip really that relevant for anne-key?
Here's the rest of the chips close up...
My excitement of the Anne Pro 2 is a bit dampened. Not sure whether the Anne Pro is the same, but the 2 is really quirky in BT operation and the key mapping is rubbish (the problem being they should either implement mapping keycodes for other layouts than US or preferably add a layout indication the HID profile as defined in HID Review Request 42) which makes it pretty much unusable for for me at the moment.
@therealprof I was thinking about getting the Anne Pro / Anne Pro 2 to tinker around with the firmware a bit. What do you mean by "the keymapping is garbish"?
@SirWindfield They don't indicate the keyboard layout in the communication so it will automatically use the keyboard layout which is very annoying if you're on a laptop with a foreign layout. Should be trivial to indicate a US layout in the HID profile to allow seamless swapping between keyboards...
I was kind of shocked to learn to keyboards still use those idiotic arbitrarily chosen fixed scancodes instead of just sending the translated characters...
@SirWindfield, if you want to tinker around you might want to get a Anne Pro 1, STM32 has better support for open source. Also Cortex M3 instead of M0+ :)
Unless you want to help with bringup, then get the 2.
Are there more keyboards that are flashable? I was generally thinking of getting my first mechanical and looked for some time online but a lot of them aren't even available in my country (Germany).
Oh yeah, there are tons. However, they usually don't have Bluetooth and tend to be a bit more expensive. If you just want to play around a bit I'd recommend getting one with QMK, if you like Rust or love reverse engineering get the Anne Pro.
Unless you want to help with bringup, then get the 2.
@ah- By bringup you mean helping out writing the firmware right? Not sure what is means :/ The thing is, I can't seem to find any Anne V1 anymore. They are all sold out sadly.
Basically figuring out what tools to use to flash / debug the chip, how to configure them, reading the datasheet to figure out how to toggle/read pins etc. So the rather low level things vs. adding higher level features like keyboard shortcuts or similar.
Actually, I've got a spare AP 1 that I don't use, if you want it I'll send it to you for free. It's got the red switches, don't really like them and have enough keyboards.
Send me an email (see profile) with your address if interested, no strings attached.
Basically figuring out what tools to use to flash / debug the chip, how to configure them, reading the datasheet to figure out how to toggle/read pins etc.
I see you have a todos.txt in gitignore, could you track it here too? We can then tease it out into the book sections.
I guess this thread is enough tracking for now, getting it to work won't be super easy since I haven't immediately found great resources for the Holtek Cortex M0 chips.
https://github.com/ChaoticConundrum/openocd-ht32 seems to add support to openocd, but it's in a fork not in mainline etc. The nice thing about the stm32 in the original Anne Pro was that it has great support in the open source ecosystem.
Would it be possible to use https://github.com/rust-embedded/cortex-m-quickstart and the details from https://www.holtek.com/documents/10179/116711/HT32F52342_52_Datasheetv150.pdf to get started with a compilation? I don't have an Anne2 myself, but I am curious if I can use an Anne2 and this repo to create a couple of layouts that allow me to input US keystrokes on a british OS :)
What's the latest status on Anne Pro 2 support?
Can you help me with a problem with my Anne pro2 the backlight will not work when I press fn2 and 9 it will not show up any colours
Has anyone tried dabbling with this anymore? Ducky One 2 Mini now has a QMK port, and I feel like such a fool for choosing Anne Pro 2 over it.
It's 2020 and I am basically hoping for the same thing for cheap 61 key keyboards
Has anyone looked into... https://github.com/fcoury/node-anne-pro (JS) https://github.com/Blucky87/AnneProCLI (Python) https://github.com/leonardlorenz/anne-pro-community-app (Java) https://github.com/fcoury/electron-anne-pro (JS)
@MycroftHolmes1989 don't fear, we might get to it... I might contact the company that makes it.
Who want to send send a message to their socials for help? https://www.facebook.com/annepro2/ https://www.instagram.com/anne_pro_2/ Their email is info@annepro2.com and the company is service@obins.net
So I've been looking into implementing a HAL for the HTF32F523 series of chips in rust (I guess this would be the first step for this goal?). And got myself some hardware (specifically HT-ESK32-30501). Now I'm currently struggling to find any open source software that is able to communicate with the on board debugger, does someone here have any suggestion for that or do I have to implement support for it in something popular like openocd?
Instead of going for OpenOCD I'd probably go for https://probe.rs/ first.
Oh wow I didnt know it had gotten that far since i last looked at it! Definitely will do!
@therealprof https://github.com/probe-rs/probe-rs/issues/172 just as a tracker for progress on this.
@hargoniX I'd be happy to donate some time if you get anywhere with that! I've not got any real experience, but would be willing to try learn :)
I've been toying with the idea of trying but also don't really know where to start...
Quiiiiiick update, I've just managed to get cargo-flash to flash some random ELF onto my dev board so I'll be landing a PR for that in cargo-flash soon.
@theobarberbany First of we'd have to look into a PAC, https://github.com/rmsthebest/ht32f523x2 is a thing but I am not sure how up to date/maintained etc it is. Usually though the process of building a PAC is mostly automated as one can run svd2rust over a manufacturer supplied SVD file and generate lots of (hopefully) correct code from that. Afterwards we'd be looking into writing an actual HAL + presumably USB support (not defined in embedded-hal afaik). And then on top of that a full keyboard firmware like this one.
@hargoniX Any updates? Is there anything I could possibly do to help?
So I created https://github.com/ht32-rs/ and yesterday published my own set of PACs (for all Holtek chips), see here and here. What we'd have to do now is look into building a HAL for the ht32f52342_52 variant of the second crate. Which essentially means reading this document and writing code that implements embedded-hal traits for it.
If we want to use this HAL for Anne Pro 2 firmware ASAP it would be very useful to know which peripherals we should focus on so somebody should make a list of that and file an issue for that over at https://github.com/ht32-rs/ht32f5xxxx-hal
I was gonna look into writing code for the clock setup next weekend (and probably beyond that, dunno how long that takes me) and after that look into implementing the necessary peripherals so it would certainly also be useful if someone wanted to help with the peripherals (especially with USB of course).
Apart from that nothing comes to mind @philipmnelson
And for another update, I'm done with the clock implementations as well as the GPIO implementation (see https://github.com/ht32-rs/ht32f5xxxx-hal) and will move on to the peripheral implementations for the chips posted far above by now soon :tm:
Wow! Does flashing and debugging work?
On the HT32 chip it has been working since https://github.com/ah-/anne-key/issues/70#issuecomment-596231100 was closed^^ Now it can already blink LEDs \o/
And for another update, I just got SPI working, yesterday got I2C working-ish so the only two things that's left now is UART and USB, how hard can USB be 😉
Quick question: once the USB part is implemented, will it be possible to run something like QMK on it?
QMK is not at all related to what I am doing here, I'm implementing the Rust abstractions required to do sensible embedded development on the Holtek chip, QMK is a C firmware project that has absolutey 0 idea on how to deal with the Rust abstractions what so ever.
TLDR; QMK is a different language and compatability between Rust embedded and it = 0 -> No
Edit: That being said porting QMK to this chip / keyboard is conceptually not much different from doing the same thing in Rust but I have neither the motivation nor the C knowledge to do any of that. I tried to take a look at the C code Holtek provides as a library for their chip, but the download link on their page is broken so I have no means to access it, if one would get that C code they would effectively done with the work I am doing right now in Rust and the only effort would be the QMK port. However I don't have any motivation in dealing with a random Taiwanese company to get them to fix their download links just to port QMK over the Anne Pro when we already have something in Rust cooking here.
If anyone actually wants to do this though and can't get Holtek to fix their links feel free to use my code as a basis for a QMK port once its done, I'm sure that's gonna make some people happy as well.
A third option would be to add a compatability layer between Rust's embedded-hal and USB traits and C which I'm not willing to do though, if someone else finds the motivation for that feel free.
As far as I remember, there was someone who ported a few functionalities of QMK to Rust. I will try to find that project. If anything remotely close works with Anne pro 2, it will be a blessing.
Edit: I was expecting compatibility with something like this: https://github.com/TyberiusPrime/keytokey
U(S)ART now works as well, will look into USB in the next days/weeks and once I got that done we should be more or less ready to go with porting!
For a QMK port you will need to port ChibiOS. I have a port of ChibiOS for HT32F165x, at github.com/OpenDucky I recently ported QMK to a Ducky keyboard which uses the HT32F1654. It looks very close to the F5 series that they use on the Anne Pro.
I know it was just announced, but wondering if we could have a tracking issue for what chipset it is, etc.