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

Visible Info Before a NodeInfo Arrives #16

Open
garthvh opened this issue May 29, 2024 · 1 comment
Open

Visible Info Before a NodeInfo Arrives #16

garthvh opened this issue May 29, 2024 · 1 comment

Comments

@garthvh
Copy link
Member

garthvh commented May 29, 2024

When we get a packet from a nodenum that is not in the client database we should create starting data in a consistent way, matching the initial setup in the firmware.

The node num is a UInt32 value representing part of the Mac address, with this data we can generate the BLE name, Default Short and Long Name and user.ID

This is the swift method used to create a user from a node num

  public func createUser(num: Int64, context: NSManagedObjectContext) -> UserEntity {
    	let newUser = UserEntity(context: context)
    	newUser.num = Int64(num)
    	let userId = String(format:"%2X", num)
    	newUser.userId = "!\(userId)"
    	let last4 = String(userId.suffix(4))
    	newUser.longName = "Meshtastic \(last4)"
    	newUser.shortName = last4
    	newUser.hwModel = "UNSET"
    	return newUser
  }
@garthvh
Copy link
Member Author

garthvh commented May 29, 2024

image

After some conversation decided to show Incomplete and A person icon with a question mark when we have a incomplete user

ianmcorvidae added a commit to ianmcorvidae/meshtastic-python that referenced this issue May 30, 2024
ianmcorvidae added a commit to meshtastic/python that referenced this issue May 30, 2024
Initialize unknown nodes more in line with meshtastic/design#16; show hardware in --nodes
geeksville pushed a commit to geeksville/Meshtastic-python that referenced this issue Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant