He said: "Thirty minutes of heavy fighting followed. There are deaths on both sides."
It was not clear who carried out the attack. Somali gunmen have fired at Ethiopian soldiers several times this month.
Ethiopia wants to withdraw its soldiers in the coming weeks but diplomats fear that would leave the government vulnerable to remnants of the Union of Islamic Courts, UIC, who have vowed to fight a guerrilla war.
Somalia's stability is also under threat from competing clans and warlords seeking to re-create their fiefdoms.
"Peace is possible if the interests of US and the Ethiopians are removed"
Ahmed, Bossaso, Somalia
Send us your views
African Union officials arrived in Somalia at the week-end to finalise plans for a peacekeeping force.
The African Union's Peace and Security Council agreed this week to increase the number of troops from a proposed 8,000-strong deployment and called on the international community to fund the peace mission.
Uganda has said it is ready to provide the first battalion, but is awaiting the approval of parliament.
Kenya, the chair of regional body IGAD, has sent top officials to several African nations to seek support for the force.