Skip to content

Conversation

@bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Feb 10, 2026

Closes #4924

(this also updates the hard-coded IP address used in examples until #4927 lands)

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Feb 10, 2026

/hil full

@github-actions
Copy link

github-actions bot commented Feb 10, 2026

Triggered full HIL run for #4953.

Run: https://github.com/esp-rs/esp-hal/actions/runs/21873593677

Status update: ✅ HIL (full) run succeeded.

@bjoernQ bjoernQ marked this pull request as ready for review February 10, 2026 16:46
Comment on lines 606 to 616
pub(crate) fn new(ssid: &str) -> Self {
let mut ssid_bytes = [0u8; 32];
let bytes = ssid.as_bytes();
let len = usize::min(32, bytes.len());
ssid_bytes[..len].copy_from_slice(bytes);

Self {
ssid: ssid_bytes,
len: len as u8,
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use Ssid::from_raw(ssid, len) internally to reduce logic deduplication?

ssid: ssid_bytes,
len: len as u8,
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what is the proper fix for this (if there's any), but this code currently allows passing UTF-8 strings with double / triple octets characters (like é or emojis), which could be silently truncated at 32 chars.

That being said this isn't unique to this implementation, but rather to how the wifi standards specifies 32 octets, and not 32 chars.

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

Successfully merging this pull request may close these issues.

Use a dedicated SSID type (and don't use just String)

2 participants