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

RAPI Command Serial Numbers #143

Closed
chris1howell opened this issue Sep 23, 2021 · 12 comments
Closed

RAPI Command Serial Numbers #143

chris1howell opened this issue Sep 23, 2021 · 12 comments

Comments

@chris1howell
Copy link
Contributor

RAPI command to SET and GET Serial Numbers required by OCPP.

station chassis
connector
meter

Proposed format
SET command write once only if EEPROM serial numbers are blank. EEPROM could also be written directly with programmer.
$SS station connector meter

GET
$GS
$OK station connector meter

@lincomatic
Copy link
Owner

IMHO, this info should be handled by the WiFi module. The EVSEs aren't involved in OCPP at all. You should just use the MAC address as the serial number.

@chris1howell
Copy link
Contributor Author

chris1howell commented Oct 3, 2021 via email

@jeremypoulter
Copy link
Contributor

FYI, the ATMEGA 328 may has a unique ID we can use: https://www.thethingsnetwork.org/forum/t/arduino-has-a-unique-id/21415

@lincomatic
Copy link
Owner

FYI, the ATMEGA 328 may has a unique ID we can use: https://www.thethingsnetwork.org/forum/t/arduino-has-a-unique-id/21415

I looked into this... interesting idea. The first 6 bytes are ASCII, followed by 4 hex bytes. It's guaranteed to be unique only in the 328PB, but some people are using it, anyway. In the 328P, the first of the hex bytes is always FF

@lincomatic
Copy link
Owner

There's a library for this: https://github.com/ricaun/ArduinoUniqueID
Maybe you guys could try running it on a bunch of boards and see if it looks unique enough to use?

@jeremypoulter
Copy link
Contributor

Will give it a go on the boards I have, but that being said I believe the primary focus of this is new boards so I would assume we can build these with the 328PB @chris1howell ?

@lincomatic
Copy link
Owner

The PB is functionally identical. The pinouts are almost identical, but therre's a pin or two that need to be strapped. Also, you need to either get a newer copy of avrdude, or modify the config to work w/ its chip id, which is different. the PB is generally cheaper, BTW. I'll upload code in a bit.. implemented a $GI command to get the ID

@jeremypoulter
Copy link
Contributor

jeremypoulter commented Nov 19, 2021

In #144 I have a config that builds with the latest Arduino will see which avrdude is used.

@lincomatic
Copy link
Owner

lincomatic commented Nov 19, 2021

code with $GI
b035a34

@jeremypoulter
Copy link
Contributor

Gave this a try $GI gives $NK^21, think you have it as $SI by mistake and also the command is echoed back so passing $SI gives $OK $SI Y91017FF14011C^0F, but on the positive side I do indeed get different different codes on the different devices, Y57414FF020F0C and Y91017FF14011C

@lincomatic
Copy link
Owner

lincomatic commented Nov 22, 2021

Oops, sorry about that. I just pushed a fix that changed it from $SI to $GI. Glad that it's giving different values on different boards. I guess the question is how unique they really are. Anyway, let's just try using this for now.

@lincomatic
Copy link
Owner

Sorry, I just noticed that the response is echoing the command in your examples above.. it shouldn't be responding $OK $GI.
I just pushed a fix for that: a5db0a4
My apologies, I don't have a hardware setup with me at the moment to test the code, so I was pushing untested commits.

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

3 participants