Image copyright AFP Image caption Micah Johnson left the initials 'RB' written in his own blood, police say

The man who shot dead five police officers in Dallas and wounded seven more was planning an even larger attack, the city's police chief says.

Micah Johnson, 25, was angry with the recent killings of black men by police and wanted to kill white officers, police say.

Police chief David Brown said he was "convinced" Johnson had wider plans.

He told CNN that Johnson, a military veteran, appeared to have practised detonating explosives.

Meanwhile, Delphine Johnson, the gunman's mother, told US site TheBlaze.com that he had been "disappointed" by his experience in the US military.

"The military was not what Micah thought it would be," she said. "He was very disappointed."

Mr Brown also said police were trying to find the significance of the letters "RB" that Johnson had written in his own blood, near where he was killed by a remote detonation by police.

Officers were also reading a journal found in Johnson's house that Mr Brown said was proving "hard to decipher".

Mr Brown also revealed that during two hours of negotiations last Thursday, the attacker taunted police.

"He just basically lied to us - playing games, laughing at us, singing, asking how many [police officers] did he get and that he wanted to kill some more and that there were bombs there."

"So there was no progress on the negotiation... I began to feel that it was only at a split second he would charge us and take out many more before we could kill him," Mr Brown added.

Johnson launched his attack in Dallas as a protest was taking place against the deaths of black men at the hands of police.

The deaths of Philando Castile in St Paul, Minnesota, and Alton Sterling in Baton Rouge, Louisiana, last week led to more protests across US cities.

Image copyright Reuters Image caption In Baton Rouge, up to 40 people were arrested on Sunday during a protest rally

Image copyright Jonathan Bachman/Reuters Image caption This came after mass arrests in the city on Saturday - this image by Reuters' Jonathan Bachman has been widely shared on social media

Read more: 'Legendary' photo gains praise

Image copyright AP Image caption Prominent activist DeRay Mckesson was among people detained in Baton Rouge on Saturday but was released on bail the next day

In Baton Rouge, up to 40 people were arrested on Sunday during a protest rally.

Some of the demonstrators chanted "No justice, no peace!" during a stand-off with police in riot gear.

In Virginia, protesters briefly shut down an interstate motorway in Portsmouth. They were marching in support of the Black Lives Matter movement.

In Detroit, Michigan, police arrested four men for posting threats against police officers on Facebook, urging people to kill white officers.

At the scene: David Willis, BBC News, Dallas

In contrast to protesters in other parts of the country, the people of Dallas are uniting behind their police officers.

A makeshift shrine in memory of the five officers gunned down on Thursday night sprang up outside police headquarters in the Cedars district of the city within hours of the attack, and it is now a mass of flowers, balloons, stuffed toys and messages of sympathy.

Throughout the day, a constant stream of visitors have come here - black, white, Hispanic; young couples, elderly folk, little girls in sun dresses - to pay their respects, say a prayer or simply shed a tear.

An impromptu prayer session on the steps of police headquarters ended with hugs and a police officer breaking down in tears.

Earlier, a mother was overheard telling her son it was up to his generation to make things better: "This generation tried, but soon it will be up to you," she said.

Media playback is unsupported on your device Media caption Millennials worry about what's in store for the next generation of black Americans

Demonstrations have continued despite an effort by President Barack Obama to soothe the tension.

On a visit to Spain on Sunday, he demanded an end to anti-police violence.

"Whenever those of us who are concerned about fairness in the criminal justice system attack police officers, you are doing a disservice to the cause," he said.

Image caption Flowers in memory of the murdered Dallas officers have been piling up

Also on Sunday, the White House said Mr Obama would travel to Dallas on Tuesday. He will speak at an interfaith memorial service.