RAPI Command Serial Numbers
chris1howell opened this issue · comments
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
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.
FYI, the ATMEGA 328 may has a unique ID we can use: https://www.thethingsnetwork.org/forum/t/arduino-has-a-unique-id/21415
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
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?
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 ?
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
In #144 I have a config that builds with the latest Arduino will see which avrdude is used.
code with $GI
b035a34
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
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.
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.